Skip to content

fix(ui): show active work beyond the first history page - #146207

Merged
steipete merged 1 commit into
mainfrom
codex/qa-debug-active-runs-20260912
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-debug-active-runs-20260912

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators checking System busyness could see no active work while older sessions were still running. The Debug overlay only examined the first page of session history, which could contain entirely idle sessions.

Why This Change Was Made

The overlay now uses the Gateway's existing current-work query, matching Activity's running and queued session selection, including archived and global sessions. It uses the returned total count and labels the bounded list when more than 100 sessions are active. This removes the client-side history filter and its partial session type; the Gateway continues to own visibility, activity selection, and pagination.

Production: +11/-14, net -3 lines. Tests: net +74. Docs: +1. No configuration, protocol, persistence, or permission changes.

User Impact

Operators can see the full current-work count without paging through session history. The overlay lists the first 100 session IDs, displays “Showing 100 of 101” when appropriate, and clears both the list and notice when work ends.

Evidence

The existing Debug browser E2E now seeds 100 newer idle sessions and 101 older active sessions, including global, unknown, archived, and queued rows. On the unchanged baseline, the real rendered overlay showed 0 active and the test failed. After the repair, it shows 101 active, exactly 100 IDs, and the pagination notice; the subsequent empty refresh shows 0 active with no stale rows or notice.

  • Paired baseline and candidate browser proof used Node 24.20.0 and the real Control UI against a synthetic Gateway WebSocket. The candidate Debug E2E passed 1/1.
  • Debug/Activity unit tests passed 33/33; Activity E2E passed 2/2 on Node 24.21.0 as additional sibling coverage.
  • UI build passed with 902 verified sidecars; normal changed checks, typechecks, i18n, lint, and formatting passed. A later docs-only precision edit passed formatting and diff checks.
  • Before/after captures were inspected for the asserted state and contain only synthetic fixtures. This is browser boundary proof, not a live provider or operator Gateway run.

The current-work domain intentionally follows the Gateway's existing session listing, including its exclusion of isolated cron-run history rows.

Before: the overlay incorrectly shows no active sessions

After: 101 active sessions with a bounded list of 100

CI follow-up: the first run hit an unrelated Gateway shard headroom failure. Landed PR #146212 repaired the partition without relaxing limits. After a patch-identical rebase, CI run 34708830042 passed on 5f56136f23789cc843c16ceedce7502654125f26. Its actual test logs include all nine active-list and seventeen projection/performance cases, covering the newer Gateway implementation.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 16:42
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 2:32 PM ET / 18:32 UTC (Revision 3).

ClawSweeper review

What this changes

The System busyness overlay uses the Gateway’s current-work listing to display the total active-session count and a bounded list, with browser regression coverage and updated documentation.

Merge readiness

✅ Ready for maintainer review

This repair remains necessary: current main and the latest release retain the first-page counting defect. The focused patch and inspected browser evidence support landing; no actionable correctness or security findings remain.

Priority: P2
Reviewed head: 5f56136f23789cc843c16ceedce7502654125f26

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with strong visual evidence, meaningful browser regression coverage, and successful exact-head CI.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after captures show the real Control UI overlay changing from 0 to 101 active with the bounded-list notice under the documented synthetic Gateway scenario; browser assertions additionally cover 100 rendered IDs and the empty refresh.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after captures show the real Control UI overlay changing from 0 to 101 active with the bounded-list notice under the documented synthetic Gateway scenario; browser assertions additionally cover 100 rendered IDs and the empty refresh.
Evidence reviewed 8 items Introduced production change: The complete pinned introduction changes the overlay request and renderer, its existing browser regression, and one documentation entry. The renderer consumes the returned totalCount and hasMore without introducing another activity selector.
Existing Gateway contract: The Gateway applies visibility and active-run selection before pagination, rechecks selected rows after awaits, and calculates totalCount before slicing. Its default page size is 100. Activity already uses the same activeOnly, archived, includeGlobal, and includeUnknown selection.
Gateway regression coverage: Existing tests cover selection before pagination, queued work, distinct global/unknown owners, private-session exclusion, visibility changes during projection, and settled or replaced runs. These are supplemental source checks; no tests were executed during this read-only review.
Findings None None.
Security None None.

How this fits together

The Control UI’s System busyness overlay periodically requests diagnostics from the connected Gateway. The Gateway selects visible running or queued sessions, and the overlay displays their count and identifiers.

flowchart LR
  A[Operator opens overlay] --> B[Current-work request]
  B --> C[Gateway visibility and activity selection]
  C --> D[Total count and bounded page]
  D --> E[Active count and session IDs]
  E --> F[Periodic refresh]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3, Tests +74, Docs +1. Total +72 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 11 14 -3
Tests 1 75 1 +74
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 87 15 +72

Review metrics

None.

Technical review

Best possible solution:

Keep activity selection and visibility in the Gateway, and let the overlay display its authoritative total with a clearly bounded session list.

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

Yes: place running sessions behind 100 newer idle history rows and open System busyness. Current source establishes the failure, and supplied paired browser evidence demonstrates it; this review did not execute a new reproduction.

Is this the best way to solve the issue?

Yes: consuming the existing current-work query removes the faulty client-side selection while preserving Gateway ownership, pagination, and visibility checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b205bf5db003.

Labels

Label justifications:

  • P2: Incorrect diagnostic counts can mislead operators, but the defect does not stop active sessions from running.
  • 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 (screenshot): Inspected before/after captures show the real Control UI overlay changing from 0 to 101 active with the bounded-list notice under the documented synthetic Gateway scenario; browser assertions additionally cover 100 rendered IDs and the empty refresh.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after captures show the real Control UI overlay changing from 0 to 101 active with the bounded-list notice under the documented synthetic Gateway scenario; browser assertions additionally cover 100 rendered IDs and the empty refresh.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after captures show the real Control UI overlay changing from 0 to 101 active with the bounded-list notice under the documented synthetic Gateway scenario; browser assertions additionally cover 100 rendered IDs and the empty refresh.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-12T16:49:11.185Z sha cfd14ecf259a278daf30aa971ab8e2f6826ee392 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-12T17:44:31.055Z sha 5f56136 :: needs maintainer review before merge. :: none

Use the Gateway current-work query and total count in the System busyness overlay. Preserve bounded rows and show when more are active. Removes the client history filter and partial session type (production net -3). Paired browser regression, sibling tests, UI build, changed checks, and independent review passed.
@steipete
steipete force-pushed the codex/qa-debug-active-runs-20260912 branch from cfd14ec to 5f56136 Compare September 12, 2026 17:38
@steipete
steipete merged commit 1a2e8cd into main Sep 12, 2026
131 checks passed
@steipete
steipete deleted the codex/qa-debug-active-runs-20260912 branch September 12, 2026 18:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
)

Use the Gateway current-work query and total count in the System busyness overlay. Preserve bounded rows and show when more are active. Removes the client history filter and partial session type (production net -3). Paired browser regression, sibling tests, UI build, changed checks, and independent review passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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