Repository navigation
Unify the message menu across reply and user bubbles (#3114) - #3166
Merged
Merged
Conversation
The three cases run against the toolbar main has today: a right-click on a reply row has no menu handler, a person's own line has no Reply and no menu, and a copy the window cannot do says nothing at all. They fail until the toolbar moves into its own module and both bubbles draw it. Docs-not-needed: the message toolbar already has its bullet on this page (the earlier-messages one: Reply quotes into the open chat); this cut moves it into its own module and draws the same one on a person's own line — no owned path or subsystem boundary changes.
Move MessageTools, useDismiss and the reaction list out of cells.js into message-tools.js, so a reply bubble and a person's own line draw the same toolbar and the same Copy/Download menu. A right-click on a row opens that menu at the cursor (not while a part is streaming), and a copy or a download the window cannot do writes a role=status line in the menu instead of failing silently. Docs-not-needed: the message toolbar already has its bullet on this page (the earlier-messages one: Reply quotes into the open chat); this cut moves it into its own module and draws the same one on a person's own line — no owned path or subsystem boundary changes.
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.
Written-by: Dev
Fixes #3165
Part of #3114 (the umbrella stays open — this slice closes its own issue).
Owner: Dev
Reviewer: Reviewer
Tier: T1 — the tier the enqueue-guard computed from this diff
What changed
core/src/client/message-tools.js(new) carriesMessageTools,useDismiss, the reaction list,messageActionIdsandonMessageContextMenu;cells.jsdrops its local copy, mounts the menu from the row'sonContextMenu(not for a part that is still streaming) and keeps onecontextAtper stack, anduser-message.jsswaps itsCopyButtonfor the same toolbar and opens the same menu on its root.i18n.jsgains the three zh keys for a clipboard or a download that cannot be done, andcore/test/earlier-message-actions.test.jsgrows three cases on the harness it already had (plus theprojectUserTextstub the user bubble needs).Not in this cut: delete/retract (the client has no host write for it), hiding Reply in a read-only window, reactions on a person's own line, and message folding.
Verification at the tip
Tip SHA: f596a75
Base: cdd02c6 (live
origin/mainwhen the branch was cut;mainwas still at that sha when the branch was pushed)Ran:
cd core && node --import ./test/harness-resolve.mjs --test test/earlier-message-actions.test.js→# tests 6 / # pass 6 / # fail 0. Before the implementation, on the same test file:# tests 6 / # pass 3 / # fail 3, red onthe row a person right-clicks carries a menu handler,my own line offers Reply too,the menu says why nothing was copied.exchange-read2/2 ·user-bubble7/7 ·empty-message-cell3/3 ·i18n3/3 ·i18n-missing-entries17/17.node core/scripts/build-client.mjs --check→ exit 0 (aftercd core && node scripts/build-client.mjs).node scripts/ds-bot-patches.mjs check→ok 10 patches apply cleanly in order·ok core/ equals ds-bot/ + patches/ds-bot/.node scripts/ds-bot-patches.mjs canonical→ok patches/ds-bot/ is what generate writes (generate is a no-op).TZ=UTC TMPDIR=/data/flybot-tmp npm run verify→ exit 0 (core 3304 tests, 3303 pass / 1 skipped; every plugin suite, lint, both-checks and the interop suites green).tests-okgreen on the push (read at 12:20Z; the tip did not move).Not run:
core/dev/bench.sh): no host,index.jsor turn-pipeline change.Docs-not-needed: the message toolbar already has its bullet on this page (the earlier-messages one: Reply quotes into the open chat); this cut moves it into its own module and draws the same one on a person's own line — no owned path or subsystem boundary changes.
Checkpoint
{
"pr": 3166,
"claim": "Dev",
"issue": 3165,
"summary": "The message toolbar moves into message-tools.js so a reply bubble and a person's own line draw the same one. A right-click on a row opens the same Copy/Download menu at the cursor, except on the part still streaming. A copy or a download the window cannot do now says why in a role=status line instead of failing silently. Three cases on the existing harness pin both bubbles and that note.",
"files": [
"core/src/client/message-tools.js",
"core/src/client/cells.js",
"core/src/client/user-message.js",
"core/src/client/i18n.js",
"core/test/earlier-message-actions.test.js",
"changelog.d/3114-message-menu.added.md",
"core/client.js",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0003-flybot-api-client.patch",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/src/client/message-tools.js",
"patches/ds-bot/files/test/earlier-message-actions.test.js"
],
"checks": { "ran": "TZ=UTC TMPDIR=/data/flybot-tmp npm run verify", "result": "green", "at": "f596a75a770a5ea5e8653c7a838a3b2cdd5303d9" },
"next": "none — ready for review"
}