Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ members = [
"crates/paddleboard_credentials_provider",
"crates/paddleboard_env_vars",
"crates/paddleboard_sandbox_prereqs",
"crates/paddleboard_sandbox_prereqs_ui",
"crates/zeta_prompt",
"crates/zlog",
"crates/zlog_settings",
Expand Down Expand Up @@ -479,6 +480,7 @@ paddleboard_actions = { path = "crates/paddleboard_actions" }
paddleboard_credentials_provider = { path = "crates/paddleboard_credentials_provider" }
paddleboard_env_vars = { path = "crates/paddleboard_env_vars" }
paddleboard_sandbox_prereqs = { path = "crates/paddleboard_sandbox_prereqs" }
paddleboard_sandbox_prereqs_ui = { path = "crates/paddleboard_sandbox_prereqs_ui" }
edit_prediction = { path = "crates/edit_prediction" }
zeta_prompt = { path = "crates/zeta_prompt" }
zlog = { path = "crates/zlog" }
Expand Down
8 changes: 8 additions & 0 deletions RECAPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Running log of completed work sessions, newest first. Each entry summarizes a co

## 2026-05-14

### Sandbox prerequisites UI (PR-B: visibility unit)
- New crate `paddleboard_sandbox_prereqs_ui` (~350 lines) layered on PR-A's data layer. Three pieces in one file: `SandboxPrereqs` (a `gpui::Global` holding the latest `SandboxStatus` + a `refreshing` flag), `SandboxStatusItem` (status-bar entry — colored shield icon), `SandboxPrereqsModal` (full install-guidance UI with per-step Copy buttons + Refresh).
- Async-to-GPUI bridge uses `gpui_tokio::Tokio::spawn(cx, async { check().await })`. The probe runs on tokio's pool (needed for `tokio::process::Command`); the result is written back to the global via `cx.update_global` on the foreground thread, which automatically notifies observers so the status bar + modal re-render.
- Severity model: `Unknown` while initial probe is in flight, `Ok` when podman + gVisor are both satisfied (or gVisor inapplicable on Windows), `Warning` when podman is ready but gVisor isn't configured, `Error` when podman is missing or unreachable.
- Wire-up: `paddleboard_sandbox_prereqs_ui::init(cx)` in `paddleboard/src/main.rs` right after `gpui_tokio::init` — registers the global, kicks off the first probe, and `cx.observe_new` wires the `paddleboard::OpenSandboxPrereqs` action into every workspace as it opens. Status item is registered in `paddleboard/src/zed.rs`'s `initialize_workspace`, tagged with two `// PaddleBoard:` markers (declaration site + status_bar.add_right_item).
- v0.1 followup (PR-C, future session): tool gating + settings (`sandbox.on_missing_runtime`: block / fall-back-to-host / warn-once) — the enforcement unit, requires editing three tool entry points (sandbox_tool, sandbox_service_tool, sandboxed_stdio_transport).
- Verified: `cargo check -p paddleboard` clean; `./script/clippy -p paddleboard_sandbox_prereqs_ui -p paddleboard_sandbox_prereqs` clean. The pre-existing `llm_picker` clippy failure on `main` is unrelated.

### Sandbox prerequisites detection (PR-A of two)
- New crate `paddleboard_sandbox_prereqs` with `check() -> SandboxStatus`. Probes `podman --version`, `podman info --format json`, and parses the JSON for `host.ociRuntimes.runsc`. Each probe is timeout-bounded (2s) so a stuck `podman machine` cannot stall startup.
- Three variants per dimension: `PodmanStatus` (Missing / InstalledNotRunning / Ready) and `GvisorStatus` (Available / NotConfigured / NotApplicable / Unknown). On macOS the InstalledNotRunning state is the common case when `podman machine` is stopped.
Expand Down
1 change: 1 addition & 0 deletions crates/paddleboard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ workspace.workspace = true
paddleboard_actions.workspace = true
paddleboard_env_vars.workspace = true
paddleboard_sandbox_prereqs.workspace = true
paddleboard_sandbox_prereqs_ui.workspace = true
tokio = { workspace = true, features = ["rt"] }
zlog.workspace = true
zlog_settings.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/paddleboard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ fn main() {

release_channel::init(app_version, cx);
gpui_tokio::init(cx);
paddleboard_sandbox_prereqs_ui::init(cx);
if let Some(app_commit_sha) = app_commit_sha {
AppCommitSha::set_global(app_commit_sha, cx);
}
Expand Down
5 changes: 5 additions & 0 deletions crates/paddleboard/src/zed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut App) {

let cursor_position =
cx.new(|_| go_to_line::cursor_position::CursorPosition::new(workspace));
// PaddleBoard: surface sandbox prerequisites (Podman + gVisor) in the status bar.
let sandbox_status_item =
cx.new(paddleboard_sandbox_prereqs_ui::SandboxStatusItem::new);
let line_ending_indicator =
cx.new(|_| line_ending_selector::LineEndingIndicator::default());
let merge_conflict_indicator =
Expand All @@ -521,6 +524,8 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut App) {
status_bar.add_right_item(vim_mode_indicator, window, cx);
status_bar.add_right_item(cursor_position, window, cx);
status_bar.add_right_item(image_info, window, cx);
// PaddleBoard: sandbox prerequisites indicator (Podman + gVisor).
status_bar.add_right_item(sandbox_status_item, window, cx);
});

let panels_task = initialize_panels(window, cx);
Expand Down
20 changes: 20 additions & 0 deletions crates/paddleboard_sandbox_prereqs_ui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "paddleboard_sandbox_prereqs_ui"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"

[lints]
workspace = true

[lib]
path = "src/paddleboard_sandbox_prereqs_ui.rs"

[dependencies]
gpui.workspace = true
gpui_tokio.workspace = true
menu.workspace = true
paddleboard_sandbox_prereqs.workspace = true
ui.workspace = true
workspace.workspace = true
Loading