Repository navigation
feat(ui): redesign Channels page with guided channel setup wizard - #106469
Conversation
dcf8d53 to
9672137
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcf8d53b97
ℹ️ 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".
| context.channelWizardRunner( | ||
| { | ||
| channel: readStringValue(params.channel), | ||
| onConfigured: (channels) => wizardSession.setConfiguredChannels(channels), | ||
| }, |
There was a problem hiding this comment.
Lock cancellation before channel setup writes
When a Control UI user closes/cancels the channel wizard during an install, final config write, or post-write hook, this runner has no beforePersistentEffect tied to wizardSession.lockCancellation(). runChannelsAddWizardFlow already calls beforePersistentEffect before durable plugin/config effects, so without passing one here WizardSession.cancel() can mark/purge the session as cancelled while the runner still installs a plugin or commits openclaw.json in the background.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: the channels flow now passes beforePersistentEffect: () => wizardSession.lockCancellation() (src/gateway/server-methods/wizard.ts), so cancel() cannot mark the session cancelled once installs/config writes begin.
| return html` | ||
| <div class="channels-wizard__message">${t("channels.setup.doneTitle")}</div> | ||
| <div class="channels-wizard__note">${t("channels.setup.doneBody")}</div> |
There was a problem hiding this comment.
Render skipped setup as no changes
If the user selects Finished/Skip without configuring anything, the gateway finishes with channels missing/empty after runChannelsAddWizardFlow reports “No channel changes made.” This branch still renders “Channel configured” and “Configuration saved,” so the modal shows a false success state for a no-op setup; handle channels.length === 0 as a no-change completion instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: the done panel renders a dedicated no-changes state when the terminal result reports no configured channels (ui/src/pages/channels/wizard-view.ts, channels.setup.doneNoChanges*).
9672137 to
b374027
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b374027e5a
ℹ️ 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".
| await context.channels.refresh(true); | ||
| if (channels.includes("whatsapp")) { | ||
| // Jump straight into QR pairing; the wizard modal renders the QR phase. | ||
| await context.channels.startWhatsApp(false); |
There was a problem hiding this comment.
Preserve the WhatsApp account for QR pairing
When the wizard configures WhatsApp with a non-default account id, this completion path loses that id: runChannelsAddWizardFlow enables promptAccountIds, but the terminal result only carries channel ids, and startWhatsApp(false) sends web.login.start without accountId. In that case the gateway starts QR login for the provider's default account instead of the account the wizard just wrote, so scanning the modal's QR leaves the newly configured account unlinked; carry the configured WhatsApp account id through the wizard result and pass it to the web-login start/wait calls.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: the terminal wizard result now carries the configured channel/account pairs (additive accounts field), and the QR phase starts web.login.start/wait with that accountId (src/wizard/session.ts, ui/src/pages/channels/wizard-host.ts, ui/src/lib/channels/index.ts).
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 12:39 PM ET / 16:39 UTC. Summary PR surface: Source +1343, Tests +309, Other +144. Total +1796 across 27 files. Reproducibility: yes. the three defects are source-reproducible on this head: cancellation lacks a durable-effect lock, the terminal result contains no account identity, and empty completion reaches unconditional success UI. A real Gateway run has not yet been supplied. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 the shared prompter-injected setup runner and additive protocol approach, but make completion account-scoped, lock cancellation before durable effects, model no-change as a distinct terminal outcome, rebase onto current main, and prove fresh and named-account setup through a real Gateway. Do we have a high-confidence way to reproduce the issue? Yes, the three defects are source-reproducible on this head: cancellation lacks a durable-effect lock, the terminal result contains no account identity, and empty completion reaches unconditional success UI. A real Gateway run has not yet been supplied. Is this the best way to solve the issue? No, not yet. Reusing the established channel wizard through an additive protocol is the right ownership boundary, but the proposed result shape and lifecycle handling are incomplete for supported named-account and cancellation behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d8fb5b404ead. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1343, Tests +309, Other +144. Total +1796 across 27 files. View PR surface stats
Security concerns:
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 (1 earlier review cycle)
|
b374027 to
230088a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 230088ae89
ℹ️ 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".
| const result = await client.request<WizardNextResult>( | ||
| "wizard.start", | ||
| { flow: "channels", ...(channel ? { channel } : {}) }, | ||
| { timeoutMs: WIZARD_STEP_TIMEOUT_MS }, |
There was a problem hiding this comment.
Honor wizard RPC timeout options
In Control UI this third argument is dropped: ChannelWizardHost passes the real GatewayBrowserClient, whose request wrapper only forwards (method, params) to the protocol client (ui/src/api/gateway.ts:619). When wizard.start stalls before returning a session id, the intended 120s timeout never fires and closing the modal cannot send wizard.cancel, leaving the gateway wizard session running and blocking later setup attempts; plumb request options through the browser client or enforce a local timeout.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2 with a local timeout: wizard.start/next race a 120s ceiling in the controller (requestWithTimeout), and the stale-response path still cancels any session id that arrives late, so the gateway session cannot be wedged.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c233ace4e5
ℹ️ 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".
| <span class="settings-row__desc">${description}</span> | ||
| </div> | ||
| <div class="settings-row__control"> | ||
| <button type="button" class="btn btn--sm" @click=${() => props.onStartSetup(key)}> |
There was a problem hiding this comment.
Restore detail access for unconfigured channels
For channels that are not yet configured, the redesigned hub renders only this Set up button; unlike connected rows, it never calls onShowDetail, and renderChannelDetail() is only mounted for selectedChannel. That removes the advanced schema form (renderChannelConfigSection) for unconfigured channels, so any channel without a complete interactive setup path—or users needing to edit fields not covered by the wizard—can no longer be configured from Control UI. Add a detail/advanced path for available rows instead of making the wizard the only action.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: available rows now open the detail overlay (tile/text is a real button), keeping the advanced schema config form reachable for unconfigured channels; Set up stays as the row control (ui/src/pages/channels/view.ts).
| if (this.deps.getContext()?.runtimeConfig.state.configFormDirty) { | ||
| this.blockedByDirtyConfig = true; | ||
| this.deps.requestUpdate(); | ||
| return; |
There was a problem hiding this comment.
Surface dirty-config blocking inside the detail modal
When Run setup is clicked from an open channel detail after editing the advanced form, this guard sets only blockedByDirtyConfig; the warning is rendered on the page behind the still-open openclaw-modal-dialog fullscreen backdrop, so the user sees no feedback and the setup appears broken. Close the detail or render the save/reload warning inside the modal before returning.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: the save-or-reload warning also renders inside the detail overlay body when Run setup is blocked by a dirty config draft (ui/src/pages/channels/view.detail.ts).
c233ace to
227b3bc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 227b3bc5f2
ℹ️ 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".
| this.stepIndex += 1; | ||
| this.setState({ | ||
| phase: "step", | ||
| channel: this.channel, |
There was a problem hiding this comment.
Preserve picked channel for browse-all wizard steps
When setup is launched from “More channels” (onStartSetup(null)), this.channel remains null after the user answers the channel select, and this branch passes that null into every follow-up step until the terminal result. renderChannelWizard derives the modal title/art and renderHelperLinks from wizard.channel, so the credential steps after choosing Telegram/Slack/etc. are rendered as generic and lose the channel-specific setup/docs links. Preserve the selected channel before applying the next step, or have the gateway include the active channel on step results.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a659ea2: the controller adopts the picked channel from select answers for presentation (title/art/helper links) while completion behavior still keys off the gateway-reported accounts.
Adds wizard.start flow=channels gateway RPC (additive protocol change) that drives the shared channel-setup wizard (openclaw channels add) over the session step protocol. Control UI Channels page becomes a card hub with plugin-art covers, guided per-channel setup modal (WhatsApp QR pairing via web.login.*, BotFather/Slack/Discord helper links), and a detail overlay hosting the full schema config form.
…less of pick order
…result Replaces the Control UI's channel-adoption heuristic with the authoritative outcome: the channels flow reports its actual selection after config commit, the wizard session surfaces it as an additive channels field on the terminal wizard.next result, and the UI keys WhatsApp QR linking off that.
…guage Hub becomes settings-language rows (44px art tiles, status dots, uppercase section headings, hairline groups) instead of a card gallery; the detail overlay hosts the migrated per-channel settings sections with Run setup in the header. Wizard dialog and tile/cover styles move to spacing tokens.
Split mock-dev channel/plugin fixtures into their own modules, move wizard runner types/defaults to server-methods/wizard.ts, extract the channels page wizard host and nostr profile HTTP ops, and unexport internal-only types (incl. the unused config-form SECTION_META barrel re-export).
- lock wizard cancellation before durable installs/config writes - report configured channel accounts on the terminal wizard result and start WhatsApp QR pairing for that account (web.login accountId) - forward request options through the browser gateway client so wizard RPC timeouts apply - render skipped setup as a no-change completion - keep detail/advanced config reachable for unconfigured channels - surface the dirty-config warning inside the detail overlay - adopt the picked channel for wizard title/links in browse-all flows
227b3bc to
a659ea2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a659ea29fc
ℹ️ 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".
| accountId: accountIds[channel] ?? DEFAULT_ACCOUNT_ID, | ||
| })), | ||
| ); | ||
| await prompter.outro("Channels updated."); |
There was a problem hiding this comment.
Do not prompt after locking wizard cancellation
When the Control UI channel wizard reaches the durable commit point, beforePersistentEffect now calls wizardSession.lockCancellation(), but the flow still emits this final outro note after the commit/hooks. If the user closes the modal while the commit is finishing or on the final “Channels updated” note, wizard.cancel returns false because cancellation is locked, the client drops its sessionId, and the server session remains running forever waiting for an answer to this note, blocking later wizard.start calls with “wizard already running.” Make the gateway flow terminal after durable effects, or unlock/avoid any client prompt after the lock.
Useful? React with 👍 / 👎.
…enclaw#106469) * feat(ui): redesign Channels page with guided channel setup wizard Adds wizard.start flow=channels gateway RPC (additive protocol change) that drives the shared channel-setup wizard (openclaw channels add) over the session step protocol. Control UI Channels page becomes a card hub with plugin-art covers, guided per-channel setup modal (WhatsApp QR pairing via web.login.*, BotFather/Slack/Discord helper links), and a detail overlay hosting the full schema config form. * test(ui): cover channel wizard controller; refresh channels view test props * chore(mock): use non-token-shaped wizard placeholder * test(gateway): scanner-safe auth local in channels wizard test * fix(ui): cancel gateway wizard session on channels page disconnect * fix(ui): adopt browse-all channel pick and guard dirty config before setup * fix(ui): cancel gateway session created by a stale wizard.start * fix(ui): adopt multiselect channel picks; drop redundant String() * fix(ui): track all wizard-adopted channels so WhatsApp QR runs regardless of pick order * feat(gateway): report configured channels on terminal channel-wizard result Replaces the Control UI's channel-adoption heuristic with the authoritative outcome: the channels flow reports its actual selection after config commit, the wizard session surfaces it as an additive channels field on the terminal wizard.next result, and the UI keys WhatsApp QR linking off that. * refactor(ui): align channels hub with the unified settings design language Hub becomes settings-language rows (44px art tiles, status dots, uppercase section headings, hairline groups) instead of a card gallery; the detail overlay hosts the migrated per-channel settings sections with Run setup in the header. Wizard dialog and tile/cover styles move to spacing tokens. * chore(i18n): translate channels hub/setup strings; refresh raw-copy baseline * refactor: satisfy LOC ratchet and dead-export gates Split mock-dev channel/plugin fixtures into their own modules, move wizard runner types/defaults to server-methods/wizard.ts, extract the channels page wizard host and nostr profile HTTP ops, and unexport internal-only types (incl. the unused config-form SECTION_META barrel re-export). * chore(i18n): retranslate channels strings on rebased locale bundles * fix(test): drop redundant String() in channels wizard e2e * fix: address channel-wizard review findings - lock wizard cancellation before durable installs/config writes - report configured channel accounts on the terminal wizard result and start WhatsApp QR pairing for that account (web.login accountId) - forward request options through the browser gateway client so wizard RPC timeouts apply - render skipped setup as a no-change completion - keep detail/advanced config reachable for unconfigured channels - surface the dirty-config warning inside the detail overlay - adopt the picked channel for wizard title/links in browse-all flows * fix(ui): local wizard RPC timeout; translate no-change completion strings
What Problem This Solves
The Settings → Channels page was a wall of raw schema-driven config forms — every channel rendered every field (tokens, allowlists, JSON blobs) inline, with no guidance on how to actually connect a channel. A beginner landing on the page had no path from "I want OpenClaw on Telegram" to a working bot: the real setup knowledge (BotFather, Slack manifests, WhatsApp QR pairing) only existed in the CLI wizard (
openclaw channels add) and the docs.Why This Change Was Made
Rebuilds Channels in the unified settings design language (#106470) and adds a guided, step-by-step setup wizard to the web UI — without duplicating any setup logic:
wizard.startgainsflow: "channels"+channelparams, routing to the shared channel-setup flow (openclaw channels add) over the existingWizardSessionstep protocol already used by the macOS/Android onboarding clients. The wizard branch ofchannelsAddCommandis extracted into a prompter-injectable runner (src/commands/channels/add-wizard.ts); the gateway entry never callsruntime.exit. On completion the runner reports the channels it actually configured, surfaced as an additivechannelsfield on the terminalwizard.nextresult so the client keys channel-specific completion off the real outcome, not the preselection.SetupChannelsOptions.deferDeviceLinkToClient: gateway clients render device linking natively, so the WhatsApp finalize surface skips its terminal QR login; the Control UI runs QR pairing through the existingweb.login.start/waitRPCs instead.Row/cover art reuses the bundled
plugin-artset (CSP isimg-src 'self', so remote brand icons can't load). The mock-dev harness gains channels/wizard fixtures so the flow is demoable and screenshot-testable offline.User Impact
Setting up a channel is now: open Channels → click a card → follow 2–4 short steps → done (WhatsApp ends with a scannable QR right in the dialog). All ~20 channels with setup surfaces work through the same wizard automatically, and everything that was on the old page (full config form, status detail, health JSON) is still there behind the card detail view. CLI behavior is unchanged; the macOS/Android wizard clients are unaffected (protocol change is additive).
Evidence
pnpm check:changedfully green (all typecheck lanes, lint, Plugin SDK API baseline, guards),pnpm buildclean,pnpm plugin-sdk:surface:checkgreen.src/gateway/gateway.test.ts11/11 incl. newwizard.start flow=channelsrouting + configured-channels round-trip;src/wizard/session.test.ts;extensions/whatsapp/src/channel.setup.test.ts19/19 incl. newdeferDeviceLinkToClienttest; newui/src/pages/channels/wizard-controller.test.ts(state machine: step/answer, validation errors, stale-start session cancel, gateway-reported channels).pnpm protocol:gen+ Swift/Kotlin); Swift diff is additive optional fields.