Uh oh!
There was an error while loading. Please reload this page.
fix(tui): make "view subagents" hint clickable to restore Task click-to-navigate - #15770
fix(tui): make "view subagents" hint clickable to restore Task click-to-navigate#15770jerome-benoit wants to merge 19 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restores click-to-navigate functionality on Task tool entries in the chat, which was broken when Task was refactored from BlockTool to InlineTool (commit 90270c6). InlineTool didn't support onClick, so clicking a task tool no longer navigated to the subagent session. This fix mirrors the existing BlockTool pattern by adding onClick? prop support to InlineTool (with a text-selection guard using useRenderer().getSelection()) and wires the navigate handler in Task.
Changes:
- Added
onClick?: () => voidprop toInlineTooland anonMouseUphandler that fires it (with a text-selection guard matching theBlockToolpattern). - Passes a navigation handler from the
Taskcomponent toInlineToolthat navigates to the subagent session whenprops.metadata.sessionIdis set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
2d1c1a2 to
1687375Compare…ck-navigation # Conflicts: # packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
…o-navigate Add native onClick support to InlineTool (matching BlockTool's onMouseUp pattern with text-selection guard), and revert Task from BlockTool back to InlineTool per maintainer preference while preserving upstream's content() memo pattern.
…BasicTool Web UI: revert BasicTool onClick prop — the existing <a> link on the subtitle text in Task's trigger JSX already handles click-to-navigate. TUI: move onMouseUp from the outer <box> to the inner <text> element so only the text content is clickable (not the entire tool block). Add onMouseOver/onMouseOut hover feedback matching header.tsx pattern.
Align InlineTool click hover with the rest of the TUI — wrap <text> in a <box> with onMouseOver/onMouseOut toggling backgroundColor, matching UserMessage, BlockTool, and header.tsx navigation buttons.
jerome-benoit
commented
Mar 5, 2026
Closing — fixed upstream by 4da1996 which adds |
Issue for this PR
Closes#15769
Type of change
What does this PR do?
Makes the existing
Ctrl+X view subagentshint inAssistantMessageclickable using the same<box>hover/click pattern as the Parent/Prev/Next navigation buttons in the header:onMouseOver/onMouseOuttogglingbackgroundColortotheme.backgroundElement, andonMouseUptriggeringcommand.trigger("session.child.first").No changes to
InlineTool,BlockTool, or the Web UI.How did you verify your code works?
Checklist