Conversation
There was a problem hiding this comment.
Pull request overview
Enables switching agents mid-composition by making the currently selected agent label in the session info bar clickable, opening the existing Agent Picker dialog.
Changes:
- Add an
onAgentClickcallback prop toSessionInfoand render the agent label as a<button>that invokes it. - Wire
SessionInfo’sonAgentClickinsession.tsxtosetShowAgentPicker(true)to open the Agent Picker.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
app-prefixable/src/pages/session.tsx |
Passes onAgentClick to SessionInfo to open the Agent Picker dialog. |
app-prefixable/src/components/session-info.tsx |
Converts the agent display into a clickable button and adds an onAgentClick prop. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button | ||
| type="button" | ||
| class="flex items-center gap-1 shrink-0 hover:opacity-80 cursor-pointer" | ||
| onClick={() => props.onAgentClick?.()} | ||
| > |
There was a problem hiding this comment.
onAgentClick is optional, but the UI is always rendered as an interactive <button> with hover + pointer cursor. If a caller omits onAgentClick, this produces a focusable/clickable control that does nothing. Either make onAgentClick required (and remove the optional chaining), or conditionally render a non-interactive <span> / disable the button and remove hover/cursor styles when the callback isn’t provided.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Closes #31