Repository navigation
feat(session-ui): move user message actions into a menu - #60208
Conversation
There was a problem hiding this comment.
Works as described. I mounted the prompt message story on the base and on this branch and opened the new … menu: the menu shows the sent time, Fork and Copy, and Rewind stays in the footer. The two touched component test files pass (14/14), and tsc -b passes for session-ui. Public API unchanged: this is a UI-only change, plus one new English i18n key (ui.message.moreActions).
Worth addressing:
- No copy feedback. Copy message and Copy full message from the menu now give no sign that they worked, or that the clipboard write failed. Before, the button changed to a check and "Copied", and the response copy button still does (see inline).
- Dead code.
packages/session-ui/src/message/relative-time.tsand its test are no longer used anywhere outside that test. Theui.message.time.justNow,minutesAgo,hoursAgoanddaysAgokeys are also unused now, in every locale. They can be removed in this PR.
| <Menu.Item disabled={!props.actions?.fork || pending() || state.forking} onSelect={() => void fork()}> | ||
| {i18n.t("ui.message.forkMessage")} | ||
| </Menu.Item> | ||
| <Menu.Item disabled={!props.text} onSelect={() => void writeClipboard(props.text)}> |
There was a problem hiding this comment.
Copying from the menu now gives no feedback. The menu closes, and the user can't tell whether writeClipboard succeeded, which matters most when it returns false. The old button switched to a check and "Copied" for 2s, and the response copy button still does. Could the result be surfaced somehow, for example a toast, or a brief check on the … trigger?
There was a problem hiding this comment.
The new commit only regenerates packages/protocol/openapi.json. check:generated fails on dev (the committed spec is already stale there) and passes with this commit.
Public API: the OpenAPI spec adds maximum: 9007199254740991 to the integer fields times, remainingRuns and runCount. It's a documentation-only tightening to JavaScript's largest safe integer and backwards compatible; the server's behaviour doesn't change.
The earlier points are not addressed yet.
e43a034 to
db8b40d
Compare
db8b40d to
8d62ee1
Compare
There was a problem hiding this comment.
This push only rebases the branch onto newer dev (which includes #60228); the PR's own diff is unchanged, and the touched component tests still pass (14/14). Public API unchanged. The earlier points are not addressed yet.


Summary
Tidies the footers under timeline messages.
Under user messages
…) menu.Under agent responses
Both footers
Tests
Updated the component and e2e tests that checked the old timestamp, the steer icon, the 0.66 opacity and the "Copy message" button. The timestamp test now covers the menu: the sent time, disabled items, and the footer staying visible while the menu is open.
bun run checkpasses.session-message-projection.spec.tsandsession-timeline-mobile.spec.tspass, repeated 5× at 2 workers.timeline-geometry,session-queue,timeline-history,session-timeline-accessibilityandbtw-sidebarpass, and so do the touched cases intimeline-streamandsession-header. Two other cases in those files fail locally on macOS and fail the same way ondev, which matches the known macOS shortcut issue in the e2e notes.Visual
Added by the opencode bot (AI-generated).
Public API: openapi.json adds maximum 9007199254740991 to the integer fields times, remainingRuns and runCount (spec regeneration, backwards compatible)