-
Notifications
You must be signed in to change notification settings - Fork 0
v0.9.x: port REPL output::*/splash::* through RoomSink #327
Copy link
Copy link
Open
Labels
area:clicr command surfacecr command surfacearea:consoleConsole snapshot, control surface, and dashboard data planeConsole snapshot, control surface, and dashboard data planearea:conversationPublic transcript, host conversation, and internal delegation visibilityPublic transcript, host conversation, and internal delegation visibilityarea:tuiFull-screen terminal UI and ratatui consoleFull-screen terminal UI and ratatui consolecodex-readyCodex may pick up autonomouslyCodex may pick up autonomouslyenhancementNew feature or requestNew feature or requestpriority:highTruth-in-advertising or locked-spec gapTruth-in-advertising or locked-spec gapsize:M1-3 days1-3 daysstatus:readyReady to be picked upReady to be picked up
Metadata
Metadata
Assignees
Labels
area:clicr command surfacecr command surfacearea:consoleConsole snapshot, control surface, and dashboard data planeConsole snapshot, control surface, and dashboard data planearea:conversationPublic transcript, host conversation, and internal delegation visibilityPublic transcript, host conversation, and internal delegation visibilityarea:tuiFull-screen terminal UI and ratatui consoleFull-screen terminal UI and ratatui consolecodex-readyCodex may pick up autonomouslyCodex may pick up autonomouslyenhancementNew feature or requestNew feature or requestpriority:highTruth-in-advertising or locked-spec gapTruth-in-advertising or locked-spec gapsize:M1-3 days1-3 daysstatus:readyReady to be picked upReady to be picked up
Context
#326 introduced
RoomSinkand threadedArc<dyn RoomSink>through the runtime, but only routedCrepEventrendering through it. Roughly 117 stdout sites insrc/repl.rsand 67 insrc/repl/splash.rsstill calloutput::ok/warn/bad/hint/system/tool_trace,print_help, andprint_homedirectly. As long as those bypass the sink, no TUI host can render them, so the runtime can only ever be partially embedded.This issue extends
RoomEventwith the small set of variants needed to model those events and ports every call site over. Behaviour stays identical becauseStdoutSinkkeeps doing the sameoutput::*/print_homeformatting it does today.Acceptance Criteria
RoomEventgainsBanner(String)for multi-line splash/home/help output and reuses existingNotice { level, text }for one-line system notices.output::ok/warn/bad/hint/system/tool_tracecaller insrc/repl.rs,src/repl/turn.rs,src/repl/sessions.rs,src/repl/show.rs, and otherrepl/*.rsmodules now goes throughsink.emit(RoomEvent::Notice { ... }).splash::print_homeandsplash::print_helpeither go throughsink.emit(RoomEvent::Banner(...))or are refactored to returnStringthat the caller emits.StdoutSink::emitforNoticeandBannerproduces byte-for-byte identical output to the legacy direct print path (verified by tests that compare the rendered string).StdoutSinkproduces the same string the legacyoutput::ok/warn/bad/hint/systemproduces.cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --all-features --lockedall pass.Required Evidence
output::*/splash::print_home/splash::print_helpcaller in the REPL paths routed through the sink.src/repl/confirming no directoutput::*calls remain inside the runtime (diagnostic and slash-command paths excepted if explicitly scoped).StdoutSinkbyte-for-byte parity for the new variants.Non-goals
work::render_card,status::StatusRegion, orpermission_prompt::*— tracked in separate issues so this work can run in parallel.TuiSinkor any ratatui-side renderer.cr startdisplays — output must remain byte-for-byte identical.Tracker Update Required
The completing PR must list which
RoomEventvariants were added, the count of migrated call sites, and confirmcr startoutput parity.