fix(tui): mouse click on list item does not update detail pane#1331
Merged
SorraTheOrc merged 2 commits intomainfrom Apr 2, 2026
Merged
fix(tui): mouse click on list item does not update detail pane#1331SorraTheOrc merged 2 commits intomainfrom
SorraTheOrc merged 2 commits intomainfrom
Conversation
When clicking a different list item, blessed fires 'select item' (not 'select') via List.prototype.select(). Add listSelectItemHandler that listens to 'select item' so the detail pane updates on mouse click. Store reference as __opencode_select_item matching existing pattern. Add regression tests in tests/tui/tui-mouse-select.test.ts. Agent-Logs-Url: https://github.com/TheWizardsCode/ContextHub/sessions/fe8e523d-6dab-4ac1-a60e-31154b42d85f Co-authored-by: SorraTheOrc <250240+SorraTheOrc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix mouse selection of work item in TUI
fix(tui): mouse click on list item does not update detail pane
Apr 2, 2026
Member
|
This automated review is currently blocked and this PR is not ready to merge until review checks can run.
Critical/Blocking issues
Non-blocking issues
|
Member
|
Automated review is currently blocked before merge-readiness checks can run.
A blocker work item has been opened to restore Ampa container startup so this review can be rerun: . |
Member
|
Review update: automated checks are still blocked before merge-readiness validation can run.
Please resolve WL-0MNI3D00000917G0, then rerun automated PR review for #1331. |
This was referenced Apr 3, 2026
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.
Mouse-click selection in the TUI work-item list visually moved the highlight but left the detail pane showing the previously selected item. Arrow-key navigation was unaffected.
Root cause
In blessed, clicking a different list item routes through the internal
item.on('click')handler which callsself.select(item)→List.prototype.select(). That method emits'select item', not'select':The controller listened to
'select'(Enter/re-click) and'keypress'(arrows), with no handler for'select item'. Thescreen.on('mouse')fallback was also unreliable because it requireslist.lposto be populated.Changes
src/tui/controller.ts— addslistSelectItemHandlersubscribed tolist.on('select item', ...). This event fires viaList.prototype.select()for every selection change—keyboard, mouse, and programmatic—making it the canonical place to refresh the detail pane. Reference stored as__opencode_select_itemfollowing the existing__opencode_select/__opencode_keypresspattern.tests/tui/tui-mouse-select.test.ts— regression tests covering:'select item'fires for a newly clicked item__opencode_select_itemhandler is registered on startupWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh gh issue create --repo TheWizardsCode/ContextHub --title Sample --body-file -(http block)/usr/bin/gh gh issue create --repo TheWizardsCode/ContextHub --title Sample --body-file - bash(http block)If you need me to access, download, or install something from one of these locations, you can either: