Add optional 'Msg numbers' setting to show message ids in chat bubbles#71
Draft
maxlamagna wants to merge 1 commit into
Draft
Add optional 'Msg numbers' setting to show message ids in chat bubbles#71maxlamagna wants to merge 1 commit into
maxlamagna wants to merge 1 commit into
Conversation
Agents reference messages by their integer id (the msg_id the MCP bridge returns), but the web UI never displayed it, so a human can't tell which message is "msg 437." This renders #<id> in the chat bubble header behind a Settings toggle (default off), mirroring the Contrast setting's body-class + update_settings persistence. Refs bcurts#70
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 & why
Agents reference messages by their integer id (the
msg_idthe MCP bridge returns), but the UI never shows that id, so a human can't tell which message is "msg 437." This adds the message id (#NNN) to the chat bubble header, behind a Settings toggle.Closes #70.
Changes
static/chat.js—appendMessage: render<span class="msg-num">#${msg.id}</span>in the existingbubble-header(chat messages only — joins/summaries/proposals untouched).static/index.html— add a "Msg numbers"<select>(Hide/Show) to#settings-bar, next to Contrast.static/style.css—.msg-numstyling; hidden by default, shown only whenbody.show-msg-numbersis set, so the id is always in the DOM and the toggle is pure CSS.app.py—show_msg_numbersdefault inroom_settings+ validation in theupdate_settingshandler. Round-trips to clients automatically viabroadcast_settings.Wiring mirrors the existing Contrast setting (body-class toggle,
update_settingspayload, immediate apply on change).Behavior
#idis exactlymsg.id, i.e. the same number agents cite.Notes / open to feedback
msg NNNreferences clickable to jump to the message —scrollToMessage()already exists. Raised in the issue with the "don't linkify every number" design question.Testing
python -m py_compile app.py— OKnode --check static/chat.js— OKDiff (also provided as
agentchattr-msg-numbers.patch,git apply-clean againstmain)