Skip to content

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

Closed

Description

@Birfy

Third slice of #3114 (umbrella stays open). Spec: #3114 comment 6978004880 (the revised one; 6977264409 is superseded).

Scope

Main today has half a message menu: a reply bubble gets a hover toolbar (react / Reply / More → Copy, Download), but a right-click on a message does nothing, a user's own bubble has only Copy, and a failed copy/download says nothing at all. This slice unifies the menu:

  • core/src/client/message-tools.js (new) carries MessageTools, useDismiss, the reaction list and onMessageContextMenu; both bubbles use it.
  • core/src/client/cells.js drops its local copy and mounts the menu from the row's onContextMenu (not while a part is streaming).
  • core/src/client/user-message.js swaps its CopyButton for the same menu and gets a right-click too.
  • core/src/client/i18n.js gains three zh keys for a clipboard/download that cannot be done.
  • core/test/earlier-message-actions.test.js grows three cases on the harness it already has.

Why not a separate test file, why no read-only line, why no delete

  • A new test file would re-copy ~130 lines of esbuild/vm/fake-React scaffolding and push hand-written changes to 466 lines, over the T1 limit of 400 (.github/agent/risk-rules.json L44) — the controller would bump the PR to T3.
  • Read-only Reply hiding is a permission-semantics change, not part of unifying the menu; main does not read readOnly from these two files today.
  • Delete/retract has no host write at all (deleteMessage / retractMessage are 0 hits in the repo), so those entries must not appear.

Size

12 files (6 hand-written, 6 generated): hand-written +237/−67 = 304 lines. No gate file (.github/**, policy/**, enqueue-rules.mjs, test.yml, gates.json). Generated: core/client.js (+2903/−2816, via build-client.mjs, patch 0008), patches/ds-bot/files/src/client/message-tools.js, patches/ds-bot/files/test/earlier-message-actions.test.js, 0001-core-fixes.patch (i18n), 0003-flybot-api-client.patch (cells, user-message), 0008-client-bundle.patch.

Acceptance

The PR must show: the three new cases green on core/test/earlier-message-actions.test.js (6/6), build-client --check exit 0, ds-bot-patches check + canonical clean, TZ=UTC TMPDIR=/data/flybot-tmp npm run verify exit 0, and no .github/ or policy/ path in the diff.

Part of #3114. Does not close it.

Activity

  1. added
    enhancementNew feature or request
    agent-prPull request opened by an agent
    area:uiWeb/desktop UI and copy
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uiWeb/desktop UI and copyenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions