Repository navigation
refactor(ui): key Claws detail by package lifetime - #177004
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -27, Tests +30. Total +3 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 2:17 AM ET / 06:17 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
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.
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
pnpm test ui/src/pages/agents-home/claws-home.test.ts --maxWorkers=1pnpm tsgo:uipr-simplifyand complete-source review by implementing lane and coordinatorpnpm deadcode:knipproduction scangit diff --checkTests 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_UNTRACKEDmessages 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
createEffectcreateRenderEffectuntrackaddEventListenerquerySelector(All)flushrunWithOwner/getOwnerNo 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 withci:fullcompleted; 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 readsnull.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.