Repository navigation
Conversation
The command palette was the only way to copy a session ID. Add the same action to the tab context menu and the session list row menu, and share the clipboard write plus toast feedback through a single helper so the three call sites cannot drift. The palette command now uses it too. Co-Authored-By: Claude <[email protected]>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
1 task done
Contributor
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
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.
Issue for this PR
Refs #47746 (the TUI counterpart of this request).
Type of change
What does this PR do?
The palette command
session.copyIDwas the only way to copy a session ID. This adds the same action to the tab context menu and to the session list row menu — the two places where the ID is on screen and people actually reach for it.packages/app/src/shell/clipboard.tsis new: it holds the clipboard write plus the toast, and all three call sites go through it so the success and failure feedback cannot drift apart.use-session-commands.tsxdrops its inline copy of that logic, and the tab and session menus gain oneMenu.Itemeach.Kept to
packages/app— no new dependencies, and nothing in the server, schema or core packages changes.How did you verify your code works?
Ran both new menu items in the desktop app on Windows: the ID lands on the clipboard and the toast shows it. I also checked the failure path by forcing the clipboard write to reject, which surfaces the error toast rather than failing silently.
bun run typecheck,bun run lintandbun run test:unitforpackages/appall pass (916 pass, 0 fail).I did not add translations. Every key this uses already exists in
packages/app/src/runtime/i18n/en.tsfrom the palette command, so there is nothing new to translate, and the other 62 locales fall back to English for them — which is how they already behave today.Screenshots / recordings
Can attach a recording of both menus if that would help the review.
Checklist