Skip to content

improve(ui): lift sidebar section headers on hover and mark online owners - #136985

Merged
steipete merged 4 commits into
mainfrom
steipete/group-hover-online-status-814dcf
Sep 3, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/group-hover-online-status-814dcf

Conversation

@steipete

@steipete steipete commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Session section headers in the Control UI sidebar felt inert: hovering a header only revealed its chevron and action buttons while the uppercase label stayed muted, even though every session row and every person in the Online roster lights up under the pointer. Under Group by Person the header avatar carried no presence signal, and the person it names had no way to open the same information card the Online roster offers, so seeing who is around and what they are working on meant scrolling back up to the roster or opening the Activity page.

Why This Change Was Made

Three deliberately quiet additions to the shared section header (.sidebar-recent-sessions__head, used by custom groups, person/project sections, coding catalogs, and the Online section):

  • Label lift on hover/focus, no fill. While a header is hovered or contains a :focus-visible element, its label and inherited color lift from muted to --text, the same lift session rows do. There is intentionally no background pill: a pill implies "this goes somewhere", and headers toggle rather than navigate. The rule applies uniformly in every grouping mode.
  • Online dot on person headers. Under Group by Person, the owner avatar in a section header gets a 6px --ok dot with a background ring while that profile has live presence. The dot fades (opacity: 0.45) once the roster's idle rule applies (no input for two minutes) and disappears when they leave. The signal comes from the same presence projection and idle rule the Online roster uses (projectPresenceViewers + isPresenceViewerIdle), computed once per person-grouped list render. The viewer's own section never shows a dot. The dot is a role="img" element labeled "Online" or "Idle", mirroring the existing attention dot on the same headers.
  • The person card from person headers. For another person's section, the header is now a chevron collapse toggle plus a person button (avatar + name) that opens the same activity card the Online roster rows open, on hover, keyboard focus, click, or tap; click pins it exactly like a roster row, and a chevron press collapses the section and dismisses the card. The people runtime now keys off a generic data-person-card region instead of roster-only selectors, so both surfaces share one controller, one card, and one lazy-load path. An owner who is not connected gets the card too, marked Offline with a muted dot, no ephemeral connection facts, and their recent sessions plus the Activity link; the runtime builds that identity from the loaded roster's owner/creator attribution. The viewer's own section and agent-owned sections keep the classic single toggle (no card, no dot).

Why a separate person button rather than opening the card from the whole header: on touch there is no hover, so the person's name must be tappable to reach the card at all, and the collapse toggle must keep its own aria-expanded. Other grouping modes keep today's single-toggle header byte-for-byte.

Non-goals: no header background pill, no changes to card positioning or delays, no changes to the Online roster's behavior, no new config.

User Impact

Section headers respond to the pointer and keyboard like the rest of the sidebar. Under Group by Person you can see at a glance which session owners are online, idle, or away, and hovering, focusing, or tapping a person's name in their section header opens their card (online status, where they are connected, last activity, what they are viewing, recent sessions, View activity) without leaving the list. Offline owners still get a card with their recent sessions and the Activity link. Docs: Reading the avatars and People cards.

Evidence

Tests:

  • New sidebar case in ui/src/test-helpers/app-sidebar-cases/presence.ts drives the real sidebar through gateway presence events under person grouping: dot with "Online", --idle with "Idle", removed on disconnect; Bob (absent) and the viewer's own section have no dot and the viewer's section has no card trigger. It then opens Ada's card from her header button (h2 "Ada", status "Online", collapse toggle still reports its own expanded state), closes it with Escape (focus returns to the button), proves a real chevron press collapses the section and dismisses the card, and opens Bob's offline card (status "Offline", no facts list, Recent sessions link, View activity link).
  • ui/src/e2e/session-person-grouping-presence.e2e.test.ts asserts the hovered header label's computed color equals --text, that only Ada's section carries the dot, that hovering Ada's header button shows the "Activity for Ada" dialog, and that hovering Bob's shows an "Offline" card without facts. ui/src/e2e/people-activity-card.e2e.test.ts (roster) still passes on the generalized runtime.
  • pnpm test ui/src/components/app-sidebar.test.ts -t presence and -t ownership, both e2e files, node scripts/check-changed.mjs, pnpm lint:ui:styles, pnpm ui:i18n:verify: green. pnpm ui:i18n:baseline regenerated no baseline change.

Before/after, dark theme, mocked gateway through the Control UI e2e harness (Playwright + Chromium). "You" is the signed-in viewer; Ada and Bob are other owners. Rows under Ada show her avatar only while she is viewing that session, which is existing behavior.

Before After
"ADA" header hovered before hover after hover
Ada online before online after online
Ada idle before idle after idle

The card from a person header (before: hovering a header did nothing beyond revealing the chevron):

Ada online, hovered from her header Bob offline, hovered from his header
after card online after card offline

After, 2x: hover the "ADA" header, Ada connects, her card opens from the header, Ada goes idle, Ada disconnects, then Bob's offline card. The "YOU" section never gets a dot or a card.

attachment-2102624804.mp4

@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review September 3, 2026 04:29
@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 3, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 12:12 PM ET / 16:12 UTC.

ClawSweeper review

What this changes

The PR brightens Control UI sidebar headers and, under person grouping, adds owner presence indicators and access to the shared person activity card.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: the prior accessibility concern is addressed, but the new self-exclusion logic regresses an established gateway snapshot shape and can add a presence dot and person-card action to the viewer’s own section.

Priority: P3
Reviewed head: cc2e4fb300308523750121922e66fbe31cd2315b

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visual and harness evidence are strong for the intended interaction, but the id-only self snapshot bug blocks merge readiness.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied browser-harness screenshots and recording are relevant visual evidence, while this read-only environment could not retrieve additional artifacts due unavailable DNS.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied browser-harness screenshots and recording are relevant visual evidence, while this read-only environment could not retrieve additional artifacts due unavailable DNS.
Evidence reviewed 7 items Introduced self exclusion: The introduced renderer projects presence and records selfProfileId only when the current self user carries a typed profile identity; both the presence dot and person-card guard depend on that optional value.
Supported id-only self shape: ApplicationGatewaySnapshot makes selfUser optional, and the existing gateway-store coverage establishes an id-only self user; presence keys distinguish raw id-only users from typed profiles.
Existing canonical self comparison: The existing person-grouping owner ordering identifies self by snapshot.selfUser.id, rather than requiring an identity object.
Findings 1 actionable finding [P2] Preserve self exclusion for id-only snapshots
Security None None.

How this fits together

The Control UI sidebar combines loaded session ownership with live Gateway presence to render grouped session headers. Header person actions use the shared people-card runtime to show current activity and authorized session links.

flowchart LR
  A[Gateway session list] --> C[Person-grouped sidebar]
  B[Gateway presence] --> C
  C --> D[Owner header]
  D --> E[Shared people-card runtime]
  E --> F[Activity card and session links]
Loading

Before merge

  • Preserve self exclusion for id-only snapshots (P2) - selfProfileId is undefined when the gateway’s current self user has only an id, although that is a supported snapshot shape. The typed self presence entry is then retained in presence, so the viewer’s own person section receives the dot and the person-card button. Derive the profile id from selfUser.id when identity is absent and cover this snapshot/presence combination.
  • Resolve merge risk (P1) - Gateways whose current self snapshot has only an id can render the viewer’s own person group as another person, exposing a misleading Online/Idle dot and activity-card control.
  • Complete next step (P2) - Preserve self exclusion for gateways whose current self snapshot has an id but no typed identity, with a focused regression test.

Findings

  • [P2] Preserve self exclusion for id-only snapshots — ui/src/components/app-sidebar-session-list-render.ts:481-492
Agent review details

Security

None.

PR surface

Source +181, Tests +169, Docs +1. Total +351 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 8 263 82 +181
Tests 3 170 1 +169
Docs 1 2 1 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 435 84 +351

Review metrics

Metric Value Why it matters
Production versus test delta production +263/-82 (net +181); tests/test-support +170/-1; docs +2/-1 The production growth implements several visible sidebar interactions; the focused test additions cover presence, card behavior, and accessibility state.

Merge-risk options

Maintainer options:

  1. Preserve id-only self exclusion (recommended)
    Use the canonical self id when typed profile identity is absent and add coverage proving the viewer’s own section has neither dot nor card action.

Technical review

Best possible solution:

Derive the self profile id from the typed identity when present and otherwise from the canonical self id, then exclude that id from both the header presence map and person-card action; cover the id-only snapshot with a focused regression case.

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

Yes, from source: combine an id-only snapshot self user with a typed-profile self presence entry and a matching person-owned session; the new map retains that self profile while the header guard treats it as another person.

Is this the best way to solve the issue?

No. The intended shared projection is sound, but it must use the same canonical self id precedent as person grouping so optional identity metadata does not change self exclusion.

Full review comments:

  • [P2] Preserve self exclusion for id-only snapshots — ui/src/components/app-sidebar-session-list-render.ts:481-492
    selfProfileId is undefined when the gateway’s current self user has only an id, although that is a supported snapshot shape. The typed self presence entry is then retained in presence, so the viewer’s own person section receives the dot and the person-card button. Derive the profile id from selfUser.id when identity is absent and cover this snapshot/presence combination.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3755763d7949.

Labels

Label changes:

  • add merge-risk: 🚨 other: The introduced self-identification mismatch can alter an existing user’s own sidebar section without a configuration or migration boundary.

Label justifications:

  • P3: This is a bounded Control UI enhancement, although the identified regression must be corrected before merge.
  • merge-risk: 🚨 other: The introduced self-identification mismatch can alter an existing user’s own sidebar section without a configuration or migration boundary.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied browser-harness screenshots and recording are relevant visual evidence, while this read-only environment could not retrieve additional artifacts due unavailable DNS.

Evidence

What I checked:

Likely related people:

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

Rank-up moves

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

  • Exclude an id-only snapshot self profile from the person-header dot and card action, and add the focused regression case.

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-09-03T04:35:49.890Z sha 176dcf8 :: blocked before merge. :: [P2] Expose owner presence in the header button’s accessible name
  • reviewed 2026-09-03T05:08:39.043Z sha 176dcf8 :: needs changes before merge. :: [P2] Expose owner presence in the header button’s accessible name
  • reviewed 2026-09-03T06:21:23.657Z sha 7a8a41f :: blocked before merge. :: [P2] Expose presence in the person action’s accessible name

…ners

Sidebar section headers now lift their label to the text color while hovered
or keyboard-focused, in every grouping mode, without a background fill: headers
toggle rather than navigate, so they get the row color lift but not the row pill.

Under Group by Person, the owner avatar in a section header carries a small green
dot while that profile has live presence. The dot fades once the Online roster's
idle rule applies and disappears on disconnect. It reuses the roster's presence
projection and idle rule, is computed once per person-grouped list render, and is
never shown on the viewer's own section. The dot is a role="img" element labeled
"Online" or "Idle", matching the existing attention dot on the same headers.

Surface: Control UI sessions sidebar (section headers, Group by Person).
Docs: concepts/multi-user "Reading the avatars".
Under Group by Person, another person's section header is now a chevron
collapse toggle plus a person button (avatar + name) that opens the same
activity card the Online roster rows open: hover, keyboard focus, click, or
tap; click pins it like a roster row, and a chevron press collapses the
section and dismisses the card. The people runtime keys off a generic
data-person-card region instead of roster-only selectors, so both surfaces
share one controller, one card, and one lazy-load path.

Owners who are not connected get the card too, marked Offline with a muted
dot, without ephemeral connection facts, and with their recent sessions and
the Activity link; the runtime builds that identity from the loaded roster's
owner/creator attribution. The viewer's own section and agent-owned sections
keep the classic single toggle. Other grouping modes are unchanged.

Surface: Control UI sessions sidebar (Group by Person headers, people card).
Docs: concepts/multi-user "People cards".
The person button now exposes its live Online/Idle state as its accessible description via aria-describedby on the presence indicator.

The sidebar test follows main's /activity/<id> person routing.
@steipete
steipete force-pushed the steipete/group-hover-online-status-814dcf branch from 7a8a41f to e43fe98 Compare September 3, 2026 15:54
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Applied the accessibility rank-up move: the person-header action now exposes Online/Idle as its accessible description via aria-describedby on the presence indicator. The focused sidebar case asserts the description relationship for Online and Idle, and its removal on disconnect; the accessible name remains “Details for {name}”.

Rebased onto main. The two red lanes (checks-ui (2/3) and checks-node-compact-large-14) hit the same footer-link assertion, which now follows main's /activity/<id> person routing.

All five requested local gates pass: focused sidebar presence tests, person-grouping browser E2E, changed-file checks, UI style lint, and i18n verification.

New head: e43fe98

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Sep 3, 2026
@steipete
steipete merged commit c478d74 into main Sep 3, 2026
131 checks passed
@steipete
steipete deleted the steipete/group-hover-online-status-814dcf branch September 3, 2026 16:20
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 3, 2026
* refs/remotes/origin/main:
  fix(plugins): reject unverifiable pinned npm installs (#136725)
  improve(ui): lift sidebar section headers on hover and mark online owners (#136985)
  test(cron): reuse isolated run suite hooks (#137341)
  test(channels): reuse shared indexed call guards (#137350)
  fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317)
  fix(qa-channel): preserve conversation kind for implicit actions (#137343)
  fix: target the source checkout in Control UI repair commands (#137354)
  chore: reduce CI job count and database test overhead (#137352)
  fix(ios): preserve chat live edge across keyboard transitions (#136660)
  refactor(control-ui): consolidate mention inbox requests (#137375)
  fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146)
  fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546)
  test(queue): reuse shared deferred fixtures (#137338)
  fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
…ners (openclaw#136985)

* improve(ui): lift sidebar section headers on hover and mark online owners

Sidebar section headers now lift their label to the text color while hovered
or keyboard-focused, in every grouping mode, without a background fill: headers
toggle rather than navigate, so they get the row color lift but not the row pill.

Under Group by Person, the owner avatar in a section header carries a small green
dot while that profile has live presence. The dot fades once the Online roster's
idle rule applies and disappears on disconnect. It reuses the roster's presence
projection and idle rule, is computed once per person-grouped list render, and is
never shown on the viewer's own section. The dot is a role="img" element labeled
"Online" or "Idle", matching the existing attention dot on the same headers.

Surface: Control UI sessions sidebar (section headers, Group by Person).
Docs: concepts/multi-user "Reading the avatars".

* feat(ui): open the person card from Group by Person section headers

Under Group by Person, another person's section header is now a chevron
collapse toggle plus a person button (avatar + name) that opens the same
activity card the Online roster rows open: hover, keyboard focus, click, or
tap; click pins it like a roster row, and a chevron press collapses the
section and dismisses the card. The people runtime keys off a generic
data-person-card region instead of roster-only selectors, so both surfaces
share one controller, one card, and one lazy-load path.

Owners who are not connected get the card too, marked Offline with a muted
dot, without ephemeral connection facts, and with their recent sessions and
the Activity link; the runtime builds that identity from the loaded roster's
owner/creator attribution. The viewer's own section and agent-owned sections
keep the classic single toggle. Other grouping modes are unchanged.

Surface: Control UI sessions sidebar (Group by Person headers, people card).
Docs: concepts/multi-user "People cards".

* fix(ui): describe person-header presence for assistive tech

The person button now exposes its live Online/Idle state as its accessible description via aria-describedby on the presence indicator.

The sidebar test follows main's /activity/<id> person routing.

* refactor(ui): keep the presence description note out of the rendered header
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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant