Skip to content

[codex] add operator console ops summary - #126

Merged
nutt-adam merged 2 commits into
codex/agent-ops-activationfrom
codex/operator-console
May 4, 2026
Merged

[codex] add operator console ops summary#126
nutt-adam merged 2 commits into
codex/agent-ops-activationfrom
codex/operator-console

Conversation

@nutt-adam

@nutt-adam nutt-adam commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a read-only /v1/ops endpoint that summarizes SDLC run ledger state, step intents, review/gate status, blockers, artifacts, and next actions
  • render an operator console beneath the factory floor with run cards, review/gate pills, blocker messages, and recent ops events
  • document /v1/ops and point the operator debugging guide at the dashboard-first workflow

Validation

  • cargo fmt --check
  • cargo check
  • cargo test ops_ --quiet
  • cargo test --quiet
  • cargo clippy --all-targets --all-features -- -D warnings
  • git diff --check
  • node --check dashboard/app.js
  • local serve smoke: curl -fsS http://127.0.0.1:4050/v1/ops and curl -fsS http://127.0.0.1:4050/

Notes

Summary by CodeRabbit

  • New Features

    • Added an operator console to the dashboard displaying active runs, blockers, captured artifacts, and next actions
    • Introduced /v1/ops API endpoint providing operator console summary data
    • Dashboard operator console auto-refreshes every 15 seconds
  • Documentation

    • Updated API documentation with /v1/ops endpoint
    • Updated operator debugging guide with dashboard setup instructions

@nutt-adam
nutt-adam marked this pull request as ready for review May 4, 2026 08:10
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5d47976c-4ac8-4dda-bfda-170735f27601

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces an operator console feature comprising a new /v1/ops backend endpoint that aggregates SDLC run state and control events, paired with a new dashboard UI section displaying operator-relevant run summaries, blockers, artifacts, and recent events. Documentation and a health module assertion are updated.

Changes

Operator Console Feature

Layer / File(s) Summary
Backend API & Data Aggregation
src/cli/serve.rs
New /v1/ops endpoint and helper functions (ops_data, ops_run_row, ops_stage, ops_blocker, ops_next_action, etc.) aggregate SDLC run ledgers across workspaces to compute run state, stage, blockers, artifacts, and derive next-action guidance; includes unit tests for ops_next_action and ops_gate_state logic.
UI Structure
dashboard/index.html
Adds <section id="operator-console"> with nested containers for ops summary (#ops-summary), runs (#ops-runs), and events (#ops-events).
Styling
dashboard/style.css
Logo letter-spacing adjusted; extensive new rules for operator console layout, component styling (chips, pills, run cards, event lists), status-variant colors (ok/warn/danger), and mobile-responsive overrides (single-column grids, top-border events).
Frontend Logic & Integration
dashboard/app.js
Adds appState.ops and DOM element references; implements fetchOps() to call /v1/ops, renderOperatorConsole() to populate UI, and helper renderers (renderOpsRun, opsChip, opsStatePill, etc.); wires periodic 15s refresh on startup and hides/restores console during focus mode.
Documentation & Tests
README.md, docs/OPERATOR_DEBUGGING.md
Documents /v1/ops endpoint in read routes list; updates operator debugging guide to reference dashboard and console capabilities.
Supporting Changes
src/health/mod.rs
Replaces runtime unit test working_consecutive_threshold_is_at_least_two with compile-time assert!(WORKING_STATUS_CONSECUTIVE_THRESHOLD >= 2).

Sequence Diagram

sequenceDiagram
    participant Dashboard as Dashboard (app.js)
    participant API as Server (/v1/ops)
    participant Ledgers as SDLC Ledgers
    participant Events as Control Events

    Dashboard->>API: GET /v1/ops
    API->>Ledgers: Load active runs & steps
    Ledgers-->>API: Run intent data
    API->>Events: Fetch recent control events
    Events-->>API: Event list (capped)
    API->>API: Compute state, stage, blockers,<br/>artifacts, next_action
    API-->>Dashboard: ops.summary JSON
    Dashboard->>Dashboard: renderOperatorConsole()
    Dashboard->>Dashboard: Render run cards, events, summary
    Note over Dashboard: Refresh every 15s
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly Related PRs

Suggested Reviewers

  • wren-nutthouse

Poem

🐰 A dashboard bloom, where runs align,
Blockers gleam, and next-steps shine,
Console shows the path ahead,
Twenty seconds, data spread,
Ops now see the garden's thread! 🌱

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required versioning checklist items (Cargo.toml version update, CHANGELOG.md update, SemVer choice selection, and version number) as specified in the repository template. Complete the Versioning section by updating Cargo.toml version, CHANGELOG.md, selecting a SemVer level (likely MINOR for new capability), and specifying the version number.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding an operator console feature with ops summary functionality across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/operator-console

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 and usage tips.

@nutt-adam

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nutt-adam

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@dashboard/app.js`:
- Around line 546-555: The catch branch of fetchOps leaves appState.ops
unchanged on error, causing stale operator UI; update the catch in fetchOps to
clear the snapshot by setting appState.ops = null and then call
renderOperatorConsole() (and keep the console.warn) so the UI reflects the
failure instead of showing old blockers/review/gate state; ensure these changes
are made in the fetchOps function referencing appState.ops and
renderOperatorConsole.

In `@src/cli/serve.rs`:
- Around line 1286-1293: The /v1/ops payload is sending large unused fields;
update the serialization to only emit fields the dashboard reads by removing the
heavy fields: stop including recent_events[].data when building recent_events
(see the recent_events.push block) and remove runs[].steps from the runs
serialization (the code that constructs runs for the response). Ensure the
response still contains workspace, event, agent, timestamp, correlation_id, and
any minimal run metadata the dashboard needs, but omit the full data and steps
blobs to cut I/O, serialization, and network overhead.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 04e831f7-8af6-4f94-b707-56633ac334d1

📥 Commits

Reviewing files that changed from the base of the PR and between 1bec18a and 7fcf546.

📒 Files selected for processing (7)
  • README.md
  • dashboard/app.js
  • dashboard/index.html
  • dashboard/style.css
  • docs/OPERATOR_DEBUGGING.md
  • src/cli/serve.rs
  • src/health/mod.rs

Comment thread dashboard/app.js
Comment thread src/cli/serve.rs
@nutt-adam

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nutt-adam
nutt-adam merged commit 33270b0 into codex/agent-ops-activation May 4, 2026
1 check passed
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