feat(desktop): promote Copy link to the message hover action bar - #6529
feat(desktop): promote Copy link to the message hover action bar#6529morgmart wants to merge 1 commit into
Conversation
Copying a message link is a frequent action but was buried behind the More menu. Add a Copy link button to the hover action bar between Reply and the More menu, using the same Link2 icon as the existing menu entry so the association stays 1:1. The link-building + toast behavior and the visibility gate (not pending, not a huddle system row, channelId available) are extracted into shared helpers so the bar button and the menu entry cannot drift. The menu entry is kept so both paths work. Requested by Morgan and baxen in the buzz-design thread. Signed-off-by: Trace (Engineer) <9d485ff0c62915e08a801162c195c7ef096f6f6143925407255cea2656c4b8a4@buzz.block.builderlab.xyz> Co-authored-by: morgmart <98432065+morgmart@users.noreply.github.com> Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent
Verdict: REQUEST CHANGES
Reviewed: 47526784d5c1967de6b2c5d1ee642bccfefbfab9..5bd71542f8cdc79166a84d8bb196a5c271ceee25 (exact head 5bd71542f8cdc79166a84d8bb196a5c271ceee25)
Risk: medium — this adds a user-visible action to the shared message toolbar across channel, thread, DM, inbox, narrow, and touch/focus layouts.
Behavior/contracts traced: toolbar and retained More-menu eligibility; NIP-10 thread-root extraction; canonical buzz://message construction; current-render channel/message ownership; pending and huddle exclusions; native clipboard completion and success/failure toasts; responsive/focus/tooltip semantics.
Blocking finding: desktop/src/features/messages/ui/MessageActionBar.tsx:56-80,271-280,589-607 adds the promoted entry point and centralizes both paths, but the PR adds no direct regression assertion for its user-visible contract. A scoped search of desktop/src/**/*.test.mjs and desktop/tests/e2e found zero consumers of either copy-link-message-* or the retained copy-message-link-*. The full unit suite therefore passes even if the new button is removed, its gate diverges, or its copied thread URL is wrong. Existing layout tests exercise bounds but do not click this action or inspect the clipboard payload.
Please add a deterministic checked-in Playwright regression that:
- reveals/focuses a delivered message's
copy-link-message-<id>, verifies its accessible name/tooltip, clicks it, and asserts the exact native clipboard command payload and success feedback; - covers a thread reply so the canonical
thread=<root>parameter is protected, and confirms the retained More-menu path produces the same link; - proves pending and huddle system rows omit both Copy link surfaces;
- keeps the toolbar within bounds in the narrow/open-thread shape affected by the added 32px action.
Mutation-prove the test by removing or inverting the new toolbar gate and requiring a causal failure. This is bounded to the changed contract; no broader action-bar refactor is requested.
Validation at matching clean HEAD:
- Desktop full unit suite: 5,306 passed, 0 failed.
- Desktop typecheck/check passed; check reported five unrelated existing diagnostics outside the changed file.
- Runtime browser probe confirmed name/tooltip/focus, matching links from both paths, success toast, and absence on ineligible rows; two existing relevant layout regressions passed on a fresh isolated server.
- Visual inspection at 1280×720 showed correct ordering and no clipping. The full messaging spec run was inconclusive after its reused server died; 19 later failures were connection-refused cascades.
- GitHub macOS build, relay E2E, and three smoke shards observed passing; core, integration, and one smoke shard were still running when this review was submitted.
Manual/native evidence: Browser/Vite proof only. Native Tauri/WKWebView, zoom above 100%, and clipboard failure injection were not run.
Residual risk: Native focus/clipboard behavior and higher-zoom toolbar width remain unproven. Any new head invalidates this review.
Problem
Copying a message link is a frequent action but is buried behind the ⋮ More menu. Morgan keeps reaching for the hover toolbar expecting it (Slack muscle memory), and baxen also wants it promoted.
Change
ACTION_BUTTON_CLASS/ACTION_ICON_CLASS) and the same Link2 icon as the menu entry so the association stays 1:1. Tooltip: "Copy link".data-testid:copy-link-message-<id>.copyMessageLink(buildbuzz://link with thread root + "Link copied to clipboard" toast) andcanCopyMessageLink(not pending, not a huddle system row, channelId available) so the bar button and the More-menu entry cannot drift.Testing
pnpm typecheck— cleanpnpm exec biome checkon the touched file — cleanpnpm test(full desktop suite) — 5306 pass, 0 failRequested in the buzz-design thread (Morgan + baxen), implemented from morgan-working.