Skip to content

feat(ui): load owner sessions before shared roster - #128767

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/list-all-of-vito-s-sessions
Aug 24, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/list-all-of-vito-s-sessions

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #122865
Related: #126701

What Problem This Solves

On shared Control UI gateways, the global newest-session window can crowd the signed-in operator's older active sessions out of the sidebar. Operators then see other people's recent work while their own still-active sessions appear to be missing.

Why This Change Was Made

The canonical session refresh owner now runs one atomic two-phase plan for the default active roster: request and publish the signed-in owner's latest 60 sessions first, then request the latest 60 shared sessions in the background and merge them by session key. The provisional owner phase does not advance canonical membership or durable query options, so reconnects retain an already-visible foreign-owned route and later event/mutation refreshes replay the same owner-first policy.

This reuses the existing Gateway ownerId filter and serialized refresh queue. It adds no polling, protocol, config, or storage surface. Explicit owner, involving-me, search, archive, and pagination queries remain single-phase. The shared response owns the global pagination cursor, keeping this orthogonal to the global-pagination repair in #126708.

User Impact

The signed-in operator sees up to 60 of their sessions as soon as the first bounded request completes. Shared sessions then appear without blocking that first useful roster. The combined list is deduplicated and can contain up to 120 rows before normal pagination continues.

Evidence

Regression proof failed on pre-fix main: the connection sent one unfiltered limit: 50 request instead of an owner-scoped limit: 60 request.

Focused verification on rebased head:

  • node scripts/run-vitest.mjs ui/src/lib/sessions/connection-hydration.test.ts ui/src/lib/sessions/index.event-refresh.test.ts ui/src/lib/sessions/list-options.test.ts ui/src/lib/sessions/index.test.ts ui/src/lib/sessions/index-list.test.ts --run --testTimeout 5000 — 103 passed.
  • node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000 — mocked-Gateway browser proof passed. It holds the shared response open, observes the owner roster, then releases and verifies the merged roster.
  • pnpm check:changed — passed formatting, dead-export scan, i18n, core/UI typechecks, and lint.
  • .agents/skills/autoreview/scripts/autoreview --mode uncommitted — clean; patch correct 0.99, no accepted/actionable findings.

Live Roboclaw store benchmark that informed the staged limit (six balanced warm samples with titles/previews):

Rows Median p95 vs. 60 median
60 682 ms 832 ms —
100 853 ms 1,128 ms +25%
120 986 ms 1,225 ms +45%

The browser proof captures the initial owner-only roster and the later shared merge. Production delta is +52/-9 (+43 net); test/E2E delta is +312/-2 (+310 net). The production growth is the atomic two-phase ownership boundary and provisional/canonical distinction; existing request, merge, event, and pagination owners are reused.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 24, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review August 24, 2026 14:51
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. 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 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 24, 2026, 11:40 AM ET / 15:40 UTC.

ClawSweeper review

What this changes

This PR changes the Control UI session sidebar to show the signed-in operator’s sessions before merging the shared roster.

Merge readiness

⛔ Blocked by patch quality or review findings - 5 items remain

Keep open: both prior P1 blockers remain on the exact reviewed head. Late presence identity never triggers an owner-first refresh, and event refresh drops appended shared-session pages.

Priority: P2
Reviewed head: 3c625133b3f4318908ff3a4f2f760d25280aa9a4

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🧂 unranked krab (1/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 6 items Late identity producer: A connected Gateway can set selfUser later from a presence event without replacing its client.
Hydration misses same-client identity updates: Session hydration only runs when the client differs; the connection lifecycle treats an unchanged connected client as unchanged, so the later identity does not schedule a refresh.
Existing test demonstrates the missed transition: The current test changes selfUser from null to operator on the same connection and asserts only one list call, preserving the unfiltered hydration behavior.
Findings 2 actionable findings [P1] Refresh when the signed-in owner becomes known
[P1] Retain appended shared pages during event refresh
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000

Result: FAIL (partial) — step 2 expect_output 1 passed: expected terminal output was not visible within 30 seconds: "1 passed"

node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128767-nlWujk/target$ node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeou
t 30000
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-128767-nlWujk/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128767-nlWujk/target





























Assertions:

  • FAIL expect_output: 1 passed

How this fits together

The Control UI receives a Gateway connection snapshot and session events, then refreshes the sidebar’s canonical session roster. The new plan makes an owner-scoped request visible before a shared request is merged into that roster.

flowchart LR
  Gateway[Gateway session service] --> Snapshot[Connection and presence snapshot]
  Snapshot --> Refresh[Session roster refresh]
  Refresh --> Owner[Owner-scoped request]
  Owner --> Sidebar[Provisional sidebar roster]
  Refresh --> Shared[Shared roster request]
  Shared --> Merge[Deduplicated canonical roster]
  Merge --> Sidebar
Loading

Before merge

  • Refresh when the signed-in owner becomes known (P1) - A presence event can set selfUser after the same client is already connected, but hydration only runs when that client changes. The roster therefore keeps its first unfiltered request and never takes this new owner-first path. Trigger one canonical refresh on the null-to-present identity transition and change the existing same-connection hydration test to cover it.
  • Retain appended shared pages during event refresh (P1) - After load-more, lastListOptions.limit records the combined visible count, but this plan hard-codes the subsequent shared request to 60. A later session event replaces the roster with only the first shared page and drops already loaded shared rows. Keep the shared cursor/window separately and add an owner-first append-then-event regression.
  • Resolve merge risk (P1) - Merging can leave operators with an unfiltered roster after late identity discovery and can make previously loaded shared sessions disappear after a session event.
  • Complete next step (P2) - Both blocking defects have a narrow owner-boundary repair and focused validation path, while real UI proof remains a separate pre-merge requirement.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.

Findings

  • [P1] Refresh when the signed-in owner becomes known — ui/src/lib/sessions/session-roster-refresh.ts:383-385
  • [P1] Retain appended shared pages during event refresh — ui/src/lib/sessions/session-roster-refresh.ts:396-400
Agent review details

Security

None.

PR surface

Source +43, Tests +310. Total +353 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 52 9 +43
Tests 4 312 2 +310
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 364 11 +353

Review metrics

Metric Value Why it matters
Production versus test delta production +43 net; tests/E2E +310 net The positive production growth adds a stateful two-phase roster owner, so the retained-window and identity-transition paths need direct regression coverage.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-owner-first.e2e.test.ts, serialized state: ui/src/lib/sessions/connection-hydration.test.ts, serialized state: ui/src/lib/sessions/index.event-refresh.test.ts, serialized state: ui/src/lib/sessions/list-options.test.ts, serialized state: ui/src/lib/sessions/session-capability.ts, serialized state: ui/src/lib/sessions/session-roster-refresh.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Repair the refresh owner before merge (recommended)
    Refresh on the null-to-present identity transition and preserve the shared pagination window through event-driven replacements.
  2. Pause the owner-first behavior
    Do not merge the new default until its identity and pagination invariants are covered by the canonical roster owner.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve owner-first loading, refresh when self identity becomes available on an existing connection, retain the shared pagination window through event refresh, add focused regressions, and attach redacted real Control UI proof.

Technical review

Best possible solution:

Keep one canonical owner-first refresh plan, trigger it when identity becomes available, and retain the shared global pagination window independently from the owner-expanded visible count.

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

Yes, source-reproducible: a same-client null-to-present selfUser update is explicitly modeled in the hydration test, and owner-first pagination loss follows the retained-options and fixed-limit path.

Is this the best way to solve the issue?

No. The two-phase refresh belongs in the roster owner, but it must react to the identity transition and keep shared-page state separate from the merged visible row count.

Full review comments:

  • [P1] Refresh when the signed-in owner becomes known — ui/src/lib/sessions/session-roster-refresh.ts:383-385
    A presence event can set selfUser after the same client is already connected, but hydration only runs when that client changes. The roster therefore keeps its first unfiltered request and never takes this new owner-first path. Trigger one canonical refresh on the null-to-present identity transition and change the existing same-connection hydration test to cover it.
    Confidence: 0.99
  • [P1] Retain appended shared pages during event refresh — ui/src/lib/sessions/session-roster-refresh.ts:396-400
    After load-more, lastListOptions.limit records the combined visible count, but this plan hard-codes the subsequent shared request to 60. A later session event replaces the roster with only the first shared page and drops already loaded shared rows. Keep the shared cursor/window separately and add an owner-first append-then-event regression.
    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 a23e77b61afe.

Labels

Label justifications:

  • P2: The change affects normal Control UI session discovery but has a bounded sidebar workflow blast radius.
  • merge-risk: 🚨 session-state: The PR changes canonical roster replacement, pagination retention, and when session rows become visible.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/lib/sessions/connection-hydration.test.ts ui/src/lib/sessions/index.event-refresh.test.ts --run --testTimeout 5000.
  • [P1] node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000.
  • [P1] pnpm check:changed.

What I checked:

Likely related people:

  • Peter Steinberger: Available path history associates the session hydration area with the UI startup-metadata repair. (role: recent area contributor; confidence: medium; commits: ad760c9994cf; files: ui/src/lib/sessions/index.ts, ui/src/lib/sessions/session-roster-refresh.ts)

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 (1 earlier review cycle)
  • reviewed 2026-08-24T14:59:09.742Z sha 3c62513 :: needs changes before merge. :: [P1] Refresh when the connection learns the signed-in owner | [P1] Retain the full shared window on event refresh

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 24, 2026
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/list-all-of-vito-s-sessions branch from 3c62513 to cb08717 Compare August 24, 2026 18:37
@roboclaw-bot

roboclaw-bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Implemented and verified the two ClawSweeper rank-up moves on exact head cb08717d8bafd27e7c975926626e7fb13d6f9221.

Review fixes

  • Late identity: a same-client selfUser: null -> Vito transition now schedules the canonical owner-first refresh. Unrelated same-client metadata changes still do not refresh.
  • Pagination: owner-first event refresh now retains the shared cursor window independently from owner-only rows, so loading 60 + 60 shared rows and then receiving an event keeps the full shared window plus the owner tail.

Both regressions failed on the previous head for the intended reason and pass on this head.

Visible proof

The first inspected capture shows only the owner roster while the shared sessions.list response is deliberately held. The second shows the shared row merged afterward while the owner row remains.

Owner roster published first

Owner-only roster

Shared roster merged afterward

Owner and shared roster

Validation

  • node scripts/run-vitest.mjs ui/src/lib/sessions/connection-hydration.test.ts ui/src/lib/sessions/index.event-refresh.test.ts ui/src/lib/sessions/list-options.test.ts --run --testTimeout 5000 — 60 passed
  • OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs ui/src/e2e/session-owner-first.e2e.test.ts --run --testTimeout 30000 --reporter=verbose — 1 passed
  • node scripts/run-vitest.mjs src/gateway/server.chat.gateway-server-chat.test.ts --run --testNamePattern 'agent.wait ignores lifecycle completion while same-runId chat.send is active' --testTimeout 30000 --reporter=verbose — passed after rebase onto current lifecycle code
  • node scripts/check-changed.mjs -- <7 touched files> — green: guards, formatting, dead exports, i18n, core/UI typechecks, lint
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean; patch correct (0.98)

Production LOC: +73/-13 (net +60) for the owner-first capability and its late-identity/pagination ownership; tests/E2E: +332/-9 (net +323).

Final landing gate

  • Exact-head CI: run 32763458744 — green
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 128767 — passed; hosted CI/Testbox gates accepted
  • Prepared SHA equals PR head: cb08717d8bafd27e7c975926626e7fb13d6f9221
  • Review artifacts: READY FOR /prepare-pr, zero findings, no proof gaps

@roboclaw-bot
roboclaw-bot merged commit b0e8a98 into main Aug 24, 2026
145 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@roboclaw-bot
roboclaw-bot deleted the openclaw/list-all-of-vito-s-sessions branch August 24, 2026 18:50
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
* feat(ui): load owner sessions before shared roster

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

* fix(ui): preserve owner roster across refreshes

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

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: VACInc <[email protected]>
steipete added a commit that referenced this pull request Aug 25, 2026
The owner-first roster plan (#128767) published its provisional owner-only
window as a full membership replacement on every primary refresh, so on
multi-owner gateways every other user's sessions blinked out of the sidebar
until the shared merge landed - up to once a second under event load. The
provisional phase now publishes only when no roster is on screen (cold start
keeps its fast first paint), and the shared phase merges the owner window
from the initial load's returned rows instead of reading published state;
the mergeExisting option is gone. A warm refresh whose shared phase fails
now keeps the previous roster instead of collapsing to owner-only rows.

The thread and child session lists also rendered rows positionally with
map()+keyed(), so any reorder tore down and rebuilt every shifted row's DOM
(spinners restarting, avatars remounting). Both now use repeat() with key
identity, matching the catalog renderer.

Regression coverage: owner-first-roster.test.ts pins the publish-sequence
invariant and shared-failure retention (both fail pre-fix); the new browser
test proves row DOM identity survives a reorder (fails on map()). The
owner-first tests moved out of index.event-refresh.test.ts, which hit the
max-lines limit.
steipete added a commit that referenced this pull request Aug 25, 2026
The owner-first roster plan (#128767) published its provisional owner-only
window as a full membership replacement on every primary refresh, so on
multi-owner gateways every other user's sessions blinked out of the sidebar
until the shared merge landed - up to once a second under event load. The
provisional phase now publishes only when no roster is on screen (cold start
keeps its fast first paint), and the shared phase merges the owner window
from the initial load's returned rows instead of reading published state;
the mergeExisting option is gone. A warm refresh whose shared phase fails
now keeps the previous roster instead of collapsing to owner-only rows.

The thread and child session lists also rendered rows positionally with
map()+keyed(), so any reorder tore down and rebuilt every shifted row's DOM
(spinners restarting, avatars remounting). Both now use repeat() with key
identity, matching the catalog renderer.

Regression coverage: owner-first-roster.test.ts pins the publish-sequence
invariant and shared-failure retention (both fail pre-fix); the new browser
test proves row DOM identity survives a reorder (fails on map()). The
owner-first tests moved out of index.event-refresh.test.ts, which hit the
max-lines limit.
steipete added a commit that referenced this pull request Aug 25, 2026
The owner-first roster plan (#128767) published its provisional owner-only
window as a full membership replacement on every primary refresh, so on
multi-owner gateways every other user's sessions blinked out of the sidebar
until the shared merge landed - up to once a second under event load. The
provisional phase now publishes only when no roster is on screen (cold start
keeps its fast first paint), and the shared phase merges the owner window
from the initial load's returned rows instead of reading published state;
the mergeExisting option is gone. A warm refresh whose shared phase fails
now keeps the previous roster instead of collapsing to owner-only rows.

The thread and child session lists also rendered rows positionally with
map()+keyed(), so any reorder tore down and rebuilt every shifted row's DOM
(spinners restarting, avatars remounting). Both now use repeat() with key
identity, matching the catalog renderer.

Regression coverage: owner-first-roster.test.ts pins the publish-sequence
invariant and shared-failure retention (both fail pre-fix); the new browser
test proves row DOM identity survives a reorder (fails on map()). The
owner-first tests moved out of index.event-refresh.test.ts, which hit the
max-lines limit.
steipete added a commit that referenced this pull request Aug 25, 2026
…#129558)

* fix(ui): stop warm sidebar refreshes from blanking foreign-owned rows

The owner-first roster plan (#128767) published its provisional owner-only
window as a full membership replacement on every primary refresh, so on
multi-owner gateways every other user's sessions blinked out of the sidebar
until the shared merge landed - up to once a second under event load. The
provisional phase now publishes only when no roster is on screen (cold start
keeps its fast first paint), and the shared phase merges the owner window
from the initial load's returned rows instead of reading published state;
the mergeExisting option is gone. A warm refresh whose shared phase fails
now keeps the previous roster instead of collapsing to owner-only rows.

The thread and child session lists also rendered rows positionally with
map()+keyed(), so any reorder tore down and rebuilt every shifted row's DOM
(spinners restarting, avatars remounting). Both now use repeat() with key
identity, matching the catalog renderer.

Regression coverage: owner-first-roster.test.ts pins the publish-sequence
invariant and shared-failure retention (both fail pre-fix); the new browser
test proves row DOM identity survives a reorder (fails on map()). The
owner-first tests moved out of index.event-refresh.test.ts, which hit the
max-lines limit.

* test(ui): prove foreign-owned rows survive a warm owner-first refresh

Browser-level regression for the warm-refresh half of this fix: holds the
shared phase deferred after a sessions.changed event and asserts the
foreign-owned row never leaves the DOM. Fails on pre-fix code (the row
count drops to zero the moment the provisional owner window publishes).

* test(anthropic): pin the local retired-profile id to the plugin-sdk constant

The provider-policy artifact keeps this id as a local literal so it never
imports the provider-auth barrel (#129052 regressed dist-less CI checkouts
into 120s jiti compiles of ~2.2k modules); this parity test stops the two
constants from drifting apart.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
…openclaw#129558)

* fix(ui): stop warm sidebar refreshes from blanking foreign-owned rows

The owner-first roster plan (openclaw#128767) published its provisional owner-only
window as a full membership replacement on every primary refresh, so on
multi-owner gateways every other user's sessions blinked out of the sidebar
until the shared merge landed - up to once a second under event load. The
provisional phase now publishes only when no roster is on screen (cold start
keeps its fast first paint), and the shared phase merges the owner window
from the initial load's returned rows instead of reading published state;
the mergeExisting option is gone. A warm refresh whose shared phase fails
now keeps the previous roster instead of collapsing to owner-only rows.

The thread and child session lists also rendered rows positionally with
map()+keyed(), so any reorder tore down and rebuilt every shifted row's DOM
(spinners restarting, avatars remounting). Both now use repeat() with key
identity, matching the catalog renderer.

Regression coverage: owner-first-roster.test.ts pins the publish-sequence
invariant and shared-failure retention (both fail pre-fix); the new browser
test proves row DOM identity survives a reorder (fails on map()). The
owner-first tests moved out of index.event-refresh.test.ts, which hit the
max-lines limit.

* test(ui): prove foreign-owned rows survive a warm owner-first refresh

Browser-level regression for the warm-refresh half of this fix: holds the
shared phase deferred after a sessions.changed event and asserts the
foreign-owned row never leaves the DOM. Fails on pre-fix code (the row
count drops to zero the moment the provisional owner window publishes).

* test(anthropic): pin the local retired-profile id to the plugin-sdk constant

The provider-policy artifact keeps this id as a local literal so it never
imports the provider-auth barrel (openclaw#129052 regressed dist-less CI checkouts
into 120s jiti compiles of ~2.2k modules); this parity test stops the two
constants from drifting apart.
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 maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M 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