Skip to content

feat(ui): show open and running sessions beside online people - #160022

Merged
steipete merged 4 commits into
mainfrom
openclaw/visualizer-session-count-monitoring
Sep 28, 2026
Merged

steipete merged 4 commits into
mainfrom
openclaw/visualizer-session-count-monitoring

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Online list shows whether people are active, but not how many conversations they own or have running.

User Impact

See Open and Running counts beside each person, sort by either count, or show only people with running sessions. Human presence stays separate from agent work, and totals cover the people shown.

Counts include owned, unarchived conversations you can access across configured agents. Hidden subagents, automation, system, and global/unknown sessions are excluded. Queued work and descendant activity are not counted as direct running sessions. No permission or storage changes are introduced.

Why This Change Was Made

A complete Gateway-owned summary keeps counts accurate when the sidebar is filtered or paginated. The UI reuses managed session-list observation and refresh pacing, fences viewer/connection changes, distinguishes unknown from zero, and preserves the last successful counts with a retry notice after a failed refresh.

Evidence

  • Real Gateway WebSocket request/response proof verifies the new option through handshake, validation, dispatch, and the production handler in an isolated Gateway with synthetic data. Counts remain complete before pagination and exclude another person’s private session/run; disabling the option omits the field. 1 proof passed in 57.22 s including cold compilation (11.191 s test time). No live Team service was changed.
  • Real sessions.list handler regressions cover cross-agent ownership, pagination, live/queued/stale run states, duplicate runs, reassignment, profile merges, more than 60 owners, access changes, and private/incognito exclusions. Clean summary reads perform no SQLite preparation.
  • Controller/renderer regressions cover unknown versus zero, profile/raw identity collisions, an idle person with running work, filtering/sorting/totals, error recovery, stale replies after disconnect/context replacement, and authoritative aggregate refresh after run snapshots.
  • Actual Control UI browser proof uses synthetic Gateway data. Sorting, running-only filtering, dark/light themes, and the 390px mobile sidebar pass. Inspected before/after screenshots are attached in the originating chat and embedded here; both GitHub images were verified loaded at their native dimensions.
  • Independent P0/P1 review: scoped-clean. The lead additionally inspected the unchanged managed-list and connection lifecycle contracts.
  • Production UI build passes. The explicit asset-budget checker reports an inherited startup-JS limit violation: unchanged source base 72b76842012f is 372,549 B; the original measured candidate was 372,814 B (+265 B), against a 371,581 B absolute limit. CSS grows by 166 B, within its allowance. No budgets or baselines were relaxed.

Focused final regression run: 39 tests passed across the Gateway handler, sidebar controller/renderer, and managed-list event tests, with --maxWorkers=1. Combined wall time: 46.79 s, including cold worker compilation; Gateway tests execute in 2.425 s + 0.493 s, and the UI shard finishes in 3.88 s. Changed-file guards and core/test/UI typechecks passed; the final lint lane found two missing braces in the new controller. Both were corrected without behavior changes; targeted lint passes (0 warnings/errors, 8.6 s). Existing functional and visual proof remains applicable. Hosted feature-test timing has not yet been isolated; the first CI attempt failed on the two checks described below.

CI follow-up: run 36366961172 identified stale generated Swift protocol output and a sidebar renderer type-import cycle. The Swift model was regenerated through its canonical generator; the sidebar now imports the people renderer directly instead of through its re-export. Local protocol registry/generation/Swift freshness/Kotlin/since checks pass; Madge reports 0 cycles, UI types and targeted lint pass (0 warnings/errors). The 37 focused UI regressions pass again in 4.59 s. These are mechanical corrections with no visual or behavior change; existing screenshot and Gateway proof remains applicable. No CI rerun or budget relaxation was used.

Startup-admission correction: run 36367759526 exposed four chat-startup-priority E2E failures: the new count summary could dispatch before the selected transcript settled. Initial count hydration now uses the existing background bootstrap coordinator and fences queued work against the captured observation and connection; manual retry remains explicit. Two fake-timer regressions cover startup hold/release and retirement before admission. All 99 focused UI/managed-list regressions pass in 8.57 s wall (5.82 s Vitest); UI types pass, and targeted lint passes (0 warnings/errors, 9.3 s) after marking the two intentionally in-flight test calls with void. Fresh independent P0/P1 review is scoped-clean. A local full-browser replay was refused by the loopback preflight (HTTP 502), and all nine exact-head hosted UI E2E shards now pass, including the repaired startup-priority shard; no CI rerun, policy bypass, or live Gateway change was used. Existing screenshot and Gateway wire proof remains applicable.

Hosted infrastructure follow-up: run 36368977950, iPhone screenshot job stopped before source compilation while Xcode resolved Swift packages: the runner’s cached WebRTC repository directory was missing (exit 74). Uploading its failure evidence also failed with DNS ENOTFOUND. The original job log was inspected and retained; this is not a feature-test assertion or Swift compiler error. The first cancellation interrupted proof; attempt 2 subsequently passed all nine UI E2E shards, closing the repaired browser-flow gap. After the run settled as cancelled, one bounded failed-job/dependency rerun was requested at 02:25 UTC for this identified runner-cache/network failure. The unchanged head is pinned to f1dc5eb; attempt 2 passed the iPhone job but failed the iPad 13-inch screenshot job during a later XCTest application launch, so it did not produce passing whole-run CI. Original failure evidence is retained. No budget or source changes were made for this infrastructure failure.

Latest CI recovery: attempt 2’s iPad job successfully captured Control and Chat, then hung in XCUIApplication.launch() for the Agent snapshot until the 180-second allowance expired; XCTest reported that the app had no process ID. The retained log and capture-attempt manifest establish the launch boundary, not a feature assertion or a proven root cause inside the app. All nine UI E2E shards, UI checks, and hosted Control UI performance checks passed on this exact head. One bounded failed-job/dependency retry was accepted at 03:14 UTC for this distinct launch failure; attempt 3 is in progress on unchanged f1dc5eb976530f93461d7d959e7d4a06e6316914. No source change, timeout increase, assertion weakening, or budget relaxation was made for this recovery. A passing retry will not be described as a fix for the launch failure.

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: ce5a0298-56f4-4e44-8254-8af784577ac0
@clawsweeper

clawsweeper Bot commented Sep 28, 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 gateway Gateway runtime size: XL labels Sep 28, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Online people session counts

Actual Control UI components with synthetic Gateway data. Presence remains separate from Open and Running counts. Headers sort; All toggles the running-only filter.

Before

Before: presence-only people list

After

After: open and running counts, filter and totals

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 28, 2026 01:41
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 11:23 PM ET / September 28, 2026, 03:23 UTC (Revision 5).

ClawSweeper review

What this changes

The branch adds access-scoped open and running conversation counts to the Gateway session list and shows them beside online people in the Control UI with sorting, filtering, totals, and retry feedback.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main shows online presence without session workload counts, so this branch provides a distinct useful capability. The reviewed head has convincing visual and Gateway wire proof, and I found no introduced blocking defect.

Priority: P2
Reviewed head: f1dc5eb976530f93461d7d959e7d4a06e6316914

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is coherent and supported by real Gateway and visual proof, with focused lifecycle and visibility regressions.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed Gateway session-list owner was exercised through an authenticated isolated WebSocket client with synthetic visible and private sessions; the observed response contained complete, access-scoped counts before pagination. Inspected before/after Control UI screenshots show the new columns and totals. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed Gateway session-list owner was exercised through an authenticated isolated WebSocket client with synthetic visible and private sessions; the observed response contained complete, access-scoped counts before pagination. Inspected before/after Control UI screenshots show the new columns and totals. No stored-data contract changes.
Evidence reviewed 8 items Introduced Gateway summary: The opt-in summary counts effective profile owners and direct live work after session filtering; the list result carries the complete facet before pagination.
Visibility boundary: The existing request path applies its client-specific sharing filter to candidate rows before the new aggregate is calculated.
Control UI lifecycle: The sidebar observes one cross-agent summary, waits for selected-chat startup admission, and fences publication to the current connection and viewer.
Findings None None.
Security None None.

How this fits together

The Gateway turns visible session records and live run state into a session-list response. The Control UI observes that response alongside presence data to render the Online sidebar.

flowchart LR
 A[Online people] --> F[Sidebar view]
 B[Session records] --> C[Gateway visibility filter]
 C --> D[Owner count summary]
 E[Live agent runs] --> D
 D --> G[Managed list observation]
 G --> F
 F --> H[Counts sorting and totals]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +357, Tests +655, Docs +3, Other +26. Total +1041 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 16 515 158 +357
Tests 3 655 0 +655
Docs 2 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 1 26 0 +26
Total 22 1199 158 +1041

Review metrics

Metric Value Why it matters
Protocol surface 1 opt-in request parameter, 1 optional result field Existing session-list callers retain the response shape unless they request the summary.
Production and test growth production net +386 lines, tests +655 lines The production growth supports the Gateway aggregate and sidebar presentation; the added tests cover their distinct boundaries.

Technical review

Best possible solution:

Keep the Gateway as the sole owner of access-scoped session counts and let the Online sidebar present its complete, optional summary.

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

Not applicable as a feature request. Current main's Online sidebar shows presence without the requested counts.

Is this the best way to solve the issue?

Yes. The existing Gateway list owner applies visibility and computes the page-independent summary, while the UI consumes it through managed observation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7b2394da7a9d.

Labels

Label changes:

  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is terminal.

Label justifications:

  • P2: This is a useful, bounded Control UI improvement with limited blast radius.
  • 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 (terminal): The changed Gateway session-list owner was exercised through an authenticated isolated WebSocket client with synthetic visible and private sessions; the observed response contained complete, access-scoped counts before pagination. Inspected before/after Control UI screenshots show the new columns and totals. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Gateway session-list owner was exercised through an authenticated isolated WebSocket client with synthetic visible and private sessions; the observed response contained complete, access-scoped counts before pagination. Inspected before/after Control UI screenshots show the new columns and totals. No stored-data contract changes.

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)
  • RoboClaw: 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 (4 earlier review cycles)
  • reviewed 2026-09-28T01:48:43.472Z sha def03cb :: blocked before merge. :: none
  • reviewed 2026-09-28T02:01:11.589Z sha 0c7890c :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T02:20:15.059Z sha f1dc5eb :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T02:32:39.022Z sha f1dc5eb :: needs maintainer review before merge. :: none

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Gateway wire-contract verification

Addressed the review's remaining RPC proof gap on def03cb6910429f09496b995b7b3ad4eccee4839: an authenticated WebSocket client sent sessions.list to a real isolated loopback Gateway using the production handshake, request validation, dispatcher, visibility filtering, and session-list handler. The temporary proof uses synthetic profiles/session records and the repository Gateway harness; unrelated provider/reply services are stubbed. This is not a deployed Team Gateway test, and no live service was changed.

Request (viewer Ada, operator.read):

{"method":"sessions.list","params":{"includeOwnerSessionCounts":true,"includeGlobal":false,"includeUnknown":false,"configuredAgentsOnly":true,"excludeSubagents":true,"excludeCron":true,"excludeSystem":true,"limit":1}}

Observed and asserted response excerpt (profile IDs replaced with synthetic names):

{"ok":true,"returnedSessions":1,"ownerSessionCounts":[{"profileId":"Ada","open":3,"running":1},{"profileId":"Bob","open":1,"running":0}]}

The aggregate covered all visible matching sessions despite a one-row page. Ada's own draft counted; Bob's private draft and its active run were excluded. A second request with includeOwnerSessionCounts:false succeeded and omitted the aggregate field.

Result: 1 wire-contract proof passed, 11.191 s test time / 57.22 s total including cold compilation and teardown. The one-off proof is not added to recurring CI. Existing 39 focused regressions cover the broader cross-agent, live/queued, access-change, and UI behavior matrix.

Regenerate the Swift wire model from its schema and import the people renderer directly to remove the type-import cycle.

Co-authored-by: steipete <[email protected]>
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 28, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) September 28, 2026 02:02
Admit initial count hydration through the existing background bootstrap coordinator and fence queued observations across viewer and connection retirement.

Co-authored-by: steipete <[email protected]>
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 28, 2026
@steipete
steipete merged commit 8e57f54 into main Sep 28, 2026
473 of 609 checks passed
@steipete
steipete deleted the openclaw/visualizer-session-count-monitoring branch September 28, 2026 03:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…aw#160022)

* feat(ui): show open and running sessions beside online people

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: ce5a0298-56f4-4e44-8254-8af784577ac0

* fix(ui): satisfy session-count controller lint rules

Co-authored-by: steipete <[email protected]>

* fix(ui): reconcile session-count protocol and import graph

Regenerate the Swift wire model from its schema and import the people renderer directly to remove the type-import cycle.

Co-authored-by: steipete <[email protected]>

* fix(ui): defer people counts until chat startup settles

Admit initial count hydration through the existing background bootstrap coordinator and fence queued observations across viewer and connection retirement.

Co-authored-by: steipete <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: steipete <[email protected]>
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

2 participants