Skip to content

feat(ide): daemon-served Build Progress page + fbuild build-progress (#1076 Phase 2) - #1202

Merged
zackees merged 1 commit into
mainfrom
feat/1076-phase2-build-progress
Jul 28, 2026
Merged

feat(ide): daemon-served Build Progress page + fbuild build-progress (#1076 Phase 2)#1202
zackees merged 1 commit into
mainfrom
feat/1076-phase2-build-progress

Conversation

@zackees

@zackeeszackees commented Jul 28, 2026

Copy link
Copy Markdown
Member

Second Phase 2 panel of the corrected #1076 plan.

Observability reality (investigated before designing): per-build compiler output streams over POST /api/build's NDJSON body via a per-request channel — initiator-owned, not observable by other clients. The daemon's /ws/logs (BroadcastHub) however fans out every tracing event — including build-lifecycle activity — to all subscribers, and GET /api/daemon/info exposes daemon_state/current_operation/dependency_install. The page therefore uses only existing, unmodified endpoints: a 2 s /api/daemon/info status poll (pulsing state dot, operation + dependency-install lines) plus a /ws/logs activity pane (monospace, autoscroll toggle, clear). Self-contained embedded HTML, light/dark, no external assets.

Validation (local)

  • soldr cargo test -p fbuild-cli → 249 passed; -p fbuild-daemon → 210 passed (+ route/URL/CLI-shape tests); clippy -D warnings clean; fmt clean; full bash test before merge.

Part of #1076 (Phase 2).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a Build Progress web page showing daemon status, current activity, and live logs.
    • Added the fbuild build-progress command, which opens the page in the default browser.
    • Added a matching “Build Progress” task to generated Zed IDE tasks.
  • Documentation

    • Updated CLI and command reference documentation with usage details and page behavior.

…1076 Phase 2)
- GET /build-progress serves a self-contained embedded page (plotter
pattern): status header polling /api/daemon/info (state, current
operation, dependency install), activity pane attached to the
existing /ws/logs BroadcastHub fan-out, autoscroll/clear, light+dark,
zero external assets. Consumes only existing endpoints — per-request
NDJSON build output remains initiator-owned.
- New `fbuild build-progress` opener command; `fbuild ide` emits a
"fbuild: Build Progress" task running it.
Part of #1076 (Phase 2, second panel).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a self-contained daemon-served Build Progress page with status polling and live logs, exposes it through fbuild build-progress, integrates it into generated Zed tasks, and documents the new command and page behavior.

Changes

Build Progress

Layer / File(s)Summary
Daemon route and embedded page
crates/fbuild-daemon/src/handlers/*, crates/fbuild-daemon/src/main.rs, crates/fbuild-daemon/web/build-progress/*, crates/fbuild-daemon/tests/*
Serves the embedded /build-progress HTML page, which polls /api/daemon/info and streams logs from /ws/logs; route and self-contained asset behavior are tested.
CLI command and IDE task
crates/fbuild-cli/src/cli/args.rs, crates/fbuild-cli/src/cli/build_progress.rs, crates/fbuild-cli/src/cli/dispatch.rs, crates/fbuild-cli/src/cli/ide.rs, crates/fbuild-cli/src/cli/tests.rs
Adds command parsing, argument rewriting, daemon startup and browser opening, dispatch wiring, URL construction, unit tests, and a matching Zed task.
Command and page documentation
agents/docs/commands-reference.md, docs/reference/cli.md
Documents the command, daemon endpoints, page behavior, and generated Zed task ownership.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant FbuildCLI
participant Daemon
participant Browser
User->>FbuildCLI: Run fbuild build-progress
FbuildCLI->>Daemon: Ensure daemon is running
Daemon-->>FbuildCLI: Return base URL
FbuildCLI->>Browser: Open /build-progress
Browser->>Daemon: Poll /api/daemon/info
Browser->>Daemon: Connect /ws/logs
Daemon-->>Browser: Return status and live log events
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the main change: a daemon-served Build Progress page plus the new fbuild build-progress command.
Docstring Coverage✅ PassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1076-phase2-build-progress

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/fbuild-daemon/tests/test_build_progress_route.rs`:
- Around line 14-16: Refactor the production router construction in main.rs into
a reusable helper, then update build_test_app in test_build_progress_route.rs to
use that helper instead of registering /build-progress directly. Preserve the
existing production route configuration while ensuring the integration test
exercises the same router setup used by the application.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b7382d92-b9de-416f-a70a-d2a688b80427

📥 Commits

Reviewing files that changed from the base of the PR and between 95b4785 and e383f6f.

📒 Files selected for processing (14)
  • agents/docs/commands-reference.md
  • crates/fbuild-cli/src/cli/args.rs
  • crates/fbuild-cli/src/cli/build_progress.rs
  • crates/fbuild-cli/src/cli/dispatch.rs
  • crates/fbuild-cli/src/cli/ide.rs
  • crates/fbuild-cli/src/cli/mod.rs
  • crates/fbuild-cli/src/cli/tests.rs
  • crates/fbuild-daemon/src/handlers/build_progress.rs
  • crates/fbuild-daemon/src/handlers/mod.rs
  • crates/fbuild-daemon/src/main.rs
  • crates/fbuild-daemon/tests/test_build_progress_route.rs
  • crates/fbuild-daemon/web/build-progress/README.md
  • crates/fbuild-daemon/web/build-progress/index.html
  • docs/reference/cli.md

Comment on lines +14 to +16
fn build_test_app() -> Router {
Router::new().route("/build-progress", get(build_progress::build_progress_page))
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Exercise the production router in this integration test.

build_test_app() registers /build-progress independently, so the test remains green if crates/fbuild-daemon/src/main.rs removes or misconfigures the production route. Factor router construction into a reusable production helper and test that instead.

🤖 Prompt for 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.
In `@crates/fbuild-daemon/tests/test_build_progress_route.rs` around lines 14 -
16, Refactor the production router construction in main.rs into a reusable
helper, then update build_test_app in test_build_progress_route.rs to use that
helper instead of registering /build-progress directly. Preserve the existing
production route configuration while ensuring the integration test exercises the
same router setup used by the application.

@zackees
zackees merged commit ff08029 into mainJul 28, 2026
87 of 93 checks passed
@zackees
zackees deleted the feat/1076-phase2-build-progress branch July 28, 2026 00:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant

@zackees