TUI: plan mouse support with --no-mouse flag #46

Open
opened 2026-10-03 08:07:26 +00:00 by warkanum · 4 comments
Owner

Status: needs planning and discussion before implementation

Goal

Add mouse support to the TUI, enabled by default, with a --no-mouse flag to disable it.

Decisions

  • Mouse is on by default; --no-mouse disables it.
  • All screens and dialogs must support the mouse, but nothing may depend on it: every action stays fully keyboard-operable.
  • Support as many mouse actions as feasible (click-to-focus/select, double-click to open, scroll wheel, click buttons, drag where sensible).
  • Mouse events are tested with the tcell simulation screen.

Findings so far

  • TUI is built on rivo/tview v0.42.0 / gdamore/tcell/v2 v2.13.9.
  • tview supports mouse via Application.EnableMouse(true); no mouse handling is currently enabled in the codebase.

Questions to resolve

  • Is tview's mouse support sufficient for all screens (lists, tables, forms, modals, dropdowns, text areas)? Identify widgets with gaps and how to fill them.
  • Flag scope: only the TUI command(s), or also an env var/config setting?
  • Conflict with terminal-native text selection/copy-paste when mouse capture is enabled (modifier-key workaround, e.g. Shift+select); document it.
  • Behaviour across terminals (tmux, ssh, Windows terminal, etc.).
  • Interaction with custom key handling and dialogs in pkg/ui/dialogs.go and the planned file browser / connection builder (#44).
  • Exact list of mouse actions per widget type.

Deliverables

  • Written plan/design agreed in this issue.
  • Then implementation + --no-mouse flag + tcell simulation tests + doc update.

Related: #44

## Status: needs planning and discussion before implementation ## Goal Add mouse support to the TUI, enabled by default, with a `--no-mouse` flag to disable it. ## Decisions - Mouse is **on by default**; `--no-mouse` disables it. - All screens and dialogs must support the mouse, but **nothing may depend on it**: every action stays fully keyboard-operable. - Support as many mouse actions as feasible (click-to-focus/select, double-click to open, scroll wheel, click buttons, drag where sensible). - Mouse events are tested with the tcell simulation screen. ## Findings so far - TUI is built on `rivo/tview` v0.42.0 / `gdamore/tcell/v2` v2.13.9. - tview supports mouse via `Application.EnableMouse(true)`; no mouse handling is currently enabled in the codebase. ## Questions to resolve - Is tview's mouse support sufficient for all screens (lists, tables, forms, modals, dropdowns, text areas)? Identify widgets with gaps and how to fill them. - Flag scope: only the TUI command(s), or also an env var/config setting? - Conflict with terminal-native text selection/copy-paste when mouse capture is enabled (modifier-key workaround, e.g. Shift+select); document it. - Behaviour across terminals (tmux, ssh, Windows terminal, etc.). - Interaction with custom key handling and dialogs in `pkg/ui/dialogs.go` and the planned file browser / connection builder (#44). - Exact list of mouse actions per widget type. ## Deliverables - Written plan/design agreed in this issue. - Then implementation + `--no-mouse` flag + tcell simulation tests + doc update. Related: #44
warkanum added the Kind/EnhancementKind/Enhancement labels 2026-10-03 08:07:26 +00:00
Member

Dispatcher assignment — wdevs/relspecgo#46

  • Assignment timestamp: 2026-10-03T13:17:00+02:00
  • Forge/repository: Gitea, wdevs/relspecgo
  • Issue: #46 — TUI: plan mouse support with --no-mouse flag
  • Classification: bounded planning/design documentation task; Ornith:9b was attempted first but failed authentication, so Claude Code Sonnet 5.5 is the approved fallback.
  • Selected backend: Claude Code CLI / claude-sonnet-5-5
  • Worker session/process: not launched yet; will be recorded immediately after launch.
  • Worktree: /home/hermes/work/issue-agents/wdevs/relspecgo/issue-46-mouse-support-plan
  • Branch: issue-46-mouse-support-plan (created from current master)
  • Plan: read issue and CLAUDE.md, inspect current TUI/tcell implementation, write an actionable design plan addressing widget/event coverage, --no-mouse scope, keyboard fallback, terminal behavior, and simulation tests; run appropriate documentation/diff checks; commit, push, open a PR, and update this issue with exact SHA/PR and verification.
  • PR: not created yet.
## Dispatcher assignment — wdevs/relspecgo#46 - Assignment timestamp: 2026-10-03T13:17:00+02:00 - Forge/repository: Gitea, wdevs/relspecgo - Issue: #46 — TUI: plan mouse support with --no-mouse flag - Classification: bounded planning/design documentation task; Ornith:9b was attempted first but failed authentication, so Claude Code Sonnet 5.5 is the approved fallback. - Selected backend: Claude Code CLI / claude-sonnet-5-5 - Worker session/process: not launched yet; will be recorded immediately after launch. - Worktree: `/home/hermes/work/issue-agents/wdevs/relspecgo/issue-46-mouse-support-plan` - Branch: `issue-46-mouse-support-plan` (created from current `master`) - Plan: read issue and CLAUDE.md, inspect current TUI/tcell implementation, write an actionable design plan addressing widget/event coverage, `--no-mouse` scope, keyboard fallback, terminal behavior, and simulation tests; run appropriate documentation/diff checks; commit, push, open a PR, and update this issue with exact SHA/PR and verification. - PR: not created yet.
Member

Worker fallback — wdevs/relspecgo#46

Claude Code Sonnet 5.5 was launched in the assigned worktree but exited before edits: its permission layer denied the required plan/report writes and denied the Tea issue reads. The worktree remains clean; no branch commit or PR exists.

Fallback selected per dispatcher policy: Hermes OpenAI/Codex surface, provider openai-codex, model gpt-5.6-luna, in the same preserved worktree and branch issue-46-mouse-support-plan. The fallback will preserve the worker findings, read the issue, write the plan/report, verify, commit, push, create the PR, and update this issue.

## Worker fallback — wdevs/relspecgo#46 Claude Code Sonnet 5.5 was launched in the assigned worktree but exited before edits: its permission layer denied the required plan/report writes and denied the Tea issue reads. The worktree remains clean; no branch commit or PR exists. Fallback selected per dispatcher policy: Hermes OpenAI/Codex surface, provider `openai-codex`, model `gpt-5.6-luna`, in the same preserved worktree and branch `issue-46-mouse-support-plan`. The fallback will preserve the worker findings, read the issue, write the plan/report, verify, commit, push, create the PR, and update this issue.
Member

Issue #46 planning delivery: PR #53 #53

Branch: issue-46-mouse-support-plan
Commit: df980a3434

Summary: Added docs/TUI_MOUSE_SUPPORT_PLAN.md with a repository-specific design covering default-on mouse, edit-only --no-mouse scope, widget actions and tview gaps, keyboard fallback, terminal/tmux/SSH/Windows and copy/paste behavior, issue #44/dialog integration, tcell simulation tests, acceptance criteria, and open decisions. Planning/documentation only; mouse support is not implemented by this PR.

Verification: go test ./pkg/ui passed; git diff --check passed; worktree was clean after commit and branch push was verified.

Caveats: terminal mouse reporting and native copy/paste behavior remain terminal/tmux/SSH dependent; implementation and issue #44 widgets are future work. No blockers for the requested planning deliverable.

Issue #46 planning delivery: PR #53 https://git.warky.dev/wdevs/relspecgo/pulls/53 Branch: issue-46-mouse-support-plan Commit: df980a3434bfbb5cfa69d02550b1f8fdc7835440 Summary: Added docs/TUI_MOUSE_SUPPORT_PLAN.md with a repository-specific design covering default-on mouse, edit-only --no-mouse scope, widget actions and tview gaps, keyboard fallback, terminal/tmux/SSH/Windows and copy/paste behavior, issue #44/dialog integration, tcell simulation tests, acceptance criteria, and open decisions. Planning/documentation only; mouse support is not implemented by this PR. Verification: go test ./pkg/ui passed; git diff --check passed; worktree was clean after commit and branch push was verified. Caveats: terminal mouse reporting and native copy/paste behavior remain terminal/tmux/SSH dependent; implementation and issue #44 widgets are future work. No blockers for the requested planning deliverable.
Author
Owner

PR #53 merged: mouse support plan only. Implementation (incl. --no-mouse) still pending, issue stays open.

PR #53 merged: mouse support plan only. Implementation (incl. --no-mouse) still pending, issue stays open.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wdevs/relspecgo#46