Skip to content

fix(ui): preserve owner context in deferred sidebar panels - #177229

Closed
vincentkoc wants to merge 1 commit into
openclaw/research-native-search-20261019from
openclaw/ui-deferred-panel-owner-20261019
Closed

vincentkoc wants to merge 1 commit into
openclaw/research-native-search-20261019from
openclaw/ui-deferred-panel-owner-20261019

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Deferred sidebar plugin rendering can lose the Solid context owner before mounting.

User Impact

Deferred sidebar panels retain their application context and do not mount after disposal; no research-specific behavior is added to core UI.

Why This Change Was Made

Capture the existing owner before the asynchronous handoff and render through supported runWithOwner, retaining the disposed guard. This is a generic owner fix with no research-specific core UI logic.

Evidence

The original 22 sidebar-owner tests, including context/disposal coverage, remain valid for this unchanged patch. The prior focused UI typecheck used ES2024 declarations for the unchanged Map.groupBy dependency; no new UI or full-repository typecheck is claimed.

Corrected composed candidate: 44220d472dc9f4b65a1888d224142c0f6b4efe88, tree a5430dd7d5e29844376a1435cae4b77f545b08d8. Focused owner tests (62), core and strict plugin types, lint, formatting, changed-file line cap, assertion safety and SDK export sync passed on the corrected source. The affected plugin runtime and standard UI asset build passed at this signed head. SDK strict-smoke passed at 80da34f9d764b5222a035bce6fc10cf6b2083d6c; its SDK/core source is unchanged here, so that proof is reused only for that scope, not relabeled as a new full build. Independent focused re-review closed the lifecycle defect at the corrected composed head with no remaining actionable P2+ in that scope. Earlier failed review observations remain historical; this is draft-publication clearance, not CODEOWNER, merge, deployment or production-auth approval.

The earlier full build remains exact-head evidence only at 56b4f9544553d53d7e29e887486389da009f6bab. Its two nonfatal UI warnings were chat boot 1,491,504 B gzip vs 1,490,000 B, and new boot 1,050,753 B vs 1,050,000 B. The Codex leaf already measured 1,491,383 B and 1,050,632 B; composed UI added 121 B to each. No clean-parent/budget claim or limit change.

Global max-lines retains three unchanged parent-identical failures: ui/src/pages/chat/components/chat-message.test.tsx, ui/src/pages/config/config-page-state.ts, and ui/src/pages/sessions/sessions-page-state.ts. No guard was relaxed. Live API, Google research, legacy OAuth and SIWC credentials are not source-qualified in this environment; this is not a claim that an account or credential is absent. Deterministic built-UI evidence does not establish live-provider, deployed-viewer or canonical-dist-serving acceptance. Broad quality/provider parity is not established. Draft CI skips are not landing approval.

Stack and Size

Depends on #177228. Review against the explicit parent branch, not main.

Parent: 0609209b6bc228b32809c059eb24af96eae4e02d (openclaw/research-native-search-20261019). Parent-relative lines: production +12/−2; tests +87/−3; docs/config +0/−0.

@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.

@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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: blocked before merge.

What this changes

This PR restores the captured Solid owner when mounting deferred sidebar content and adds context and disposal coverage.

Example: A deferred Review panel mounts under application context session-first.

  • Before: The asynchronous mount loses the application context.
  • After: The panel inherits session-first, retains its content while hidden, and retires when its owner is disposed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with useful lifecycle tests and no actionable introduced defect, but harness-level evidence and an already-replaced main implementation limit its standalone value.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence describes owner-context and disposal tests and builds, but provides no browser artifact exercising the changed sidebar mount.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: No · Fix scope: Complete
User problem: Deferred sidebar content can lose its application context when mounted asynchronously.
Reason: The repair is useful against its pinned parent, but its production mechanism is redundant with main's merged Portal cutover; the lifecycle coverage remains useful during stack integration.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open for maintainer handling of the draft stack: the patch is correct against its pinned parent, but main already replaced the faulty deferred renderer with an owned Portal.

Priority: P2
Reviewed head: d593cd04d85d697619de469401e36f2a1b40f941

Before merge

  • Product: not worth merging - The repair is useful against its pinned parent, but its production mechanism is redundant with main's merged Portal cutover; the lifecycle coverage remains useful during stack integration.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show this context and disposal scenario through the shipped browser UI or an observed red-on-base run.
Agent review details

How this fits together

The Control UI sidebar region receives layout and panel definitions from the chat pane and mounts retained panel content into a sibling DOM outlet.

flowchart LR
  A[Application provider] --> B[Sidebar region bridge]
  C[Chat pane layout and definitions] --> B
  B --> D[Deferred mount]
  D --> E[Restored Solid owner]
  E --> F[Sidebar panel outlet]
Loading

Technical review

Best possible solution:

Preserve main's owned Portal implementation and carry useful context and disposal coverage through the stack integration.

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

Source inspection establishes the owner-loss path on the pinned parent, but current main removes that handoff; no target code or tests were run during this read-only review.

Is this the best way to solve the issue?

Restoring the ambient owner is the smallest complete repair for the parent's deferred renderer, with no new owner or parallel path; main's existing Portal cutover is the better final implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c4de9cd4c557; fix evidence: commit 41e10e238776, main fix timestamp 2026-10-19T04:54:02Z.

Provenance checked

  • Deferred sidebar renderer keeps the original intent (5ef9e1a: The Solid migration retained the caller-owned sibling outlet and deferred mounting until after the bridge commit to avoid a nested flush.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +10, Tests +84. Total +94 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 12 2 +10
Tests 1 87 3 +84
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 99 5 +94

Root-cause cluster

Relationship: superseded
Canonical: #176727
Summary: The merged sidebar ownership refactor removes the exact deferred renderer this PR repairs.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused sidebar lifecycle repair on the draft parent; current main has already removed the affected renderer.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

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, 6:23 AM ET / 10:23 UTC.

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Closing as superseded by #176727. That change removed the separate deferred rendering root this PR repairs and now renders the panel through a Portal within the owning component. Current main retains that implementation, so the context-loss and post-disposal mounting paths addressed here no longer exist. This patch is no longer needed.

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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants