Skip to content

Unify the message menu across reply and user bubbles (#3114) - #3166

Merged
Birfy merged 2 commits into
mainfrom
feat/3114-message-menu
Nov 18, 2026
Merged

Birfy merged 2 commits into
mainfrom
feat/3114-message-menu

Conversation

@Birfy

@Birfy Birfy commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

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) carries MessageTools, useDismiss, the reaction list, messageActionIds and onMessageContextMenu; cells.js drops its local copy, mounts the menu from the row's onContextMenu (not for a part that is still streaming) and keeps one contextAt per stack, and user-message.js swaps its CopyButton for the same toolbar and opens the same menu on its root. i18n.js gains the three zh keys for a clipboard or a download that cannot be done, and core/test/earlier-message-actions.test.js grows three cases on the harness it already had (plus the projectUserText stub 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/main when the branch was cut; main was 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 on the row a person right-clicks carries a menu handler, my own line offers Reply too, the menu says why nothing was copied.
  • regression: exchange-read 2/2 · user-bubble 7/7 · empty-message-cell 3/3 · i18n 3/3 · i18n-missing-entries 17/17.
  • node core/scripts/build-client.mjs --check → exit 0 (after cd 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).
  • CI at this tip: tests-ok green on the push (read at 12:20Z; the tip did not move).

Not run:

  • the smoke bench (core/dev/bench.sh): no host, index.js or turn-pipeline change.
  • a browser click-through of the menu: the three cases drive the real components through the same esbuild/vm harness this test file already uses.

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"
}

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.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 18, 2026
@Birfy Birfy self-assigned this Nov 18, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 483fb8f Nov 18, 2026
18 of 20 checks passed
@Birfy
Birfy deleted the feat/3114-message-menu branch November 18, 2026 12:33
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#3114] 消息菜单:右键与用户气泡共用一套复制/引用/下载

1 participant