Repository navigation
fix: show idle people accurately while they stay online - #159493
Conversation
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: d2b6e89e-2f4e-4421-963f-17c0ffed6810
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 3:13 AM ET / 07:13 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch adds a read-scoped Gateway interaction signal and shows Active, Idle, or plain Online for connected people in the Control UI sidebar, person cards, and Activity page. Merge readiness✅ Ready for maintainer review Keep open. Current main does not provide the requested activity states, and the linked issue remains open. The latest head has a coherent implementation, visible before-and-after proof, and no concrete introduced defect found in this review. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway holds ephemeral presence for connected clients and sends authorized readers presence snapshots. The Control UI groups those connections by person and renders their online status and recent interaction state. flowchart LR
A[Visible browser interaction] --> B[Activity request]
B --> C[Scope and live connection checks]
C --> D[Gateway presence timing]
D --> E[Presence snapshot]
E --> F[Activity expiry controller]
F --> G[Sidebar, cards, and Activity page]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +244, Tests +572, Docs +23, Other +1. Total +840 across 31 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the Gateway as the activity-timing owner and render connection status separately from interaction age across the Control UI. Do we have a high-confidence way to reproduce the issue? Not applicable as a new activity-display capability. Current-main source and the inspected before screenshots establish the previous presentation; no current-main runtime reproduction was run. Is this the best way to solve the issue? Yes. The branch uses existing Gateway-owned person timing and one shared UI activity projection instead of creating a competing state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53b95fd0bef8. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: f7105551-cbc5-4752-bc65-4b3f2da4e152
|
Merged via squash.
|
) * fix: show idle people accurately while they stay online Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: d2b6e89e-2f4e-4421-963f-17c0ffed6810 * fix: show idle people accurately while they stay online Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: f7105551-cbc5-4752-bc65-4b3f2da4e152 --------- Co-authored-by: steipete <[email protected]>
Closes #159423
What Problem This Solves
Fixes: connected people look active even when their last interaction is old or unavailable.
User Impact
Online remains connection status; people now show Active for recent interaction, Idle after two minutes, or plain Online when activity is unavailable. A fresh foreground web visit counts as activity; automatic reconnects, background traffic, and incoming agent output do not. Sidebar rows, person cards, and the Activity page use the same rules.
This is recent OpenClaw use, not physical presence or attention. Reading without interacting can become idle. No configuration or data migration is required.
Why This Change Was Made
Reuse the Gateway's authenticated person timing and cross-tab aggregation. The small
presence.activityrequest accepts no identity, timestamp, or input contents; the server records accepted interaction time. The web client reports trusted visible input with a 30-second throttle. A shared UI expiry controller updates idle status without network events and handles hidden pages, remounts, and expiry during rendering.Evidence
f6974fb3550fe089663bc56ce89d8e1ec79170de.pnpm build, Control UI build, and changed-scope checks passed. Final UI-only repairs were rechecked with focused tests, UI production/test type graphs, and lint.ui:check-performance:basecomparison passed: startup JavaScript 371,200 B, below 371,332 B; startup CSS +73 B. No baseline or limit changes. Local non-pinned build metadata produced a misleading absolute-size overage; the same-identity CI comparison resolves it.Before
After
Activity-page comparison and test cost
Before
After
One-worker local wall observations using
pnpm test <file> --maxWorkers=1:server-methods.presence-activity.test.tsserver-methods-list.test.tsgateway-presence-activity.test.tspresence-users.test.tspresence-activity-controller.test.tssession-activity-view.test.tsThe registered Gateway request test spends most wall time compiling the shared subprocess fixture (91% transform in this cold observation); its assertions take about 1.7 seconds. It exercises real method dispatch, scope admission, identity hydration, and live-connection recording rather than bypassing that boundary. Sidebar support changes run in its existing suite; the final sidebar/Activity-page/expiry group took 21.95 seconds. Hosted CI run 36302065400 passed on head 741d7e9. Whole-job wall times (including setup and other shard tests): UI 297–309 s; UI E2E 242–454 s; bundled protocol 226 s; UI performance 130 s. ClawSweeper completed the same-head review without actionable findings.
Browser proof used AWS Crabbox
cbx_8a0a18f8d6a7: run. The repository UI E2E runner executedpeople-activity-card.e2e.test.tswith screenshot capture. Synthetic data only; no provider APIs or live user accounts were exercised.Worked on by
Work sessions
View the OpenClaw team session