Repository navigation
Conversation
There was no way to tell how much the chat of biigle/ask-biigle is actually used or how often its answers are wrong. The chat emits an event when a question is sent and when an answer is reported as incorrect, which this module now listens on and counts like the LabelBOT events. The listeners were loaded on the annotation tool only, but the chat is part of the navbar and available on every page, so they are loaded from a navbar mixin now. The annotation tool has a navbar as well, which is why the mixin of the annotation tool is gone instead of being kept next to the new one: both would have loaded the script twice there. The two counts are independent and not parts of a whole, unlike the LabelBOT events, so the admin page shows them as a table and not as a pie chart. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two new event types,
ask_biigle_asked_questionandask_biigle_reported_answer, plus the listeners that report them and an "Ask BIIGLE Events" panel on the metrics admin page.The counterpart is biigle/ask-biigle#27, which emits
ask-biigle.asked_questionandask-biigle.reported_answeron the global event bus. Neither PR counts anything on its own.Why
There was no way to tell how much the chat of
biigle/ask-biigleis actually used or how often its answers are wrong. This module already collects such counts for LabelBOT, so the chat reuses it instead of bringing a counter of its own. Only the counts are stored — no content of a question or answer.Notes for the reviewer
annotationsScriptsview mixin is replaced bynavbarMenuItem. The chat is part of the navbar and available on every page, so the listeners have to load there. The annotation tool renders the navbar as well, which is why the old mixin is gone instead of being kept alongside the new one: both would have loadedmain.jstwice on that page. LabelBOT events keep being counted, asannotationsScriptswas used by the annotation tool only. The mixin renders no menu item of its own, it only pushes the script.AdminControllergained a smalleventData()helper so both groups build their data the same way.npx vite build.🤖 Generated with Claude Code