Hmbown / Hmbown/Codewhale

Replace XOR thinking-collapse logic with intent-based expand/collapse

Open
#5,847 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
41k
Forks
3.6k
Avg merge
13h 59m
Merged PRs (30d)
299

Description

crates/tui/src/tui/history.rs:435 computes collapsed = folded ^ !verbose ^ thinking_default_expanded. Triple-XOR inverts intent: verbose ON plus default-expanded ON renders collapsed, and explicitly folding while verbose renders expanded. Replace with intent logic (explicit fold wins; otherwise verbose or default-expanded expands), add a keyboard inline expand/collapse for thinking blocks (currently mouse-click only via ReasoningAction::Expand), and cover the truth table with unit tests. Work in progress on a fix branch.

Contributor guide

Open the contributing guide

Research direction

Start in crates/tui/src/tui/history.rs around line 435 and trace the existing ReasoningAction::Expand mouse path. Define the expand/collapse truth table for explicit folding, verbose mode, and the default-expanded setting, then add keyboard handling and unit tests covering it. Done means intent-based rendering works and thinking blocks can be toggled inline by keyboard as well as mouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.