Skip to content

TUI cleanup: remove legacy duplicate overlays and polish welcome box (#61)#74

Merged
BunsDev merged 1 commit into
mainfrom
worktree-issue-61-tui-cleanup
Jun 11, 2026
Merged

TUI cleanup: remove legacy duplicate overlays and polish welcome box (#61)#74
BunsDev merged 1 commit into
mainfrom
worktree-issue-61-tui-cleanup

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 11, 2026

Copy link
Copy Markdown
Member

Resolves the four items from docs/AUDIT-2026-06.md (P2 #9, #11–13) tracked in #61.

Changes

Legacy duplicate overlays removed (P2 #11)

  • Deleted render_simple_help_overlay and render_legacy_history_search from render.rs — they duplicated overlays::render_help_overlay / render_history_search_overlay and only ran as unreachable fallbacks.
  • Removed the legacy App.show_help flag, the HistorySearch struct, 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)

  • New WELCOME_BOX_MAX_WIDTH = 120 keeps the welcome box from stretching edge-to-edge on very wide terminals.

Familiar idle animations + per-familiar eye palette (P2 #12)

  • New 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_rgb now takes a per-familiar eye-socket tint instead of hardcoding violet-300; F2 switcher and /agents views stay static via CompanionPose::Static.

Typeahead source badges (P2 #9)

  • File-reference suggestions now show a [context] badge alongside the existing [cmd] badge.
  • The previously-dead [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).
  • New unit tests: idle blink/sway frame behavior in mascot.rs, history-suggestion population/selection rules in prompt_input.rs.
  • cargo clippy -p claurst-tui introduces no new warnings; cargo fmt clean on touched crates.

Closes #61

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings June 11, 2026 04:28
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jun 11, 2026 4:28am

@BunsDev BunsDev merged commit 173d1d3 into main Jun 11, 2026
2 checks passed
@BunsDev BunsDev deleted the worktree-issue-61-tui-cleanup branch June 11, 2026 04:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI cleanup: remove legacy duplicate overlays and polish welcome box

2 participants