Skip to content

Commit aaea3d5

Browse files
committed
Show the slow resource caption's message in normal text
The dim caption was hard to see. The message is the line to read, so it is normal text now; the connector and the command stay dim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016QnBk4RvQciZeR9jSeEZnf
1 parent 6c3fef5 commit aaea3d5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Parse → TemplateExpander.expand() → PluginManager.initialize() → os/distro
287287

288288
- **`ctx.commandStarted(RunningCommand)`** prints `Running command: ...` (always shown) and emits `Event.COMMAND_STARTED`. Sent by `PluginProcess` for plugin commands (keys `<plugin>:<id>`) and by `spawn.ts` for the sudo / `stdin` commands the CLI runs for plugins (keys `cli:<uuid>`, their output goes through `ctx.pluginStdout` too).
289289
- **`CommandOutputMonitor`** (`src/plugins/command-output-monitor.ts`) forwards plugin stdout to `Event.OUTPUT` in verbose mode (`--verbose` or `v`) and while the user is attached to a command. Otherwise it keeps the last 20 lines of the resource being applied (`PluginManager.apply` → `watch(id)` / `finish()`).
290-
- **Slow resources**: after 60s (`SLOW_RESOURCE_AFTER_MS`), or when the output stops for 15s (`PROMPT_IDLE_MS`) on a prompt-like line (`isPromptLike`) while a command runs, it publishes `Event.SLOW_RESOURCE` (`SlowResourceState`: command, last lines, `waitingForInput`; null when the resource finishes). Not while a command has the terminal (`hasTerminal`, `stdin: true`). It is a preview, not a warning (some resources just take a while): the Default reporter shows the last 5 lines (`PREVIEW_LINES`) dim under the resource's row, with a caption (`SlowResourcePreview` in `progress-display.tsx`, `store.slowResource`), redrawn in place and printing nothing permanent. Only the waiting-for-input caption is yellow. The Plain reporter prints the lines once and a heartbeat every 2 minutes.
290+
- **Slow resources**: after 60s (`SLOW_RESOURCE_AFTER_MS`), or when the output stops for 15s (`PROMPT_IDLE_MS`) on a prompt-like line (`isPromptLike`) while a command runs, it publishes `Event.SLOW_RESOURCE` (`SlowResourceState`: command, last lines, `waitingForInput`; null when the resource finishes). Not while a command has the terminal (`hasTerminal`, `stdin: true`). It is a preview, not a warning (some resources just take a while): the Default reporter shows the last 5 lines (`PREVIEW_LINES`) dim under the resource's row, with a caption (message in normal text, command dim) (`SlowResourcePreview` in `progress-display.tsx`, `store.slowResource`), redrawn in place and printing nothing permanent. Only the waiting-for-input caption is yellow. The Plain reporter prints the lines once and a heartbeat every 2 minutes.
291291
- **`[i] Interact`** (`DefaultReporter.attachToCommand`): hands the terminal over (`setRawMode`), prints a banner and the last lines, sends keystrokes to the command (`RunningCommand.write` → `commandInput` IPC or the CLI's own pty) and shows its output raw, until Ctrl+] or the command finishes. Ctrl+C goes to the command. **`[x] Stop`**: `RunningCommand.stop` (`commandStop`, or `stopPtyCommand`: Ctrl+C, then SIGHUP, then SIGKILL). The resource fails like any failed command; a command killed by a signal exits with 128 + n.
292292
- **Durations**: `PluginManager.apply` measures each resource (`ApplyResultEntry.durationMs`, not for skipped ones) and the whole apply (`ApplyResult.durationMs`). The progress view shows them dim on resource rows (live timer on the running one) and the summaries in a column, formatted by `formatDuration` (`src/utils/duration.ts`). Also in the Json reporter and the agent's `codify_apply` result.
293293
- Old plugins (no events) keep working: the `v` toggle still sends `setVerbosityLevel`, but their commands can't be named, typed into or stopped.

‎src/ui/components/progress/progress-display.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export function SlowResourcePreview(props: { state: SlowResourceState }) {
154154
caption = <Text color="yellow" wrap="truncate-end">╰ Looks like it's waiting for input{action}{command ? ` · ${command}` : ''}</Text>;
155155
} else {
156156
// The command comes last: long commands are cut, not the message
157-
caption = <Text dimColor wrap="truncate-end">╰ Taking a while, here's what it's doing{command ? ` · ${command}` : ''}</Text>;
157+
// The message is the line to read (normal text); the connector and the command are details (dim)
158+
caption = <Text wrap="truncate-end"><Text dimColor>╰ </Text>Taking a while, here's what it's doing<Text dimColor>{command ? ` · ${command}` : ''}</Text></Text>;
158159
}
159160

160161
return <Box flexDirection="column" marginLeft={2}>

0 commit comments

Comments
 (0)