Skip to content

refactor(ui): scope native gateway observation to Solid - #174367

Merged
steipete merged 2 commits into
mainfrom
solid2/w-idiom2-chat-native
Oct 16, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-idiom2-chat-native

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Each chat pane registered a host controller solely to redraw when the native Gateway selection changed. The mounted Solid runtime already owns presentation subscriptions.

The native capability now joins that existing projection list. This removes observeNativeGateway and its controller wiring. isNativeLocalGateway() and localEditorFilePath() still read the authoritative native snapshot synchronously, including while the pane is parked. No selection, lease, media, or connection state moves into Solid.

Evidence

Check Result
UI typecheck pnpm tsgo:ui passed
Mounted subscription and progress-history tests All 18 cases passed after integrating the landed progress refactor
Scoped lint, formatting, diff check Passed; authored mock-export correction passes, with inherited guard failures documented below
Production Knip Passed
Independent P0–P2 review Passed with unchanged native owner, projection and lifecycle source context; no actionable findings
Full UI, browser-extension and real-Gateway proof Passed in run 38926293743; two inherited static guard failures are qualified below

The first test run found an incomplete session fixture: a delayed roster subscription reached its missing observeRow. The mounted tests now use the existing real session capability; the corrected run passes without unhandled errors.

No markup, styles, host tags, routes or lazy boundaries change. This is presentation-lifetime cleanup, so no screenshots or local full build/E2E run are needed. CI supplies strict same-machine startup/performance proof.

Size and idiom census

Touched production files: 884 → 881 LOC (−3). One native observation controller instance is removed. Literal controller-pattern references 11 → 11; createEffect 2 → 2; untrack 2 → 2; native listener registrations 2 → 2; DOM queries 0 → 0. The native capability retains its existing app-lifetime listener and synchronous snapshot; the view owns only observation.

Final CI and landing

The initial native test mock needed to preserve real module exports. It now spreads importOriginal() before replacing the capability factory. Main integration retains both the landed progress projections and native observation. All 18 focused subscription/progress-history cases, UI typecheck, production Knip, formatting and independent review passed on final head 659d914a30ff804804073d1b0dad062ae37922e9.

CI run 38926293743, attempt 1 completed all 64 jobs with no cancellations. UI, Control UI E2E, browser-extension, real-Gateway, type, lint, security and performance coverage passed. Two static guard roots and their downstream CI gate remain failed:

  • The mock-export guard reports the unchanged Doctor test at src/flows/doctor-plugin-source-captures.test.ts:32.
  • Duplicate-scan coverage reports unchanged root file cli-parent-lifetime.mjs outside the scan targets.

Both exact guard commands reproduce the same failures on PR merge base 75d827b3b6074037ddda5a5617d4a7f2a4070e05. The actual CI checkout is retained merge 46968c17edd7f1767b62a5218e9caecf7cb7603d; its ordered parents and tree were verified, its effective diff contains only the four reviewed native UI/test files, and both guard inputs are identical to the CI base. No baseline, ignore, or unrelated source was changed.

Strict same-machine performance comparison passed: 339,554 B startup JavaScript gzip, 7 JS requests and 1 CSS request / 38,786 B. Chat-route JavaScript changed +95 B gzip, with 31 requests unchanged; CSS is unchanged. Startup remains below the original 374,285 B budget.

The cancelled auto request was replaced through native inherited-failure recovery using this exact attempt and source evidence. Merged as a0ac3098eec454a4286176a9a51e6724139a35fb; the landing-parent audit matched. The static guard failures remain recorded as failures.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T15:46:38.640859Z 659d914 New commits
ℹ️ 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.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 15:34
@steipete
steipete disabled auto-merge October 16, 2026 15:40
@clawsweeper clawsweeper Bot added 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. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves native Gateway redraw observation from a chat host controller into the mounted Solid runtime.

Example: Switch from local to remote Gateway while viewing /workspace/file.ts.

  • Before: A host controller requests the redraw that removes the editor action.
  • After: The Solid projection triggers the redraw; synchronous locality checks still return no local editor path.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused cutover appears correct and useful; direct native-switch evidence is limited to the mounted harness.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary contributor proof gate and introduces no material authority change; the mounted test covers synchronous locality, parking, reveal, disposal, and remount with a substituted capability, while passing broad CI does not independently demonstrate the changed native-switch path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: There is no intended visible behavior change; chat still carries a separate host controller for presentation observation.
Reason: The maintainer-authored direction matches the existing Solid migration and removes an obsolete lifecycle path without transferring native selection authority.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR completes a useful, maintainer-directed Solid ownership cleanup, and no introduced defect was found. The required CI gate remains red.

Priority: P3
Reviewed head: 659d914a30ff804804073d1b0dad062ae37922e9

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The focused test substitutes the native capability and render callback, so it does not demonstrate Gateway switching through the shipped native UI.
Agent review details

How this fits together

The native capability owns Gateway selection snapshots; chat observes those snapshots to refresh editor availability while preserving parked-pane rendering and cleanup.

flowchart LR
  A[Native Gateway event] --> B[Native capability snapshot]
  B --> C[Synchronous locality checks]
  B --> D[Solid source projection]
  D --> E[Parked render lifecycle]
  E --> F[Chat editor actions]
  C --> F
Loading

Technical review

Best possible solution:

Retain the existing native snapshot owner and use the existing Solid projection lifecycle for chat redraw observation.

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

This is a behavior-preserving refactor rather than a reported bug; source inspection confirms the redundant host observation on current main.

Is this the best way to solve the issue?

The change follows the established projection owner, removes the superseded helper and registration, and leaves synchronous domain decisions intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1b9fe6a8cd25.

Provenance checked

  • Native locality and observation keeps the original intent (cbd4841: Hide editor handoffs for remote files using authoritative native locality, and update availability when selection changes.)
  • Chat presentation subscriptions keeps the original intent (b203fea: Move presentation observation into the mounted Solid runtime while retaining synchronous domain ownership and reserving native observation for its separate migration.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -3, Tests +92. Total +89 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 6 9 -3
Tests 1 94 2 +92
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 100 11 +89

Review metrics

Metric Value Why it matters
Production versus test changes Production +6/-9; tests +94/-2 Production shrinks by three lines; test growth covers locality reads and subscription parking, disposal, and remount without adding a production seam.

Labels

Label changes:

  • add P3: This is focused lifecycle cleanup with preserved user-facing behavior and no established current product failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is focused lifecycle cleanup with preserved user-facing behavior and no established current product failure.
  • 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.

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 16, 2026, 12:14 PM ET / 16:14 UTC.

@steipete
steipete merged commit a0ac309 into main Oct 16, 2026
106 of 110 checks passed
@steipete
steipete deleted the solid2/w-idiom2-chat-native branch October 16, 2026 16:19
@steipete

Copy link
Copy Markdown
Contributor Author

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

vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits)
  fix(decisions): align accounting ratchet evidence
  feat(memory): activate PostgreSQL memory search and lifecycle (#174374)
  fix: join process shutdown and isolate runtime fixtures (#174359)
  refactor(ui): scope native gateway observation to Solid (#174367)
  refactor(ui): own canvas widget lifetime in Solid (#174370)
  perf(control-ui): keep agent avatar faces stable across agent publications (#174239)
  perf(models): release unused account catalog instructions (#174361)
  refactor(ui): own composer command menus in Solid stores (#174321)
  refactor(ui): separate sidebar filter state from view lifecycle (#174352)
  test(release): make artifact qualification deadlines deterministic
  fix(codex): preserve sandboxed process inspection and setup errors (#174284)
  fix(gateway): stop worker processes before draining their queues (#174312)
  refactor(agents): reuse prepared tool facts (#174349)
  test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331)
  refactor(ui): replace MCP retirement host adapters with a factory (#174375)
  refactor(logging): remove redundant native success traces (#174330)
  refactor(test): remove dead control-plane fixture branches (#174377)
  refactor(mcp): remove test-only session runtime seams (#174347)
  feat(matrix): account-root state databases follow the selected engine (#174315)
  refactor(discord): collapse private interaction and factory seams (#174322)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits)
  fix(decisions): align accounting ratchet evidence
  feat(memory): activate PostgreSQL memory search and lifecycle (#174374)
  fix: join process shutdown and isolate runtime fixtures (#174359)
  refactor(ui): scope native gateway observation to Solid (#174367)
  refactor(ui): own canvas widget lifetime in Solid (#174370)
  perf(control-ui): keep agent avatar faces stable across agent publications (#174239)
  perf(models): release unused account catalog instructions (#174361)
  refactor(ui): own composer command menus in Solid stores (#174321)
  refactor(ui): separate sidebar filter state from view lifecycle (#174352)
  test(release): make artifact qualification deadlines deterministic
  fix(codex): preserve sandboxed process inspection and setup errors (#174284)
  fix(gateway): stop worker processes before draining their queues (#174312)
  refactor(agents): reuse prepared tool facts (#174349)
  test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331)
  refactor(ui): replace MCP retirement host adapters with a factory (#174375)
  refactor(logging): remove redundant native success traces (#174330)
  refactor(test): remove dead control-plane fixture branches (#174377)
  refactor(mcp): remove test-only session runtime seams (#174347)
  feat(matrix): account-root state databases follow the selected engine (#174315)
  refactor(discord): collapse private interaction and factory seams (#174322)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits)
  feat(memory): activate PostgreSQL memory search and lifecycle (#174374)
  fix: join process shutdown and isolate runtime fixtures (#174359)
  refactor(ui): scope native gateway observation to Solid (#174367)
  refactor(ui): own canvas widget lifetime in Solid (#174370)
  perf(control-ui): keep agent avatar faces stable across agent publications (#174239)
  perf(models): release unused account catalog instructions (#174361)
  refactor(ui): own composer command menus in Solid stores (#174321)
  refactor(ui): separate sidebar filter state from view lifecycle (#174352)
  test(release): make artifact qualification deadlines deterministic
  fix(codex): preserve sandboxed process inspection and setup errors (#174284)
  fix(gateway): stop worker processes before draining their queues (#174312)
  refactor(agents): reuse prepared tool facts (#174349)
  test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331)
  refactor(ui): replace MCP retirement host adapters with a factory (#174375)
  refactor(logging): remove redundant native success traces (#174330)
  refactor(test): remove dead control-plane fixture branches (#174377)
  refactor(mcp): remove test-only session runtime seams (#174347)
  feat(matrix): account-root state databases follow the selected engine (#174315)
  refactor(discord): collapse private interaction and factory seams (#174322)
  refactor(feishu): reuse streaming merge in dispatcher tests (#174371)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits)
  fix(decisions): align accounting ratchet evidence
  feat(memory): activate PostgreSQL memory search and lifecycle (#174374)
  fix: join process shutdown and isolate runtime fixtures (#174359)
  refactor(ui): scope native gateway observation to Solid (#174367)
  refactor(ui): own canvas widget lifetime in Solid (#174370)
  perf(control-ui): keep agent avatar faces stable across agent publications (#174239)
  perf(models): release unused account catalog instructions (#174361)
  refactor(ui): own composer command menus in Solid stores (#174321)
  refactor(ui): separate sidebar filter state from view lifecycle (#174352)
  test(release): make artifact qualification deadlines deterministic
  fix(codex): preserve sandboxed process inspection and setup errors (#174284)
  fix(gateway): stop worker processes before draining their queues (#174312)
  refactor(agents): reuse prepared tool facts (#174349)
  test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331)
  refactor(ui): replace MCP retirement host adapters with a factory (#174375)
  refactor(logging): remove redundant native success traces (#174330)
  refactor(test): remove dead control-plane fixture branches (#174377)
  refactor(mcp): remove test-only session runtime seams (#174347)
  feat(matrix): account-root state databases follow the selected engine (#174315)
  refactor(discord): collapse private interaction and factory seams (#174322)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits)
  feat(memory): activate PostgreSQL memory search and lifecycle (#174374)
  fix: join process shutdown and isolate runtime fixtures (#174359)
  refactor(ui): scope native gateway observation to Solid (#174367)
  refactor(ui): own canvas widget lifetime in Solid (#174370)
  perf(control-ui): keep agent avatar faces stable across agent publications (#174239)
  perf(models): release unused account catalog instructions (#174361)
  refactor(ui): own composer command menus in Solid stores (#174321)
  refactor(ui): separate sidebar filter state from view lifecycle (#174352)
  test(release): make artifact qualification deadlines deterministic
  fix(codex): preserve sandboxed process inspection and setup errors (#174284)
  fix(gateway): stop worker processes before draining their queues (#174312)
  refactor(agents): reuse prepared tool facts (#174349)
  test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331)
  refactor(ui): replace MCP retirement host adapters with a factory (#174375)
  refactor(logging): remove redundant native success traces (#174330)
  refactor(test): remove dead control-plane fixture branches (#174377)
  refactor(mcp): remove test-only session runtime seams (#174347)
  feat(matrix): account-root state databases follow the selected engine (#174315)
  refactor(discord): collapse private interaction and factory seams (#174322)
  refactor(feishu): reuse streaming merge in dispatcher tests (#174371)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
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