Repository navigation
feat(ui): Labs settings page for experimental feature toggles - #110359
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1348b0e453
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!patched) { | ||
| this.saveError = runtimeConfig.state.lastError ?? t("labsPage.saveFailed"); | ||
| return; |
There was a problem hiding this comment.
Refresh stale Labs config after hash conflicts
When config.patch returns false because the on-disk config changed after Labs loaded, this branch records the error but leaves runtimeConfig.state.configSnapshot and its base hash unchanged. In that stale-config scenario, every subsequent toggle retries with the same rejected hash and keeps failing until the user leaves/reloads the page; this scalar toggle should refresh and retry, or at least refresh before returning the error.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 3:14 PM ET / 19:14 UTC. Summary PR surface: Source +269, Tests +141, Other +104. Total +514 across 11 files. Reproducibility: no. high-confidence live reproduction was established here. Source and the prior review identify a clear rejected-hash path, but it still needs confirmation against a real Gateway-backed runtime configuration write. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep a small Labs registry if maintainers want this product surface, but refresh the authoritative config snapshot after a rejected write and attach redacted real Gateway evidence for enable, explicit disable, and conflict recovery before merge. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was established here. Source and the prior review identify a clear rejected-hash path, but it still needs confirmation against a real Gateway-backed runtime configuration write. Is this the best way to solve the issue? No. The Labs page may be a sound long-term UI boundary, but the current patch must refresh after a rejected config patch and demonstrate the real write path before it is the best mergeable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b526af1a7ed2. Label changesLabel justifications:
Evidence reviewedPR surface: Source +269, Tests +141, Other +104. Total +514 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles)
|
4447108 to
d11837e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d11837e02c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| configState?.connected && | ||
| configState.configSnapshot?.hash && | ||
| !configState.configLoading && | ||
| this.busyFeatureId === null, |
There was a problem hiding this comment.
Disable toggles for non-admin operators
When the Control UI is connected with only operator.read, config.get still supplies a snapshot and hash, so this predicate enables the switch; clicking it then calls config.patch, which requires operator.admin (src/gateway/methods/core-descriptors.ts:51), causing the switch to revert with a save error. Include the Gateway auth scope in this gate (and react to Gateway snapshot changes) so read-only operators are not offered a control they cannot use.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…aw#110359) * feat(ui): add Labs settings page * chore(ui): drop changelog entry — release generation owns CHANGELOG * fix(ui): drop lint suppression, sync Apple i18n catalogs for Labs keys * ci: retrigger CI on current head * docs(ui): clarify swarm labs-entry gating comment
…aw#110359) * feat(ui): add Labs settings page * chore(ui): drop changelog entry — release generation owns CHANGELOG * fix(ui): drop lint suppression, sync Apple i18n catalogs for Labs keys * ci: retrigger CI on current head * docs(ui): clarify swarm labs-entry gating comment
What Problem This Solves
Experimental features (Code Mode today, Swarm next) are enabled only by hand-editing
openclaw.json. There is no discoverable, safe place in the Control UI to try them.Why This Change Was Made
Part of the Swarm program (#110325): a Settings → Labs page gives experimental features one obvious home with clear "may change or break" framing, so gated features can ship dark on
mainand be flipped on deliberately.User Impact
New Settings → Labs page (Agents & Tools group). First entry: Code Mode — toggle reads both accepted config shapes (
tools.codeMode: trueboolean shorthand and object form) and writes an RFC 7396 merge-patch with an explicitfalseon disable (never a key delete). Registry-driven so future entries (Swarm, #110325) are one-liners; a Swarm entry is stubbed but not rendered until its config key exists in the schema.Evidence
ui/src/pages/labs/labs-page.test.ts+ navigation tests — 58 passed (see checks).pnpm dev:ui:mock(screenshot above; toggle interaction is config-snapshot-gated, covered by unit tests for merge-patch correctness).