Skip to content

refactor(ui): key Claws detail by package lifetime - #177004

Merged
steipete merged 1 commit into
mainfrom
solid2/w-zero-claws-package-lifetime
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-zero-claws-package-lifetime

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Claws detail pages kept one catalog model alive as the URL moved between packages, then mirrored package identity into an effect and a second route-tracking field. Key the detail component by package name so the existing Gateway binding and model disposal retire the previous package. Same-package route revalidation keeps the model and DOM, and the search popup retains its existing lifetime.

The catalog loader already selects the requested package. Remove the redundant syncInitialSelection, routedPackageName, and effect. Existing tags, DOM markup, styles, and lazy imports are unchanged.

Evidence

Check Result
Frozen install Passed
pnpm test ui/src/pages/agents-home/claws-home.test.ts --maxWorkers=1 15 passed; 2.19 s tests, 9.51 s Vitest, 11.28 s shard
pnpm tsgo:ui Passed
Scoped oxlint on the three changed files Passed
pr-simplify and complete-source review by implementing lane and coordinator Passed
Isolated full-source independent review No actionable P0–P3 findings
pnpm deadcode:knip production scan Passed once; 1m 49.4s
git diff --check Passed

Tests now mount the real ClawsPage. They preserve same-package detail DOM without another search, clear selection after a package change, and prove A→B→A retires a pending Add: only the later Add opens its new agent chat. Existing popup, file-preview, trust-consent, and plugin-review cases pass in the same test file.

The run emitted four STRICT_READ_UNTRACKED messages per test without stack traces, including untouched popup cases. Their precise source is unproven; they were not classified as inherited or suppressed. No local build, E2E, screenshots, startup measurement, or lease was run: this focused lifecycle refactor changes no visual markup, styles, imports, or startup code.

Refactor measurements

Pattern (two touched production files) Before After
Rendering-controller pattern 0 0
createEffect 1 0
createRenderEffect 0 0
untrack 0 0
addEventListener 0 0
querySelector(All) 0 0
Imperative class strings 0 0
Production flush 0 0
runWithOwner / getOwner 0 0

No measured survivors. Production LOC 686 → 659 (-27); test LOC 320 → 350 (+30). The test growth moves proof to the real route boundary and adds same-package retention and stale-navigation assertions without adding a new test suite.

Base: fe15736afeaf113415ab978a58212be81e3d0ed3. Head: accf4195b63996e912510240b285abba8dffae12. Full PR CI with ci:full completed; results follow.

Exact-head CI and inherited failures

CI 39207624868 completed for accf4195b63996e912510240b285abba8dffae12. All UI unit, ordinary Control UI E2E, browser-extension, type/lint, security, and strict performance jobs passed. The only failed nonaggregate jobs contain:

  • ui-e2e-real-gateway extensions/qa-lab/src/control-ui-media-transcript.real-gateway.e2e.test.ts > Control UI media transcript replay with a real Gateway > delivers PowerPoint and keeps persisted attachment failures replay-safe.

The same exact failing names and signatures appear in the latest completed scheduled main run 39205204421, at e3cc361b27cb48b494708891fee8df83e6811946. The PowerPoint failure reads null.message; the reader failure, where listed, is a 120-second timeout. The actual CI checkout, ordered parents and merge tree are retained and verified, and the named failure-source blobs match the CI base and scheduled-main head. Landing uses the native inherited-failure/admin route; failed CI is not represented as green.

Startup was 337,148 B gzip JavaScript, 7 requests, plus 38,500 B gzip CSS, 1 request. Same-machine base/head chat boot was 1,484,094 → 1,484,075 B (-19 B); New Session was 1,049,581 → 1,049,564 B (-17 B). Lazy boundaries are unchanged.

Keep same-package route refreshes on the current catalog model and dispose package-specific requests and delayed chat handoff when the package changes. Remove the duplicate route-selection effect and prove retention and late Add retirement through ClawsPage.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 19, 2026 06:02
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T06:07:06.592831Z accf419 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR keys Claws detail components by package name and removes redundant route-selection synchronization.

Example: Navigate from @openclaw/workflow-operator to @openclaw/another-claw and back.

  • Before: One catalog model tracks package changes through an effect and a separate route-identity field.
  • After: Each package change disposes the previous detail model, while same-package revalidation preserves its model and DOM.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A small, coherent patch with meaningful boundary tests and no identified defect; changed-scenario evidence remains limited to an in-process harness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; its focused page/model tests use mocked RPCs, and broader CI does not specifically demonstrate the changed navigation scenarios.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Package navigation must preserve same-package detail state and prevent retired detail work from redirecting the current view.
Reason: The maintainer-authored direction removes a second lifetime-tracking mechanism while preserving catalog, consent, preview, and chat-handoff behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a useful maintainer-authored simplification with no actionable code findings; the failed CI case also fails identically on scheduled main.

Priority: P3
Reviewed head: accf4195b63996e912510240b285abba8dffae12

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not demonstrate package revalidation and pending-Add retirement in a running browser, or a base-red regression run.
Agent review details

How this fits together

The Control UI Claws route translates a package URL into a catalog detail component, whose existing Gateway binding owns request retirement and Add-to-chat results.

flowchart LR
  A[Package URL] --> B[Claws route]
  B --> C[Package keyed detail]
  C --> D[Catalog model]
  D --> E[Gateway page binding]
  E --> F[Catalog and Add RPCs]
  D --> G[Agent chat handoff]
Loading

Technical review

Best possible solution:

Use the package-keyed component lifetime and existing disposal owners, retaining the popup's separate lifetime.

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

This is a behavior-preserving refactor; source inspection verifies the duplicated lifetime tracking, but no product reproduction was run during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete simplification: package identity owns component lifetime, existing disposal retires work, and both production callers remain covered.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 30937ee66673.

Provenance checked

  • Claws package selection and request retirement keeps the original intent (f469f6d: The original feature supplied package details and Add-to-chat, including retirement of pending Add results on route changes.)
  • Solid rendering and selection effect keeps the original intent (refactor(ui): remove Claws rendering bridges #173470: Direct Solid rendering replaced bridges while preserving cancellation and handoff; later merged refactors removed the test-only initialEntry path and explicitly left live catalog selection as follow-up work.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit f469f6d adds ui/src/pages/agents-home/claws-catalog-dialog.tsx:183 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f469f6da5636; files: ui/src/pages/agents-home/claws-catalog-dialog.tsx)

PR surface

Source -27, Tests +30. Total +3 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 15 42 -27
Tests 1 39 9 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 54 51 +3

Review metrics

Metric Value Why it matters
Production versus test LOC Production −27; tests +30 Removes duplicate lifecycle synchronization while extending the existing suite through the real route component.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: Focused lifecycle simplification with preserved behavior and no demonstrated urgent user regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • A browser trace of same-package revalidation and A→B→A pending-Add retirement would strengthen confidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 2:17 AM ET / 06:17 UTC.

@steipete
steipete merged commit 0b67659 into main Oct 19, 2026
164 of 170 checks passed
@steipete
steipete deleted the solid2/w-zero-claws-package-lifetime branch October 19, 2026 06:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
Keep same-package route refreshes on the current catalog model and dispose package-specific requests and delayed chat handoff when the package changes. Remove the duplicate route-selection effect and prove retention and late Add retirement through ClawsPage.
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant