tui: select a project/archived row before its click toggles it - #1163
Merged
Conversation
Clicking a project header or an "N archived" disclosure row toggled it open/closed on the first click, even when the row wasn't selected. Reaching for a project with the mouse folded it as a side effect and shifted every row below out from under the cursor. Both rows now take two clicks: the first only moves the selection there, the second toggles. Column-specific disclosure markers (a session's nested children, a service's children) are unchanged — aiming at those is already unambiguous.
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.
What
Clicking a project header or an "N archived" disclosure row in the session list toggled collapse/expand on the very first click, even when that row wasn't selected. Reaching for a project with the mouse — to select it, act on it, or just see it highlighted — folded it as a side effect and shifted every row below out from under the cursor, so the next click landed somewhere the user never aimed at.
Both rows now take two clicks:
Unchanged:
Notes
specs/0178-list-row-click-selects-before-toggling.mdrecords the rule so future full-row toggles follow it.crates/cli/src/app.rscover the select-then-toggle sequence for the project header and the archived row.Testing
cargo test --workspace— all green. One unrelated flake on the first run (pty_render::tests::smith_tool_expand_collapse_rebuilds_only_retained_suffix, a wall-clock perf assertion that tripped while a concurrentcargo buildloaded the machine); passes on its own.Binary
Only touches
crates/cli→ relevant binary isconstruct:/Users/moon/agentd/.claude/worktrees/list-group-click-select-first/target/debug/construct