TUI cleanup: remove legacy duplicate overlays and polish welcome box (#61)#74
Merged
Conversation
…mations (#61) Resolves the four items from the 2026-06 audit (P2 #9, #11-13) tracked in issue #61: - Remove render_simple_help_overlay and render_legacy_history_search along with the legacy App.show_help / App.history_search state they rendered; the overlays in overlays.rs are now the only help / history-search paths. - Cap the welcome box at 120 columns so it no longer stretches edge-to-edge on very wide terminals. - Add a CompanionPose::Idle blink/sway loop: familiars with eyes (kitty, cody, echo) blink once per ~12s idle cycle, the others spark, and every glyph sways one column for half the cycle. The eye-socket color is now per-familiar instead of hardcoded violet-300. - Typeahead source badges: file references gain a [context] badge, and prompt history is now surfaced as passive [history] suggestions (prefix match, newest first, Tab to accept — never auto-selected so Enter still submits the typed prompt). Closes #61 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR completes several TUI audit items by consolidating overlay state/render paths, tightening the welcome panel layout on wide terminals, and improving familiar/typeahead presentation (idle animation + source badges + history-based hints).
Changes:
- Remove legacy duplicate help/history-search overlay codepaths and make overlay structs the single source of truth.
- Cap the welcome box width (max 120 columns) and add coverage to prevent overpainting on large terminals.
- Add familiar idle pose animation support and enhance typeahead suggestions with
[context]/[history]badges plus passive history-prefix hints.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src-rust/crates/tui/src/render.rs | Removes legacy overlay fallbacks, caps welcome box width, adds [context] badge rendering, updates welcome familiar card rendering to take a pose. |
| src-rust/crates/tui/src/prompt_input.rs | Adds passive prompt-history prefix suggestions when no cmd/file suggestions exist; adds tests for new rules. |
| src-rust/crates/tui/src/mascot.rs | Introduces CompanionPose::Idle { frame } with blink/spark + sway behavior; adds unit tests. |
| src-rust/crates/tui/src/lib.rs | Updates tests to reference help overlay visibility and removes legacy history search tests/imports. |
| src-rust/crates/tui/src/familiar_theme.rs | Makes eye-socket tint per-familiar (no longer hardcoded), updates palette constructors and adds a test. |
| src-rust/crates/tui/src/familiar_card.rs | Changes card rendering to accept a full CompanionPose (static/idle/loading) instead of an optional loading frame. |
| src-rust/crates/tui/src/app.rs | Removes legacy show_help / HistorySearch state and mirroring logic; updates pose ticking to use Idle vs Loading. |
| src-rust/crates/tui/src/agents_view.rs | Updates familiar card rendering call sites to pass CompanionPose::Static. |
| src-rust/crates/cli/src/main.rs | Removes legacy history-search gating in the interactive paste handling condition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2913
to
2917
| )); | ||
| if !suggestion.description.is_empty() { | ||
| spans.push(Span::styled( | ||
| " \u{2014} ", | ||
| Style::default().fg(Color::DarkGray), | ||
| )); | ||
| spans.push(Span::styled( | ||
| truncate_text(&suggestion.description, area.width as usize / 2), | ||
| detail_style, |
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.
Resolves the four items from
docs/AUDIT-2026-06.md(P2 #9, #11–13) tracked in #61.Changes
Legacy duplicate overlays removed (P2 #11)
render_simple_help_overlayandrender_legacy_history_searchfromrender.rs— they duplicatedoverlays::render_help_overlay/render_history_search_overlayand only ran as unreachable fallbacks.App.show_helpflag, theHistorySearchstruct, and the parallel "open legacy for backwards compat" state-mirroring in every key handler. The overlay structs are now the single source of truth.Welcome box width capped (P2 #13)
WELCOME_BOX_MAX_WIDTH = 120keeps the welcome box from stretching edge-to-edge on very wide terminals.Familiar idle animations + per-familiar eye palette (P2 #12)
CompanionPose::Idle { frame }drives a ~12 s idle cycle: familiars with eyes (kitty, cody, echo) blink, the rest spark (nova's gem, charm's heart sparkle, sage's page ripple, astra's star twinkle), and every glyph sways one column for half the cycle.FamiliarPalette::from_rgbnow takes a per-familiar eye-socket tint instead of hardcoding violet-300; F2 switcher and/agentsviews stay static viaCompanionPose::Static.Typeahead source badges (P2 #9)
[context]badge alongside the existing[cmd]badge.[history]badge is now live: plain-text input surfaces up to 3 recent, deduplicated prompt-history prefix matches. They are passive — never auto-selected, so Enter still submits the typed prompt; Tab accepts the top hint.Testing
cargo test --workspace— all green (630 tui lib tests + integration suites).mascot.rs, history-suggestion population/selection rules inprompt_input.rs.cargo clippy -p claurst-tuiintroduces no new warnings;cargo fmtclean on touched crates.Closes #61
🤖 Generated with Claude Code