Skip to content

feat(dashboard): make /bay canonical and clarify handoff telemetry - #1112

Merged
brokemac79 merged 4 commits into
mainfrom
codex/csw-124-bay-route
Aug 10, 2026
Merged

feat(dashboard): make /bay canonical and clarify handoff telemetry#1112
brokemac79 merged 4 commits into
mainfrom
codex/csw-124-bay-route

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make /bay the single canonical public OpenClaw Bay route
  • permanently redirect /bay-demo to /bay with its query string intact
  • remove the complete Live activity UI and its page-only fetch, parsing, expiry, polling, state, and styles while retaining the shared telemetry API
  • replace the uninformative Queue handoff snapshot card with pending/dispatching/leased history, a labelled trend graph, health explanation, and oldest-phase ages

Problem

The public UI advertised and served the preview-named /bay-demo route. The page also spent prominent space and a 20-second polling loop on transient Live activity signals that did not help operators. Separately, Queue handoff showed three current counts and a bare status badge in a mostly empty card, with no trend or explanation.

Removing the Live activity poll exposed an existing tide-ordering dependency: terminal nodes were committed away after 900 ms even though their visual wash transition lasts up to 1.05 s. Exact-base control proved the old page passed only with incidental scheduling slack from the unrelated activity request.

A later proof-only nondeterminism was separate: the browser assertion used Array.every() on the terminal-node set, so a delayed observation after clearing could satisfy the opacity check vacuously with zero nodes. The product had displayed the correct completion time; the harness had not atomically observed that display with the washed terminal set.

Implementation

  • /bay serves the Bay page; /bay-demo returns the repository-standard permanent 308 redirect using the original URL object, preserving search parameters.
  • Overview, Bay, issue-triage, PR-proof-triage, smoke checks, current docs, and browser proof now advertise /bay.
  • Live activity markup and all exclusive client code are removed. /api/live-activity-bay remains unchanged for shared operational consumers.
  • The normal-motion tide commits terminal removal after 1.2 s, beyond its longest 1.05 s transition; reduced-motion timing is unchanged.
  • Exact-review health history optionally persists validated handoff phase counts/status. Legacy samples remain valid; snapshots that predate phase telemetry say it is unavailable instead of advertising misleading zeroes. The card renders accessible pending, dispatching, and leased trends plus the queue-provided message/reason and oldest pending/dispatch ages.
  • The tide proof atomically requires all 20 non-empty washed nodes and Last tide 17:58 UTC in the same pre-clear state; the cleared pool cannot satisfy the wash observation.
  • The checked-in Bay proof summary, storyboard, and trace are refreshed for /bay and explicitly classified as historical evidence for their captured behavior source. Exact-final-head proof remains in this PR package. Fixture hashes describe canonical Git-tree LF bytes.

Validation

  • pnpm run build:all
  • pnpm run check:static
  • pnpm run lint:dashboard
  • pnpm run lint:scripts
  • node --test test/dashboard-operational-health.test.ts test/dashboard-worker.test.ts — 344/344 pass
  • git diff --check
  • codex review --uncommitted — clean after the expanded telemetry patch
  • codex review --base origin/main — no actionable correctness regressions
  • pnpm run review -- --local-range --target-repo openclaw/clawsweeper --base origin/mainkeep_open, high confidence, kept_open; local-only, no GitHub mutation

Real Behavior Proof

Claim: exact built head serves the canonical route and compatibility redirect, removes Live activity and its polling, preserves shared telemetry and the rest of Bay, fixes tide ordering, and renders useful handoff telemetry at desktop and narrow widths.

  • Base: 24a140e12d58437433b06527d4cc40d85b0a4e50
  • Head: 9fcfcd6532a3fcc982be22fa96cdb0e0fcd3e70d
  • Tree: a127d36d6606f0d34d8210b05bd45250ff586c84
  • Provider: direct local Docker under Martin's explicit fallback authorization; this is not a successful Crabbox lease/run receipt
  • Image: mcr.microsoft.com/playwright:v1.60.0-noble
  • Digest: sha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948
  • Canonical source: git archive from the read-only common Git object store; 845-entry ls-tree manifest and exact tree checked before execution
  • Environment: Node v24.15.0, pnpm 11.10.0
  • Container contract: frozen install; build; full static including Linux repository format; dashboard/scripts lint; 344 dashboard and operational-health tests; checked-in Wrangler/Playwright proof; real local Worker/browser boundary checker
  • Observed: 51/51 checked-in browser assertions, 23 evidence frames, zero direct GitHub API calls, zero mutating requests. Three consecutive exact-tree runs at 0cf6b147fe86f56e4ec8c77352e3d31433e3a1d2 passed the strict tide assertion; final follow-up heads also passed the complete contract.
  • Boundary: /bay loaded; /bay-demo?repo=openclaw%2Fopenclaw&q=proof returned 308 to /bay with the exact query; main/header/triage links target /bay; no Live activity DOM or /api/live-activity-bay browser request; shared API returned 200; Queue handoff graph, legend, explanation and narrow visibility passed; narrow viewport was 390px with 390px scroll width
  • Artifacts: C:\clawsweeper-work\artifacts\csw-124\canonical-docker-9fcfcd6532-final contains command log, manifests/hashes, image/container inspect, Docker events, test output, trace, report, desktop/narrow captures, and exit 0
  • Cleanup: proof container removed; no residual container by exact name; host worktree remained clean at the exact head/tree

Diagnostics retained but not treated as product failures: Crabbox leases cbx_d4edc3adb688 and cbx_8b06c0bf308b failed at rsync transport before command execution; the first direct Windows-byte copy exposed checkout CRLF normalization; one later preflight manifest file contained a PowerShell UTF-8 BOM and stopped before repository execution. The canonical Git-object runs corrected those environment issues without waiving any check.

Baseline control used exact base e13791786799f6a51a39806938847bbc48948e5e (tree 0a12323b11277566a4821f570cdfa7122bb31c4c) in the same image. Its checked-in proof passed all 51 assertions, including the tide assertion, classifying the initial head failure as a CSW-124 regression. The source-backed 1.2 s product timing fixed the initial ordering regression. The later unchanged-head pass/fail pair exposed a separate empty-set harness race; atomic state synchronization removed it without changing the semantic assertion or adding sleeps.

Stale-route scan

Repository-wide source scan leaves /bay-demo only in:

  • the intentional Worker redirect, compatibility smoke/test, and current compatibility documentation
  • immutable historical exact-SHA proof artifacts under docs/proof/csw-* and their historical READMEs/scripts

The repository-wide scan was manually classified in the proof package. Focused deterministic tests enforce the canonical Worker route, compatibility redirect, query retention, current header/navigation links, and unrelated-route behavior without pinning immutable historical artifact text.

Reconciliation

Risks and rollback

Risk is limited to public route/UI presentation and additive optional health-history fields. Old bookmarks remain compatible. Old stored history remains accepted. Rollback is the single commit; no data migration or queue/runtime policy change is required.

Non-goals

  • no production deploy or configuration/gate change
  • no queue capacity, scheduling, claim, publication, or workflow behavior change
  • no removal of the shared Live activity API
  • no broader Bay redesign

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 6:18 PM ET / 22:18 UTC.

ClawSweeper review

What this changes

This PR makes /bay the canonical OpenClaw Bay route, redirects /bay-demo permanently with its query preserved, removes the Live activity panel, and adds queue-handoff history to Bay.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR is not implemented on current main and has a coherent, proof-backed route and telemetry change; it should remain open for a maintainer decision on the public-route and UI policy.

Priority: P2
Reviewed head: 9fcfcd6532a3fcc982be22fa96cdb0e0fcd3e70d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A bounded patch with unusually detailed exact-head behavior proof; route and UI sponsorship remain a separate maintainer decision.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides detailed exact-head Docker Worker/Chromium evidence for the changed route, redirect, polling removal, handoff UI, and tide behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides detailed exact-head Docker Worker/Chromium evidence for the changed route, redirect, polling removal, handoff UI, and tide behavior.
Evidence reviewed 6 items Current-main route baseline: Current main serves the Bay document at /bay-demo; the requested canonical /bay document route is not already present.
Proposed compatibility implementation: The PR serves Bay at /bay and changes /bay-demo to a same-origin 308 redirect after replacing only the pathname, preserving query parameters.
Telemetry compatibility handling: The new history parser accepts optional handoff phases, rejects malformed stored phase data, and lets the Bay card present unavailable legacy phase telemetry without manufacturing zero values.
Findings None None.
Security None None.

How this fits together

OpenClaw Bay is ClawSweeper’s public, observer-only dashboard backed by the dashboard Worker’s cached status snapshot. The proposed route and telemetry changes affect dashboard navigation, the browser page, and the stored operational-health history rendered to operators.

flowchart LR
  A[Legacy Bay bookmarks] --> B[Compatibility redirect]
  C[Dashboard navigation] --> D[Canonical Bay page]
  B --> D
  D --> E[Dashboard status snapshot]
  E --> F[Health history]
  F --> G[Queue handoff telemetry]
  G --> H[Operator-facing Bay card]
Loading

Decision needed

Question Recommendation
Should OpenClaw Bay adopt /bay as its canonical public route and remove the Live activity panel, with /bay-demo retained only as a permanent redirect? Sponsor canonical /bay: Approve the redirect-only legacy route and the telemetry-focused Bay interface shown by this PR.

Why: The implementation and its proof are coherent, but this changes the public observer experience and route contract; VISION.md reserves product-direction taste for maintainers.

Before merge

  • Resolve merge risk (P1) - Existing consumers that require a 200 Bay document at /bay-demo rather than following redirects will see a compatibility change; the PR proves browser redirect behavior but cannot establish every external client contract.
  • Complete next step (P2) - A maintainer must choose the public Bay route and interface policy; no narrow mechanical repair remains.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch footprint 14 files; 239 added, 419 removed The net reduction primarily removes the Live activity surface while updating the route, history projection, proof, and focused tests together.
Public-route transition 1 canonical route added, 1 legacy route redirected The route change is the main compatibility decision before merge.

Merge-risk options

Maintainer options:

  1. Approve the redirect transition (recommended)
    Accept /bay-demo becoming a 308 compatibility endpoint after confirming the public route contract should require redirect-following clients.
  2. Preserve legacy document delivery
    Keep /bay-demo serving Bay content and use canonical metadata or navigation changes instead if redirect-only compatibility is not acceptable.
  3. Pause for route ownership
    Leave the PR open until a dashboard owner chooses the long-term public Bay URL policy.

Technical review

Best possible solution:

Adopt the canonical route only with maintainer sponsorship, retain the tested redirect as the compatibility policy, and keep the observer dashboard limited to read-only telemetry.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is primarily a proposed public-route and dashboard experience change, and the PR supplies exact-head browser evidence for the intended behavior.

Is this the best way to solve the issue?

Unclear: the route, redirect, telemetry schema, and proof are technically coherent, but only a maintainer can decide whether redirect-only compatibility and removing Live activity are the desired product contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 24a140e12d58.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The previously content-serving /bay-demo endpoint becomes a permanent redirect, which can affect non-browser consumers.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides detailed exact-head Docker Worker/Chromium evidence for the changed route, redirect, polling removal, handoff UI, and tide behavior.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded public dashboard and operator-telemetry improvement rather than an urgent runtime regression.
  • merge-risk: 🚨 compatibility: The previously content-serving /bay-demo endpoint becomes a permanent redirect, which can affect non-browser consumers.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides detailed exact-head Docker Worker/Chromium evidence for the changed route, redirect, polling removal, handoff UI, and tide behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides detailed exact-head Docker Worker/Chromium evidence for the changed route, redirect, polling removal, handoff UI, and tide behavior.

Evidence

What I checked:

  • Current-main route baseline: Current main serves the Bay document at /bay-demo; the requested canonical /bay document route is not already present. (dashboard/worker.ts:758, 24a140e12d58)
  • Proposed compatibility implementation: The PR serves Bay at /bay and changes /bay-demo to a same-origin 308 redirect after replacing only the pathname, preserving query parameters. (dashboard/worker.ts:758, 9fcfcd6532a3)
  • Telemetry compatibility handling: The new history parser accepts optional handoff phases, rejects malformed stored phase data, and lets the Bay card present unavailable legacy phase telemetry without manufacturing zero values. (dashboard/operational-health.ts:242, 9fcfcd6532a3)
  • Current real-behavior proof: The PR body records an exact-head Docker Worker/Chromium run for 9fcfcd6: 51 browser assertions covered the canonical route, 308 query retention, absent Live polling, shared API availability, desktop/narrow handoff rendering, and tide completion. (9fcfcd6532a3)
  • Feature-history routing: History shows the PR’s route and handoff work layered over recent dashboard and operational-health ownership by Martin Cleary and Peter Steinberger. (dashboard/operational-health.ts:52, 35b5f622c968)
  • Product-direction boundary: VISION.md explicitly says ClawSweeper does not replace maintainer taste on product direction; selecting the canonical public route and removing a prominent observer panel needs that judgment. (VISION.md:23, 24a140e12d58)

Likely related people:

  • Martin Cleary: Recent main work changed the dashboard/queue surfaces this PR builds upon, including the current main commit and the merged dashboard presentation work. (role: recent dashboard and queue contributor; confidence: high; commits: 24a140e12d58, f9a2f9493c2d, cd4892391195; files: dashboard/worker.ts, dashboard/operational-health.ts, dashboard/bay-page.ts)
  • Peter Steinberger: The recent history attributes the operational-health and exact-review queue behavior that supplies Bay’s telemetry to Peter Steinberger. (role: operational-health and queue feature owner; confidence: high; commits: 35b5f622c968, 0f1bd5d866f0; files: dashboard/operational-health.ts, dashboard/worker.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record a maintainer decision on the permanent /bay-demo redirect and removed Live activity panel before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-10T20:23:20.384Z sha 71b16d2 :: needs changes before merge. :: [P2] Refresh or retire the linked Bay proof artifacts
  • reviewed 2026-08-10T20:28:05.473Z sha 71b16d2 :: found issues before merge. :: [P2] Refresh or archive the linked Bay proof artifacts | [P2] Replace the repository-wide pinned route snapshot
  • reviewed 2026-08-10T20:59:37.878Z sha 66f0163 :: found issues before merge. :: [P2] Refresh the committed Bay proof for the final head

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. label Aug 10, 2026
@brokemac79
brokemac79 force-pushed the codex/csw-124-bay-route branch from 66f0163 to 9fcfcd6 Compare August 10, 2026 22:13
@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 10, 2026
@brokemac79
brokemac79 marked this pull request as ready for review August 10, 2026 22:23
@brokemac79
brokemac79 merged commit 51ac499 into main Aug 10, 2026
22 checks passed
@brokemac79
brokemac79 deleted the codex/csw-124-bay-route branch August 10, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant