Repository navigation
refactor(ui): adopt @lit/task across remaining page surfaces - #115274
Conversation
67da174 to
0d45af5
Compare
0d45af5 to
7914fc6
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 12:20 PM ET / 16:20 UTC. ClawSweeper reviewWhat this changesThe branch replaces remaining Control UI page-level read lifecycles with Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep this PR open for protected-label maintainer handling. The stated approach continues the already-merged Lit Task migration, but this read-only review could not complete the required current-tree, scoped-policy, and direct dependency-contract inspection; the provided PR body also contains validation claims rather than inspectable after-fix UI proof. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI loads gateway-backed operational data for settings, diagnostics, skills, tasks, logs, and terminal views. Each page derives request inputs from the active gateway and selection state, then renders the resulting data or loading/error state to the operator. flowchart LR
A[Operator opens a Control UI page] --> B[Gateway and page selection state]
B --> C[Request arguments]
C --> D[Lit Task read lifecycle]
D --> E[Gateway RPCs with cancellation]
E --> F[Fresh page state]
D --> G[Stale or cancelled result discarded]
F --> H[Rendered operator view]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -51, Tests +5. Total -46 across 27 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the established read-only Lit Task pattern, then have a maintainer verify the current branch against the prior wave’s dependency semantics and review redacted live Control UI evidence covering representative gateway replacement, cancellation, and error/loading transitions. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is presented as a behavior-preserving refactor, not a report of a standalone current-main failure. The supplied material identifies stale-response races as the class being structurally reduced but does not provide a failing reproduction for this branch. Is this the best way to solve the issue? Unclear. The Lit Task approach is consistent with the related merged first wave, but the required direct inspection of current call sites, scoped UI policy, and the installed dependency contract was not completed in the available read-only environment. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d44d0d96ad69. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…etwork-none * origin/main: feat(skills): shared authoring standards make learned skills routable (#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (#115248) refactor(ui): adopt @lit/task across remaining page surfaces (#115274) fix(slack): cap chat.update edit text at the 4000-char limit, not the 8000 send limit (#115027) [AI-assisted] docs: recommend Node 26 in quickstart, landing, and platform install docs (#115064) refactor(workboard): tidy Control UI card execution helpers (#115195) perf(agents): amortize history-limit eviction with hysteresis (#115273) (#115281)
…-20260728 * origin/main: fix(tui): order delayed prompts before completed replies (#115219) feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (#115280) fix(qa): restore full-stack scenarios and truthful suite exits (#115290) feat(memory): backfill past sessions from Control UI (#115266) docs: link macOS onboarding pages to app download (#111361) feat(skills): shared authoring standards make learned skills routable (#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (#115248) refactor(ui): adopt @lit/task across remaining page surfaces (#115274)
* origin/main: (62 commits) feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (openclaw#115280) fix(qa): restore full-stack scenarios and truthful suite exits (openclaw#115290) feat(memory): backfill past sessions from Control UI (openclaw#115266) docs: link macOS onboarding pages to app download (openclaw#111361) feat(skills): shared authoring standards make learned skills routable (openclaw#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (openclaw#115248) refactor(ui): adopt @lit/task across remaining page surfaces (openclaw#115274) fix(slack): cap chat.update edit text at the 4000-char limit, not the 8000 send limit (openclaw#115027) [AI-assisted] docs: recommend Node 26 in quickstart, landing, and platform install docs (openclaw#115064) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) ...
…w#115274) * refactor(ui): adopt @lit/task across remaining page surfaces * refactor(ui): keep approval history pagination explicit * fix(ui): preserve task refresh ordering
What Problem This Solves
Wave 2 of the operator-directed @lit/task adoption (#115131 was wave 1). The remaining page surfaces still hand-rolled the async lifecycle Task replaces: monotonic generation/epoch counters compared after every await, post-await isConnected checks, parallel loading/error booleans, and bespoke inflight-dedup promises — the pattern the original audit counted ~85 times across 45 files.
Why This Change Was Made
Same rationale as wave 1: args-keyed Tasks discard stale completions structurally, supply per-run AbortSignals, and delete the per-site counter discipline. Rules held constant: Tasks are for reads (mutation lanes, pagination-append, and streaming stay hand-rolled — approvals pagination was deliberately skipped when the Task added scaffolding instead of removing it); debounces kept, feeding args; render output byte-identical.
User Impact
No behavior change; a class of stale-response races across settings/ops pages is now handled structurally. Net −19 non-test LOC while removing 16 more bespoke lifecycle mechanisms.
Evidence
Migrated: sidebar-attention, github-link-hovercard, pr-indicators (controller-hosted Task with row cancellation), terminal-panel session picker (fixes the stale-path loading-flag bug structurally), workboard-widget (refreshPromise/refreshPending/refreshGeneration triple deleted), skills-page (search Task passes AbortSignal into the RPC), skill-workshop, profile, logs, nodes, model-providers, tasks-page read lane (refresh-event buffer coupling preserved), model-control (preference-restore selectionGeneration retained as write-adjacent), channels read lane, debug, config (six-conjunct isCurrentSystemInfoRequest collapsed into args + visibility predicate). Skipped with reasons: approvals-page (manual pagination stays explicit), plus any target where Task added net code.
Validation: full UI e2e 104 files / 371 tests; focused + cross-page suites (incl. gateway-source-replacement) green; UI prod+test tsgo; full lint incl. raw-copy scanner (zero findings); both deadcode lanes; full format check; git diff --check; autoreview clean. Numstat non-test: +854/−873 (net −19).