Repository navigation
Commit 03262df
authored
refactor(ui): tidy the roster refresh owner and session test harnesses (#129757)
* refactor(ui): name the roster load decision blocks and dedupe test harnesses
Extract preserveCurrentSessionRow and retainSessionPaginationWindow from
load()'s 140-line body so its spine reads as normalize -> loading publish ->
request+owner merge -> provisional return -> decide -> publish; collapse the
hasForegroundListOptions/hasSeededListOptions boolean pair into one closed
listOptionsSource mode. Behavior-neutral.
The event-refresh and owner-first suites hand-rolled copies of
sessionsResult/createHarness/sessionChangedEvent; session-capability
test-support already owned the canonical versions, so it gains selfUser
support plus createSessionCapabilityHarness and the copies are deleted.
* test(ui): move the attention-panel surface test to its component suite
The app-sidebar harness mocks sidebar-attention.ts away (health RPCs must
stay out of client call-order assertions), so the transient-menus case
asserting the real attention panel renders was import-order dependent:
deterministic-fail in local single-file runs on clean main, pass in CI's
worker mix. The invariant (panel opens inside openclaw-menu-surface) now
lives in sidebar-attention.test.ts against the real component, and the
harness mock documents where attention rendering coverage belongs.
* test(ui): give the moved attention-panel test its agent selection
sidebar-attention reads context.agentSelection.state during refresh
ownership; CI's striped worker mix exercised that path and crashed the
render, leaving the trigger unrendered.1 parent 316c341 commit 03262df
7 files changed
Lines changed: 223 additions & 233 deletions
File tree
- ui/src
- components
- lib/sessions
- test-helpers
- app-sidebar-cases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
240 | 274 | | |
241 | 275 | | |
242 | 276 | | |
| |||
0 commit comments