Skip to content

Fix startup banner position and tool cycle expanded state#201

Merged
shellicar merged 3 commits intomainfrom
fix/startup-banner-and-tool-cycle
Apr 6, 2026
Merged

Fix startup banner position and tool cycle expanded state#201
shellicar merged 3 commits intomainfrom
fix/startup-banner-and-tool-cycle

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Two small UX bugs.

Startup banner pushed off screen

showStartupBanner was called before addHistoryBlocks, making the banner the first block in the conversation. On sessions with enough history to fill the viewport it scrolled off the top and was never visible.

Moved the call to after history replay so the banner always sits immediately above the first prompt.

Left/right cycling collapses expanded tool input

selectPrev and selectNext both set #toolExpanded = false, so pressing an arrow key while a tool's input was expanded would immediately collapse it. resetExpanded (called on return to editor mode) already handles the right teardown point.

Removed the collapse from selectPrev and selectNext so expanded state is preserved while navigating between tools.

@shellicar shellicar added this to the 1.0 milestone Apr 6, 2026
@shellicar shellicar added the bug Something isn't working label Apr 6, 2026
@shellicar shellicar self-assigned this Apr 6, 2026
@shellicar shellicar requested a review from bananabot9000 April 6, 2026 16:20
@shellicar shellicar added the bug Something isn't working label Apr 6, 2026
@shellicar shellicar enabled auto-merge (squash) April 6, 2026 16:20
Two unrelated UX bugs fixed together as both are small.

**Startup banner pushed off screen on long sessions**
showStartupBanner was called before addHistoryBlocks, making the banner
the first block in the conversation. On sessions with enough history to
fill the viewport, the banner scrolled off the top and was never visible.
Moved the call to after history replay so the banner sits immediately
above the first prompt where it is always seen.

**Left/right cycling collapses expanded tool input**
selectPrev and selectNext both set #toolExpanded = false, so pressing an
arrow key while a tool's input was expanded would immediately collapse it.
The intent of resetExpanded (called on return to editor mode) already
covers the right teardown point. Removed the collapse from selectPrev
and selectNext so expanded state is preserved while navigating tools.
Tests updated to reflect the new expected behaviour.
@shellicar shellicar force-pushed the fix/startup-banner-and-tool-cycle branch from 4fc53d2 to f24193f Compare April 6, 2026 16:26
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two clean fixes, both well-scoped 🍌

Banner position: Moving showStartupBanner after addHistoryBlocks is the obvious correct fix. Banner should be the last thing before the prompt, not the first thing in the buffer.

Tool cycle expanded state: The old behaviour (collapse on arrow key) was clearly a UX bug -- if you expand a tool to read it, cycling to the next tool shouldn't collapse the view. resetExpanded still handles the teardown when exiting approval mode, so there's no state leak.

Tests updated correctly: "collapses" → "preserves", expected flipped to true.

Session log is noise but documents the context well.

Approved ✅

@shellicar shellicar merged commit 4e79ca5 into main Apr 6, 2026
4 checks passed
@shellicar shellicar deleted the fix/startup-banner-and-tool-cycle branch April 6, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants