Repository navigation
fix: existing device folders stay disabled for models on the default runtime - #190065
Conversation
|
🦞👀 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: needs maintainer review before merge. What this changesPublishes implicit OpenClaw runtime capabilities on model rows while avoiding unintended session runtime pins. Example: Select particle/particle-ai/particle-1 and paired device mbp-m5 in New Session.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for merging: it fixes a current runtime-capability projection bug, the supplied screenshots demonstrate the correction, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway projects configured model and harness decisions into models.list; UI and native clients consume those runtime capabilities for model controls and session placement. flowchart LR
A[Model configuration] --> B[Catalog runtime decision]
B --> C[Placement capability projection]
C --> D[models.list]
D --> E[New Session folder picker]
D --> F[Provider Start Chat]
E --> G[Session creation]
F --> G
Technical reviewBest possible solution: Merge the focused catalog projection fix with both UI consumers preserving implicit routing. Do we have a high-confidence way to reproduce the issue? Current-main source omits the implicit runtime while the folder gate requires its worker-turn capability; the inspected before screenshot corroborates that path. Is this the best way to solve the issue? The change repairs the producing catalog owner, reuses placement capability projection, and adjusts the two consumers that would otherwise turn newly published implicit metadata into explicit session pins. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bab026fec189. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +12, Tests +39. Total +51 across 10 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
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 HistoryReview history (1 earlier review cycle)
Reviewed November 1, 2026, 2:06 AM ET / 07:06 UTC (Revision 2). |
5084ccf to
fbdb8c4
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in f1a55b0.
|
…190088) Related: #190065 (landed; this builds on it). ## What Problem This Solves Fixes: the New Session folder menu for a paired device shows two overlapping rows ("Existing folder on device" and "Browse folders on <device>") with long descriptions that truncate, and a disabled reason that says "worker-turn runtime". ## User Impact User impact: one short row, "Existing folder on <device>", picks a folder on the selected device. Admins go straight to the device's folder browser; other writers type the path, as before. When the model can't use device folders, the row says "Not available with this model", and the full reason stays in the tooltip and the path field. ## Why This Change Was Made - **One row per choice:** the two device rows led to the same result. The row now opens the browser when the user may list folders on the device (admin), or selects the folder for typing otherwise. - **Short rows:** the "New workspace" and device-folder descriptions moved into tooltips. - **Plain text:** the error text no longer uses the internal "worker-turn runtime" term. - **Docs:** session hosting, Control UI sessions and managed worktree pages describe the single row. - **Folder chip:** after a folder is chosen, the folder chip shows the folder's name instead of the generic label. Production lines: `project-picker-content.tsx` +20/−32, `project-chip.tsx` +9/−2, English copy +4/−3. ## Evidence - `ui/src/pages/new-session` unit tests: 818 passed. - `new-session-page.device-folder.e2e.test.ts` (mocked Gateway, Chromium): 4 passed. It covers the disabled hint, the admin browser path through the merged row, typed paths for writers, and pending-create restore. - `pnpm ui:i18n:verify` passes; the raw-copy baseline is unchanged. - Live Gateway: a user-authorized Gateway ran this commit (`c3eba7ee`, supported source updater, downtime 240 s). Particle-1 on paired device `mbp-m5`, folder menu opened in the browser. Before (#190065 build): two overlapping device rows, truncated descriptions.  After (this branch): one "Existing folder on mbp-m5" row that opens the device browser; no truncated text.  **Merge danger:** two-way door. A revert fully undoes it: UI copy and layout only, no state or protocol change. Blast radius: Control UI New Session users with paired devices; e2e selectors for `browse-device` are gone (in-repo tests updated). Co-authored-by: Ayaan Zaidi <[email protected]>
…runtime (openclaw#190065) ## What Problem This Solves Fixes: New Session disables "Existing folder" on a paired device when the selected model runs on the default OpenClaw runtime but has no runtime set in config (for example `particle/particle-ai/particle-1`, xAI, OpenRouter or GitHub Copilot models). ## User Impact User impact: models that run on the built-in OpenClaw runtime can start sessions in an existing folder on a paired device, whether or not their runtime is set in config. Starting a chat from provider setup, and switching New Session back from a hosted environment, no longer save the Gateway's default runtime as a session-level runtime choice. ## Why This Change Was Made `models.list` left out `agentRuntime` on a row when the Gateway resolved it to the implicit OpenClaw runtime. Each client had to know that a missing field meant OpenClaw. New Session read the missing field as "unknown runtime" and disabled existing device folders. The Gateway then accepted the same request, because dispatch resolves the runtime itself. Every row now states its resolved runtime. For the default case this is `{ id: "openclaw", source: "implicit" }`, with its placement facts. The `implicit` source already exists in the protocol schema, so the wire contract does not change. Only the value is filled in more often. Two UI paths used "the row has a runtime" to mean "send this runtime to `sessions.create`": Start Chat after provider sign-in, and New Session's "back to host" choice. Both now skip a runtime whose source is `implicit`, through one helper (`selectableRuntimeId`), so they keep sending nothing for the Gateway's own routing. <details> <summary>Consumer audit</summary> I checked every reader of a row's `agentRuntime` in the Control UI, CLI, TUI, iOS/macOS (`OpenClawKit`) and Android. - **Fixed:** the existing device folder gate; `resolveModelRuntimeEntry` for sessions on `openclaw`; fast-mode and access-program lookups; picker highlighting of the base row for sessions on `openclaw`. - **Unchanged:** picker labels and Android runtime names are gated on `source` `model`/`provider`. A click on the base picker row still sends no runtime. - **Changed and intended:** - Thinking-profile matching in the web UI, `ChatSessions.swift` and `ChatController.kt` no longer lets a session on another runtime (for example `codex`) borrow the OpenClaw row's thinking levels. This matches the existing "must not supply another runtime's profile" rule. - A model's base row with `runtimeChoices` now shows its "OpenClaw" runtime label. </details> ## Evidence - New regression tests. Each fails on `main` and passes on this branch: - `models-list-result.service-tiers.test.ts`: a model without a configured runtime states `openclaw` / `implicit` / `worker-turn`. On `main` the field is missing. - `model-providers-page.login-start-chat.test.ts`: Start Chat for a row with an implicit runtime creates the session without `agentRuntime`. - `hosted-environment.test.ts`: going back to host with an implicit base runtime leaves no runtime choice, and still resolves to `openclaw`. - I updated the existing `models.list` row expectations to include the stated runtime, reusing the shared `EXPECTED_IMPLICIT_OPENCLAW_RUNTIME` fixture. - Focused local runs: Gateway `models*` suites, `ui/src/pages/new-session`, `ui/src/pages/model-providers`, `ui/src/pages/model-setup`, `ui/src/pages/chat` and `ui/src/lib` all pass. - Production trace: on a live Gateway, `models.list` returned no `agentRuntime` for all `particle` rows. The `openclaw` runtime advertised `cloudPlacementExecutionMode: "worker-turn"`. New Session showed "Existing device folders require a worker-turn runtime" for Particle-1 on a paired device. - Live Gateway: a user-authorized Gateway ran this commit (`5084ccfe`, supported source updater, downtime 262 s). `models.list` returned `agentRuntime` on all 97 model rows, and Particle-1 reported `openclaw` / `implicit` / `worker-turn`. Before (stock main, Particle-1 on paired device `mbp-m5`): "Existing folder" is disabled with "Existing device folders require a worker-turn runtime".  After (this branch, same device and model): "Existing folder on device" is enabled, and "Browse folders on mbp-m5" appears.  **Merge danger:** two-way door. A revert fully undoes it: no state, config or schema writes. Blast radius: every `models.list` client gets a filled `agentRuntime` on rows that used to leave it out. A client that treated "has `agentRuntime`" as "explicitly pinned" would change behavior. The audit found two such clients (both fixed here) and none in the native apps. Co-authored-by: Ayaan Zaidi <[email protected]>
…penclaw#190088) Related: openclaw#190065 (landed; this builds on it). ## What Problem This Solves Fixes: the New Session folder menu for a paired device shows two overlapping rows ("Existing folder on device" and "Browse folders on <device>") with long descriptions that truncate, and a disabled reason that says "worker-turn runtime". ## User Impact User impact: one short row, "Existing folder on <device>", picks a folder on the selected device. Admins go straight to the device's folder browser; other writers type the path, as before. When the model can't use device folders, the row says "Not available with this model", and the full reason stays in the tooltip and the path field. ## Why This Change Was Made - **One row per choice:** the two device rows led to the same result. The row now opens the browser when the user may list folders on the device (admin), or selects the folder for typing otherwise. - **Short rows:** the "New workspace" and device-folder descriptions moved into tooltips. - **Plain text:** the error text no longer uses the internal "worker-turn runtime" term. - **Docs:** session hosting, Control UI sessions and managed worktree pages describe the single row. - **Folder chip:** after a folder is chosen, the folder chip shows the folder's name instead of the generic label. Production lines: `project-picker-content.tsx` +20/−32, `project-chip.tsx` +9/−2, English copy +4/−3. ## Evidence - `ui/src/pages/new-session` unit tests: 818 passed. - `new-session-page.device-folder.e2e.test.ts` (mocked Gateway, Chromium): 4 passed. It covers the disabled hint, the admin browser path through the merged row, typed paths for writers, and pending-create restore. - `pnpm ui:i18n:verify` passes; the raw-copy baseline is unchanged. - Live Gateway: a user-authorized Gateway ran this commit (`c3eba7ee`, supported source updater, downtime 240 s). Particle-1 on paired device `mbp-m5`, folder menu opened in the browser. Before (openclaw#190065 build): two overlapping device rows, truncated descriptions.  After (this branch): one "Existing folder on mbp-m5" row that opens the device browser; no truncated text.  **Merge danger:** two-way door. A revert fully undoes it: UI copy and layout only, no state or protocol change. Blast radius: Control UI New Session users with paired devices; e2e selectors for `browse-device` are gone (in-repo tests updated). Co-authored-by: Ayaan Zaidi <[email protected]>
Backport adapted to retain the release candidate OpenAI routing resolver and existing test fixtures. (cherry picked from commit f1a55b0) Co-authored-by: RomneyDa <[email protected]>
…190088) Related: #190065 (landed; this builds on it). Fixes: the New Session folder menu for a paired device shows two overlapping rows ("Existing folder on device" and "Browse folders on <device>") with long descriptions that truncate, and a disabled reason that says "worker-turn runtime". User impact: one short row, "Existing folder on <device>", picks a folder on the selected device. Admins go straight to the device's folder browser; other writers type the path, as before. When the model can't use device folders, the row says "Not available with this model", and the full reason stays in the tooltip and the path field. - **One row per choice:** the two device rows led to the same result. The row now opens the browser when the user may list folders on the device (admin), or selects the folder for typing otherwise. - **Short rows:** the "New workspace" and device-folder descriptions moved into tooltips. - **Plain text:** the error text no longer uses the internal "worker-turn runtime" term. - **Docs:** session hosting, Control UI sessions and managed worktree pages describe the single row. - **Folder chip:** after a folder is chosen, the folder chip shows the folder's name instead of the generic label. Production lines: `project-picker-content.tsx` +20/−32, `project-chip.tsx` +9/−2, English copy +4/−3. - `ui/src/pages/new-session` unit tests: 818 passed. - `new-session-page.device-folder.e2e.test.ts` (mocked Gateway, Chromium): 4 passed. It covers the disabled hint, the admin browser path through the merged row, typed paths for writers, and pending-create restore. - `pnpm ui:i18n:verify` passes; the raw-copy baseline is unchanged. - Live Gateway: a user-authorized Gateway ran this commit (`c3eba7ee`, supported source updater, downtime 240 s). Particle-1 on paired device `mbp-m5`, folder menu opened in the browser. Before (#190065 build): two overlapping device rows, truncated descriptions.  After (this branch): one "Existing folder on mbp-m5" row that opens the device browser; no truncated text.  **Merge danger:** two-way door. A revert fully undoes it: UI copy and layout only, no state or protocol change. Blast radius: Control UI New Session users with paired devices; e2e selectors for `browse-device` are gone (in-repo tests updated). Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit a506b3f) Co-authored-by: RomneyDa <[email protected]>
Backport the canonical follow-up to #190065. Keep provider secret exclusions while asserting the public implicit runtime contract. (cherry picked from commit e280c99) Co-authored-by: RomneyDa <[email protected]>
Backport #200063, #200208, #200247, #200260 and #190065 to 2026.10.33. Preserve canonical source credit and maintenance-branch contracts. All selected exact-head checks passed except the inherited Docker plugin API mismatch; aggregate ci-gate reports that same cause. Landing authorized with this attributed pre-existing failure. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: miguelbranco80 <[email protected]> Co-authored-by: Shakker <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes: New Session disables "Existing folder" on a paired device when the selected model runs on the default OpenClaw runtime but has no runtime set in config (for example
particle/particle-ai/particle-1, xAI, OpenRouter or GitHub Copilot models).User Impact
User impact: models that run on the built-in OpenClaw runtime can start sessions in an existing folder on a paired device, whether or not their runtime is set in config. Starting a chat from provider setup, and switching New Session back from a hosted environment, no longer save the Gateway's default runtime as a session-level runtime choice.
Why This Change Was Made
models.listleft outagentRuntimeon a row when the Gateway resolved it to the implicit OpenClaw runtime. Each client had to know that a missing field meant OpenClaw. New Session read the missing field as "unknown runtime" and disabled existing device folders. The Gateway then accepted the same request, because dispatch resolves the runtime itself.Every row now states its resolved runtime. For the default case this is
{ id: "openclaw", source: "implicit" }, with its placement facts. Theimplicitsource already exists in the protocol schema, so the wire contract does not change. Only the value is filled in more often.Two UI paths used "the row has a runtime" to mean "send this runtime to
sessions.create": Start Chat after provider sign-in, and New Session's "back to host" choice. Both now skip a runtime whose source isimplicit, through one helper (selectableRuntimeId), so they keep sending nothing for the Gateway's own routing.Consumer audit
I checked every reader of a row's
agentRuntimein the Control UI, CLI, TUI, iOS/macOS (OpenClawKit) and Android.resolveModelRuntimeEntryfor sessions onopenclaw; fast-mode and access-program lookups; picker highlighting of the base row for sessions onopenclaw.sourcemodel/provider. A click on the base picker row still sends no runtime.ChatSessions.swiftandChatController.ktno longer lets a session on another runtime (for examplecodex) borrow the OpenClaw row's thinking levels. This matches the existing "must not supply another runtime's profile" rule.runtimeChoicesnow shows its "OpenClaw" runtime label.Evidence
mainand passes on this branch:models-list-result.service-tiers.test.ts: a model without a configured runtime statesopenclaw/implicit/worker-turn. Onmainthe field is missing.model-providers-page.login-start-chat.test.ts: Start Chat for a row with an implicit runtime creates the session withoutagentRuntime.hosted-environment.test.ts: going back to host with an implicit base runtime leaves no runtime choice, and still resolves toopenclaw.models.listrow expectations to include the stated runtime, reusing the sharedEXPECTED_IMPLICIT_OPENCLAW_RUNTIMEfixture.models*suites,ui/src/pages/new-session,ui/src/pages/model-providers,ui/src/pages/model-setup,ui/src/pages/chatandui/src/liball pass.models.listreturned noagentRuntimefor allparticlerows. Theopenclawruntime advertisedcloudPlacementExecutionMode: "worker-turn". New Session showed "Existing device folders require a worker-turn runtime" for Particle-1 on a paired device.5084ccfe, supported source updater, downtime 262 s).models.listreturnedagentRuntimeon all 97 model rows, and Particle-1 reportedopenclaw/implicit/worker-turn.Before (stock main, Particle-1 on paired device
mbp-m5): "Existing folder" is disabled with "Existing device folders require a worker-turn runtime".After (this branch, same device and model): "Existing folder on device" is enabled, and "Browse folders on mbp-m5" appears.
Merge danger: two-way door. A revert fully undoes it: no state, config or schema writes. Blast radius: every
models.listclient gets a filledagentRuntimeon rows that used to leave it out. A client that treated "hasagentRuntime" as "explicitly pinned" would change behavior. The audit found two such clients (both fixed here) and none in the native apps.