Repository navigation
feat(cli): report ambient warnings as a footer badge - #345
Merged
Merged
Conversation
Startup diagnostics, MCP import problems and warnings raised during a turn no longer interrupt the Step transcript. The footer counts them as a warning badge, and alt+i or /warnings opens the session's list (newest first, c clears, Esc closes). The list is per session and kept in memory only. Warnings that answer the user's own input stay inline: anything published before the kernel accepts the input (a command handler, the input hooks before a turn) is treated as its reply. Every user entry point, including Shift+Tab, Alt+Enter and launch messages, now submits through promptUserInput to mark that window. The Pi presentation keeps all warnings in the transcript. Add the app.warnings.open keybinding and the /warnings command. On macOS the footer hint skips Option+letter bindings, which terminals often treat as dead keys, and offers /warnings instead.
ZouR-Ma
requested review from
MelodyVAR,
Uking-xxx and
liuedcson
as code owners
November 3, 2026 06:03
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.
Problem
The Step CLI prints every warning into the transcript as a
Warning: ...row. Most of these arrive on their own: startup diagnostics (invalid settings, skill frontmatter), MCP import problems, the tmux keyboard check, model fallback, and warnings raised during a turn. Each one pushes the conversation the user is reading further up the screen, and in a long session it scrolls away before anyone reads it.Moving all warnings out of the transcript would cause the opposite problem. Many of them answer the user's own input, for example
Usage: /cron delete <id>,Full access was not enabled., or the paused-goal reminder. Without an inline row, the command the user just ran would show no visible reply.Changes
⚠ N, at the end of the bottom line. No badge is drawn when the count is zero. On narrow lines the context readout yields first, so the badge stays visible.app.warnings.open(defaultalt+i) and a new built-in/warningscommand open the session's warning list. The list shows the newest warning first, scrolls with ↑↓, clears withcand closes with Esc. It updates while open and sizes itself to the terminal height.PromptOptions.preflightResult. Warnings published after acceptance go to the badge.promptUserInput, which marks that window. The entry points are editor submit, steering during a turn, Alt+Enter follow-ups, the Shift+Tab permission cycle and launch messages.showWarningkeeps its inline behavior, because its call sites answer user actions. A newrecordWarningis used by the startup sites listed above.alt+<letter>bindings are skipped there and the hint shows/warningsinstead.Behavior and compatibility
tuiStyle: "step") changes. The Pi presentation keeps every warning in the transcript. Errors, print/JSON/RPC/SDK modes and session files are unchanged.app.warnings.opendefaults toalt+i, which no existing default uses.alt+wwas avoided because it is bound totui.editor.cursorWordRight. It can be rebound inkeybindings.jsonlike any other action, and it is listed in/hotkeysandpackages/coding-agent/docs/keybindings.md./warnings.docs/step-goal-ui.mddescribes the badge, the list and the reply rule.Validation
On macOS (Darwin arm64), with this branch rebased on
main(fa10063):pnpm run check: passed.TMPDIR=/tmp ./test.shfrom a checkout of this commit under/tmp: passed (packages/coding-agent5164 passed / 59 skipped,apps/cli781 passed, all other packages passed).TMPDIR=/tmp ./test.shfrom a worktree under~/Documents: failed in 3 of 3 runs, each time only onpackages/coding-agent/test/suite/regressions/7253-manual-compact-during-response.test.ts. An extrathresholdcompaction ran before the requestedmanualone. See Limitations.TMPDIRadditionally failspackages/coding-agent/test/subagent-invocation.test.tswithlisten EINVAL, because the tsx IPC socket path exceeds the 104-byte Unix socket limit.TMPDIR=/tmpavoids this and was used for the runs above.main(fa10063) passedTMPDIR=/tmp ./test.shfrom both/tmpand~/Documents.apps/clitests (pnpm exec vitest --run <file>):test/footer-width.test.tscovers badge placement, the key hint, narrow widths andwarningListHint.test/interactive-mode-warning-badge.test.tscovers inline versus badge routing, the acceptance window, session scoping, live list updates and the capacity limit.test/interactive-mode-user-input-replies.test.tscovers Shift+Tab, Alt+Enter and launch messages, all submitting throughpromptUserInput.test/interactive-mode-notify-echo.test.tsandtest/suite/regressions/7829-invalid-settings-warning.test.tswere updated for the new routing.packages/coding-agent:test/keybindings.test.ts,test/keybindings-migration.test.tsandtest/step-slash-commands.test.tspassed.Limitations
7253failure above is not explained. The test asserts the outcome of a race between threshold and manual compaction (_compactForRequestand_compactBeforeNextAssistantResponseinpackages/coding-agent/src/core/agent-session.ts). This change does not touch that code: on the coding-agent side it only adds one keybinding entry and one built-in slash command entry../test.sh: 3 of 3 runs alone and 2 of 2 fullpackages/coding-agentruns. A CPU-loaded fullpackages/coding-agentrun onmaindid not reproduce it (2 of 2 passed). The failure has only been seen with this branch checked out on one local macOS machine. CI for this PR (build-check-teston ubuntu-latest:pnpm run build,pnpm run check,pnpm test) passed, and the7253test ran there as part ofpnpm test.