Skip to content

feat(tui): add onClick handler to InlineTool and Task components#16187

Merged
thdxr merged 1 commit intodevfrom
feature/inline-tool-onclick
Mar 5, 2026
Merged

feat(tui): add onClick handler to InlineTool and Task components#16187
thdxr merged 1 commit intodevfrom
feature/inline-tool-onclick

Conversation

@thdxr
Copy link
Copy Markdown
Member

@thdxr thdxr commented Mar 5, 2026

Summary

  • Add onClick prop to InlineTool component with hover state management
  • Implement subtle hover effect by changing text color instead of background
  • Add onClick handler to Task component to navigate to child session
  • Prevent click when text is selected to avoid accidental navigation

Changes

  • Added onClick?: () => void prop to InlineTool
  • Added hover state with createSignal and mouse event handlers
  • Modified fg memo to change text color on hover when clickable
  • Added onClick to Task that navigates to props.metadata.sessionId if available
  • Added selection check before triggering onClick to prevent accidental clicks

Testing

  • Typecheck passes
  • Hover effect works correctly (text color change)
  • Clicking on Task navigates to child session
  • Clicking with text selected does not trigger navigation

- Add onClick prop to InlineTool component with hover state
- Change text color on hover instead of background for subtle effect
- Add onClick to Task component to navigate to child session
- Prevent click when text is selected
@thdxr thdxr enabled auto-merge (squash) March 5, 2026 14:56
@thdxr thdxr merged commit 4da1996 into dev Mar 5, 2026
12 checks passed
@thdxr thdxr deleted the feature/inline-tool-onclick branch March 5, 2026 15:02
manno23 pushed a commit to manno23/opencode that referenced this pull request Mar 12, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 19, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant