Skip to content

feat(tui): Help screen and keyboard shortcut reference overlay#453

Open
jaeko44 wants to merge 11 commits intomainfrom
task/eb0893c6b815-feat-tui-help-screen-and-keyboard-shortcut-refer
Open

feat(tui): Help screen and keyboard shortcut reference overlay#453
jaeko44 wants to merge 11 commits intomainfrom
task/eb0893c6b815-feat-tui-help-screen-and-keyboard-shortcut-refer

Conversation

@jaeko44
Copy link
Copy Markdown
Member

@jaeko44 jaeko44 commented Mar 26, 2026

Task-ID: eb0893c6-b815-4699-b19b-0504e2016917\n\nAutomated PR for task eb0893c6-b815-4699-b19b-0504e2016917\n\n---\n\nBosun-Origin: created

Copilot AI review requested due to automatic review settings March 26, 2026 09:22
@jaeko44 jaeko44 added the bosun-attached Bosun PR attachment marker label Mar 26, 2026
@github-actions github-actions bot added the bosun-pr-public PR observed by Bosun but not trusted for high-risk automation label Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a TUI help/keyboard-shortcuts overlay and replaces per-screen inline shortcut footers with a centralized, dynamic footer-hints system.

Changes:

  • Introduces ui/tui/HelpScreen.js (shortcut groups, help overlay UI, and getFooterHints()).
  • Updates Tasks/Agents screens to publish footer hints via onFooterHintsChange instead of rendering their own footer blocks.
  • Adds help overlay + footer rendering to both UI TUI (ui/tui/App.js) and CLI TUI (tui/app.mjs), and updates tests/harness accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ui/tui/TasksScreen.js Removes inline shortcut footers; emits contextual footer hints via onFooterHintsChange(getFooterHints(...)).
ui/tui/HelpScreen.js New help overlay UI + shortcut catalog + getFooterHints() helper for dynamic footer content.
ui/tui/App.js Adds help overlay toggling/scroll handling and a shared footer-hints renderer.
tui/screens/agents.mjs Removes inline footer block; emits contextual footer hints via onFooterHintsChange(getFooterHints(...)).
tui/app.mjs Adds help overlay toggling and app-level footer rendering; wires onFooterHintsChange into screens.
tests/tui/screens.test.mjs Adjusts assertions for new footer/help output; adds tests for help overlay and dynamic footer hints.
tests/tui/render-ink.mjs Adds latestText() helper to reduce multi-frame output noise in tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +62 to +66
latestText() {
const cleaned = stripAnsi(buffer).replace(/\r/g, "");
const lastIndex = cleaned.lastIndexOf("Agents:");
return lastIndex >= 0 ? cleaned.slice(lastIndex) : cleaned;
},
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

latestText() is coupled to the literal string "Agents:" (from StatusHeader row1). This makes the test harness brittle to unrelated header text changes. Consider deriving the “latest frame” boundary from Ink’s clear-screen sequences in the raw buffer, or introducing an explicit frame delimiter, instead of hardcoding a header substring.

Copilot uses AI. Check for mistakes.
Comment on lines +204 to +216
if (helpOpen) {
if (key?.escape) {
setHelpOpen(false);
return;
}
if (key?.upArrow) {
setHelpScrollOffset((current) => Math.max(0, current - 1));
return;
}
if (key?.downArrow) {
setHelpScrollOffset((current) => current + 1);
return;
}
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Help overlay scrolling isn’t bounded: down-arrow always increments helpScrollOffset, so it can grow beyond the number of help rows and render an empty/blank help list. Compute a max scroll offset (based on the help content + available terminal rows) and clamp both up/down updates to keep the overlay usable.

Copilot uses AI. Check for mistakes.
Comment on lines 199 to +277
@@ -233,7 +263,18 @@ export default function App({ host, port, connectOnly, initialScreen, refreshMs,
refreshMs=${refreshMs}
onTasksChange=${setTasks}
onInputCaptureChange=${setScreenInputLocked}
onFooterHintsChange=${setFooterHints}
/>
${helpOpen
? html`
<${Box} flexDirection="column" marginTop=${1}>
<${HelpScreen} scrollOffset=${helpScrollOffset} maxRows=${helpRows} />
<//>
`
: null}
<//>
<${Box} paddingX=${1}>
<${Text} dimColor>${footerText}<//>
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

When toggling help with '?', the CLI TUI doesn’t reset scroll position or override footer hints with the help-specific hints (unlike ui/tui/App.js). As a result, the footer can continue showing screen hints while the overlay is open, and reopening help may start at a stale scroll offset. Consider resetting helpScrollOffset on open/close and rendering footer hints from getFooterHints(screen, { helpOpen: true }) while help is open.

Copilot uses AI. Check for mistakes.
@jaeko44 jaeko44 added the bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair label Mar 26, 2026
jaeko44 and others added 4 commits March 26, 2026 21:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jaeko44 jaeko44 added bosun-pr-bosun-created PR created by Bosun and eligible for Bosun automation and removed bosun-pr-public PR observed by Bosun but not trusted for high-risk automation labels Mar 26, 2026
jaeko44 added 2 commits March 26, 2026 21:38
…t-tui-help-screen-and-keyboard-shortcut-refer
…screen-and-keyboard-shortcut-refer' into task/eb0893c6b815-feat-tui-help-screen-and-keyboard-shortcut-refer
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Bosun CI signal: Bosun-created PR currently has failing checks.

@github-actions github-actions bot removed the bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair label Mar 26, 2026
@github-actions github-actions bot added the bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair label Mar 26, 2026
@github-actions
Copy link
Copy Markdown

Bosun PR classification: Bosun-created.
This PR is tracked by Bosun attachment automation.

  • PR class label: bosun-pr-bosun-created
  • Attach label: bosun-attached (yes, because Bosun-created PRs remain attached regardless of human PR attach mode)
  • Attach mode policy: all
  • Trusted author: no
  • Bosun-created label present: yes
  • Automation scope: Eligible for Bosun repair and merge automation (Bosun-created PR).
  • CI failure signal label: bosun-needs-fix
  • CI failure marker:
  • Trigger: pull_request_target / synchronize

jaeko44 added 2 commits March 26, 2026 23:42
Co-authored-by: bosun-ve[bot] <262908237+bosun-ve[bot]@users.noreply.github.com>
Co-authored-by: bosun-ve[bot] <262908237+bosun-ve[bot]@users.noreply.github.com>
@jaeko44 jaeko44 enabled auto-merge March 26, 2026 15:47
@jaeko44 jaeko44 added bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair and removed bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair labels Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bosun-attached Bosun PR attachment marker bosun-needs-fix Attached PR with failing CI that Bosun should pick up for repair bosun-pr-bosun-created PR created by Bosun and eligible for Bosun automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants