Skip to content

feat: land operator console on main - #127

Merged
nutt-adam merged 5 commits into
mainfrom
codex/agent-ops-activation
May 4, 2026
Merged

feat: land operator console on main#127
nutt-adam merged 5 commits into
mainfrom
codex/agent-ops-activation

Conversation

@nutt-adam

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

Copy link
Copy Markdown
Contributor

Summary

  • land the operator console changes from merged PR [codex] add operator console ops summary #126 onto main
  • expose /v1/ops and dashboard operator state for active SDLC runs
  • include the CodeRabbit feedback fixes already merged into the stacked branch

Validation

  • previously validated on codex/operator-console with cargo fmt --check, cargo test --quiet, cargo clippy --all-targets --all-features -- -D warnings, node --check dashboard/app.js, git diff --check, and local dashboard smoke checks

Notes

PR #126 was merged into the stacked branch codex/agent-ops-activation after PR #125 landed on main, so this PR carries that merged branch tip back to main.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added operator console view to the dashboard displaying active runs summary, merge-gate state, blockers, and recent events
    • Introduced /v1/ops endpoint for retrieving operator console data
  • Documentation

    • Updated operator debugging guide with operator console information

nutt-adam added 3 commits May 4, 2026 16:30
* feat: add operator console ops summary

* fix: address operator console review feedback
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@nutt-adam has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 19 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 09b7abc5-fc0d-4b8e-86b2-2437f2c253db

📥 Commits

Reviewing files that changed from the base of the PR and between df38da2 and e85badb.

📒 Files selected for processing (3)
  • dashboard/app.js
  • dashboard/style.css
  • src/cli/serve.rs
📝 Walkthrough

Walkthrough

A new /v1/ops endpoint is added to serve aggregated SDLC run and control event data. The dashboard displays this via a new operator console UI showing active runs, merge-gate state, blockers, and next required actions. Boot sequence now waits for and periodically refreshes ops data.

Changes

Operator Console Feature

Layer / File(s) Summary
API Endpoint & Data Model
src/cli/serve.rs
New GET /v1/ops endpoint returns aggregated operator console data. ops_data() function builds per-run summaries including stage, state, blockers, artifacts, and next action guidance via helpers like ops_gate_state(), ops_review_state(), ops_next_action(), and ops_latest_artifact().
Backend Unit Tests
src/cli/serve.rs, src/health/mod.rs
New tests verify ops_next_action prioritization of failed steps and ops_gate_state marking of ReadyToMerge. Compile-time assertion replaces runtime test for WORKING_STATUS_CONSECUTIVE_THRESHOLD >= 2.
HTML Structure
dashboard/index.html
New <section id="operator-console"> with containers for summary chips, active runs list, and event log; placed before the detail drawer.
Styling
dashboard/style.css
Operator console layout, run cards, state pills, and event list styles added. Logo letter-spacing normalized. Mobile responsive rules adjust padding and switch grid layouts for smaller screens.
Frontend Logic
dashboard/app.js
appState.ops field stores operator data. New functions fetchOps(), renderOperatorConsole(), opsChip(), renderOpsRun(), opsStatePill(), and classification helpers wire fetching and rendering. Startup uses Promise.all([reconstructRuns(), fetchOps()]) and adds 15-second periodic refresh interval. Focus mode toggles operator console visibility.
Documentation
README.md, docs/OPERATOR_DEBUGGING.md
/v1/ops endpoint documented in API list. Debugging guide updated to reference operator console summary as a starting point for finding failed runs.

Sequence Diagram

sequenceDiagram
    participant Dashboard as Dashboard UI
    participant Server as tt serve<br/>/v1/ops
    participant Ledger as SDLC Run Ledger<br/>& Events

    Dashboard->>Server: GET /v1/ops (periodic, 15s)
    Server->>Ledger: Query active runs & recent events
    Ledger-->>Server: Run states, stages, artifacts, blockers
    Server->>Server: Compute next actions, gate states, review states
    Server-->>Dashboard: ops { summary, runs[], recent_events[] }
    Dashboard->>Dashboard: Render operator console<br/>(chips, run cards, event log)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A console for ops, with runs on display,
Blockers and artifacts lighting the way!
🐰 Hops through the ledger, fetches with glee,
Every 15 seconds, refresh as can be! 🚀
The operator's delight, at last we agree.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required sections (Versioning with checkboxes and SemVer choice) and does not address version/release management as mandated by the template. Complete the Versioning section by checking appropriate boxes, specify a SemVer choice (PATCH/MINOR/MAJOR), update Cargo.toml version, and add/update CHANGELOG.md entries.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: landing operator console changes onto the main branch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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/agent-ops-activation

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
Review rate limit: 0/1 reviews remaining, refill in 25 minutes and 19 seconds.

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: 3

🤖 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-558: The catch path in fetchOps currently wipes appState.ops
and makes renderOperatorConsole display "loading…" on failures; instead
introduce and use a distinct error state (e.g., appState.opsError) in fetchOps:
on successful fetch clear appState.opsError and set appState.ops from json.data,
and on any failure set appState.opsError to the Error/response status (do not
overwrite appState.ops to null unless you want to explicitly clear data), then
call renderOperatorConsole; update renderOperatorConsole to check
appState.opsError and render an explicit error/unauthorized message when present
(fall back to loading only when ops is undefined and opsError is not set).
- Around line 588-600: The UI drops workspace info from ops payloads; update the
run meta row and the events list to surface workspace by reading run.workspace
and evt.workspace from the ops object and inserting them as a distinct element
(e.g., el("span", "evt-workspace" / "run-workspace", workspace)) alongside
existing meta spans. Specifically, in the run rendering code that builds the run
meta row (the place that appends span elements like el("span", "run-...")), add
a span for run.workspace; and in the events loop that creates li and appends
el("span", "evt-type"), insert a workspace span for evt.workspace (use a CSS
class like "evt-workspace") before or after the agent span so multi-workspace
entries are unambiguous. Ensure you handle missing workspace values gracefully
(fallback to empty string or "workspace").

In `@src/cli/serve.rs`:
- Around line 1410-1474: The helpers ops_review_state and ops_gate_state are
using the full history of WorkflowStepIntentRecord
(state::WorkflowStepIntentRecord) instead of the latest attempt, so stale failed
attempts can keep the ops state blocked; fix by first normalizing the steps
slice to one record per logical step keyed by step_type (or other unique step
id) selecting the record with the highest attempt value (use the attempt field
on WorkflowStepIntentRecord), then compute failed/pending/complete from that
deduped/latest-record set in ops_review_state and ops_gate_state; update or add
a resumed-run regression test that inserts a retried step (older failed attempt
then newer successful attempt) to assert review/gate/next_action become
unblocked.
🪄 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: 91cf243a-fb66-4d3e-bc9a-1fe3fd37c0c5

📥 Commits

Reviewing files that changed from the base of the PR and between e2307fd and df38da2.

📒 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 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 ddff3d4 into main May 4, 2026
11 checks passed
@nutt-adam
nutt-adam deleted the codex/agent-ops-activation branch May 4, 2026 21:43
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