feat(minimald): refactor progress, display session setup on first attach - #591
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughReplaces ChangesScoped SSH channel progress rendering
Sequence Diagram(s)sequenceDiagram
participant SSHClient
participant Session
participant ChannelProgress
participant render_operations_while
participant ChannelTerm
participant pump_frames
participant AsyncWrite
SSHClient->>Session: new attachment request
Session->>ChannelProgress: new(channel, tracker, size)
ChannelProgress->>render_operations_while: root, channel_writer, size, spawn_host_fut
render_operations_while->>ChannelTerm: construct TermLike with mpsc tx
render_operations_while->>pump_frames: spawn(rx, channel_writer as AsyncWrite)
ChannelTerm-->>pump_frames: flush() sends synchronized-update ANSI frame
pump_frames-->>AsyncWrite: write+flush bytes to SSH channel
render_operations_while-->>ChannelProgress: host spawn result
ChannelProgress-->>Session: (channel, spawn_result)
Session->>Session: attach channel to running host
Session-->>SSHClient: host attached
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/minimald/src/session.rs`:
- Around line 243-261: The launcher is being created before
ChannelProgress::run, so the context/setup work done by
session_launcher(session_hnd) happens outside the rendered progress scope. Move
the session_launcher call inside the future passed to ChannelProgress::run in
session.rs so the launcher is built under the same rendering channel before
session_host::Host::spawn starts. This should keep the session_launcher,
context, and Host::spawn flow within the progress-rendered operation tree.
In `@crates/ot/Cargo.toml`:
- Line 14: The indicatif feature in Cargo.toml is missing the Tokio runtime
needed by indicatif_shim::tests using #[tokio::test(flavor = "multi_thread")].
Update the indicatif feature definition to include tokio/rt-multi-thread
alongside the existing tokio dependencies so the multi-thread test runtime is
enabled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 419495aa-5fe7-475c-a4b3-645c6245b446
📒 Files selected for processing (7)
crates/minimald/src/channel_progress.rscrates/minimald/src/lib.rscrates/minimald/src/session.rscrates/ot/Cargo.tomlcrates/ot/src/indicatif_shim.rscrates/ot/src/lib.rsdocs/specs/04-spec-ot-render-decoupling/04-spec-ot-render-decoupling.md
3dcd0b0 to
95fdc32
Compare
This will avoid the apparent hang when you first launch a session with packages that need to be downloaded or built.
Summary by CodeRabbit