Skip to content

feat(printer, cli): Add printer-owned status regions - #1099

Open
JeanMertz wants to merge 6 commits into
mainfrom
visible-mcp-logs
Open

feat(printer, cli): Add printer-owned status regions#1099
JeanMertz wants to merge 6 commits into
mainfrom
visible-mcp-logs

Conversation

@JeanMertz

@JeanMertz JeanMertz commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Implements RFD 091. Ephemeral terminal chrome — ⏱ Waiting… 9.2s and
the rows above it — becomes a first-class concept owned by jp_printer
rather than nine hand-rolled mechanisms scattered across jp_cli.

Every one of those nine fought the same invariant: chrome must be erased
before any persistent write, and must not disappear before that write
arrives. It was enforced by per-site discipline, and the codebase carried
the scars of getting it wrong — clear_temp_line() before the interrupt
menu, cancel_reasoning_timer() inside flush_on_transition, the
waiting indicator's finish().await ordering dance. Each was a bug fixed
at one site; none protected the next.

The printer already serializes every write through one worker thread,
which is the only place in the process where "clear chrome, then write
content" can be made atomic across stdout, stderr and /dev/tty. A
client now claims a StatusRegion, sets a detail, and drops it; the
worker draws, ticks, and erases. jp_cli::timer is deleted.

Two long-running child processes gain a live view of their progress:
an MCP server starting up, and a tool executing. Both already read their
child's stderr line by line and threw it away.

User-visible changes

  • MCP startup shows a rolling window of the starting servers' stderr
    above the timer, so a five-minute build looks like progress rather than
    a hang. On by default (style.mcp_startup.print_stderr = "auto");
    set it to false for the previous one-row timer.
  • An optional MCP server that fails to start is now reported, naming the
    server and the tools that went with it. It used to complete silently
    with the explanation only in the discarded trace log.
  • Tool execution can show the running tool's stderr the same way, off by
    default (style.tool_call.progress.print_stderr).
  • Chrome now gates on stderr's tty-ness rather than stdout's, so
    jp query 2>file no longer writes cursor-control bytes into the file.
  • Regions are disabled entirely while a tracing layer writes to stderr
    (-v, --log, --log-file=-). Worth knowing before debugging: the
    instinct to add -v when an indicator doesn't appear guarantees it
    won't. Use --log-file=<path> instead.
  • style.tool_call.preparing.show = false now suppresses the row
    entirely. It previously rendered a static row and only suppressed the
    elapsed time, which reads as an oversight rather than intent — but it
    is the one behaviour change in the stack that could surprise someone.

Document the accepted printer-owned status region design and split its
implementation into six tracked tickets. Regions will replace scattered
terminal timers and can show bounded child-process stderr during MCP
startup and tool execution.

Update maintenance recipes to read lowercase JSON fields from
`jp conversation ls`, preserving review and RFD workflow automation.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
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.

1 participant