GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(site): add a copy submenu to agent chat menus by jakehwll · Pull Request #30016 · coder/coder

Conversation

@jakehwll

@jakehwll jakehwll commented Sep 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

Stacked on #30015.

A chat's ID and branch name were only reachable from the URL or the git panel, so copying either meant leaving the sidebar.

Chat menus (right-click, sidebar ⋮, and top bar) expose Copy ID directly when it is the only copy action. When a head branch is available, a Copy submenu groups Copy ID and Copy branch.

image

Copying is read-only, so copy actions also render where the menu used to be suppressed entirely: another user's shared chat and archived child chats.

Implementation notes
  • ContextMenu gained Sub, SubTrigger, and SubContent wrappers so the right-click menu keeps parity with DropdownMenu; ChatActionsMenuItems takes them as props alongside Item and Separator.
  • Because every chat now has at least Copy ID, the menu can never be empty, so chatHasMenuActions is gone and both call sites always render their trigger.
  • The separator that used to sit above the archive actions now sits above the copy actions, which always render, so the archive block keeps its own unconditional separator.
  • Copy items are built once; their count determines whether to render them directly or in a submenu, without duplicating action handlers.
  • The branch comes from chat.diff_status.head_branch, the same source the remote diff panel copies from.
  • Radix submenu items do not respond to userEvent clicks in jsdom, so the Vitest coverage opens the submenu with userEvent and selects the item with fireEvent. The missing-branch, shared-chat, and archived-child states are Storybook stories.

Latest validation after merging main: 133 sidebar/menu unit tests and 75 sidebar Storybook tests pass. pnpm format, pnpm check, and full pnpm lint (including types) pass. Browser-rendered Storybook screenshots were returned in chat.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jakehwll added 3 commits September 27, 2026 20:10
@jakehwll
🤖 feat: add mark as read and unread to agent chat menus
7990b19
The chat read cursor only moved when a chat's stream connected or
disconnected, so there was no way to clear an unread dot without
opening the chat, or to flag a chat to come back to.

UpdateChatRequest gains a Read field that advances the owner's read
cursor or clears it, and the sidebar's right-click and actions menus
expose it under Show subagents. The cursor is owner-scoped, so the
endpoint rejects non-owners even when they may otherwise update the
chat, and the menu item is hidden for the chat that is already open
because opening a chat marks it read.
@jakehwll
🤖 chore: retrigger CI after transient fmt job failure
27b4f52
@jakehwll
🤖 feat(site): add a copy submenu to agent chat menus
d9b98f4
@github-actions github-actions Bot assigned jakehwll Sep 27, 2026
@jakehwll
🤖 fix: address review feedback on chat read state
c0b2ac9
- reject an unauthorized read change before any other PATCH field is
  written, so a rejected multi-field update commits nothing
- drop the chat from read-status-filtered list caches instead of
  leaving a row the filter excludes, and patch nested subagent rows
- snapshot and restore the list caches on mutation failure rather than
  relying on a refetch that may also fail
- move the active-chat menu check from Vitest to a Storybook story
@jakehwll
jakehwll marked this pull request as ready for review September 27, 2026 20:34
@jakehwll
jakehwll requested a review from a team as a code owner September 27, 2026 20:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T20:38:53.202374Z d9b98f4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jakehwll
jakehwll added this pull request to stack #30017 September 27, 2026 20:35
@jakehwll
🤖 chore: merge chat read state branch into copy submenu branch
6eac85c
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 27, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9b98f4267

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread site/src/pages/AgentsPage/components/ChatActionsMenuItems.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/AgentsPage/components/ChatsSidebar/ChatsSidebar.test.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jakehwll
🤖 fix(site): keep the copy submenu available without manage rights
5b6d2aa
@linear-code

linear-code Bot commented Sep 28, 2026

Copy link
Copy Markdown

CODAGT-1200

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from jakehwll/agents-chat-mark-read to main September 28, 2026 08:58
jakehwll added 2 commits September 28, 2026 09:05
@jakehwll
🤖 chore: resolve main conflicts in chat copy submenu
70058b9
@jakehwll
🤖 chore: merge main into chat copy submenu branch
3cd2d7a
Preserve main’s trailing chat content alongside the always-available copy submenu.
jaaydenh
jaaydenh requested changes Oct 6, 2026
View reviewed changes

@jaaydenh jaaydenh left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the copy menu item has only a single option, why make it open a separate menu instead of changing the main menu option to copy ID or copy branch? Seems like the extra menu level is only needed if there are multiple menu options

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jakehwll
jakehwll requested a review from jaaydenh October 7, 2026 01:23
jakehwll added 2 commits October 7, 2026 01:29
@jakehwll
🤖 fix(site): flatten single-item chat copy menus
2b1f9b5
@jakehwll
🤖 chore: merge main into chat copy submenu branch
90eda7e
jaaydenh
jaaydenh approved these changes Oct 7, 2026
View reviewed changes
@jakehwll
jakehwll merged commit 0829748 into main Oct 7, 2026
30 of 31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jakehwll
jakehwll deleted the jakehwll/agents-chat-copy-submenu branch October 7, 2026 03:12
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@jaaydenh jaaydenh jaaydenh approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@jakehwll jakehwll

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jakehwll @jaaydenh
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.