Skip to content

feat(tui): show the stats back shortcut - #53658

Open
maharshi365 wants to merge 4 commits into
anomalyco:v2from
maharshi365:stats-back-control
Open

maharshi365 wants to merge 4 commits into
anomalyco:v2from
maharshi365:stats-back-control

Conversation

@maharshi365

@maharshi365 maharshi365 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #53657

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an esc back shortcut hint to /stats. Escape already returns to the previous screen, but nothing on the page tells users that.

The hint is not clickable. It sits below the scroll area with the home footer's right and bottom spacing. Setting minHeight={0} on the scroll area keeps it from pushing the hint off-screen in short terminals.

How did you verify your code works?

  • From packages/tui: bun test test/stats.view.test.tsx --timeout 30000 and bun typecheck passed.
  • The test checks the hint and Escape navigation after both failed and successful requests, plus placement at 40×18 and 120×42.
  • Root bun run check passed through the pre-push hook, with existing lint warnings.

Screenshots / recordings

Stats screen showing the new hint at the bottom-right:

Stats screen with the esc back hint

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Show a clickable esc back footer outside the stats scroll area so users can discover how to return to their previous screen. Keep it available during loading, success, and error states.

Update the stats view regression test to require the back hint on loaded and error screens while preserving Escape navigation coverage.

Refs anomalyco#53657
Match the home footer spacing with a blank bottom row. Let the stats scroll area shrink so its content cannot displace the back control below the screen.

Verify bottom-right placement at narrow and wide terminal sizes and exercise click-to-return alongside the existing Escape navigation check.
@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Remove the mouse handler and use muted text for the Escape shortcut hint. Restore keyboard navigation in the success-state regression test while keeping visibility and placement coverage.
@maharshi365 maharshi365 changed the title feat(tui): add a visible stats back control feat(tui): show the stats back shortcut Oct 7, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Update the PR branch with upstream v2 while retaining only the stats shortcut hint and its regression coverage as the PR changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant