Repository navigation
refactor: remove native Channels page - #1930
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 changesThis PR removes native channel management, redirects former entry points to the Gateway Dashboard, and makes setup completion Chat-only. Example: Open openclaw://hub/channels.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: the feature owner's deliberate channel-management cutover is not on main, and this review found no actionable introduced defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCompanion receives navigation requests and saved setup receipts, resolves Gateway credentials, validates setup authority, and hands an authenticated Dashboard URL to Windows. flowchart TD
A[Links and navigation] --> B[WorkspaceNavigation]
B --> E[GatewayDashboardLauncher]
C[Saved setup receipt] --> D[Setup verification and authority]
D --> E
E --> F[DashboardBrowser]
F --> G[Windows browser]
Technical reviewBest possible solution: Retire the duplicate native owner and reuse existing navigation, Dashboard launching, and receipt validation while preserving read-only health and saved-state compatibility. Do we have a high-confidence way to reproduce the issue? This is an intentional refactor rather than a reported defect; main still contains the native workflow being retired. Is this the best way to solve the issue? The invariant is that retiring channel management must preserve navigation compatibility, receipt authority, explicit retry, and read-only health, which the existing owners and focused browser adapter support. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4aee38a1bfaa. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label 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 (3 earlier review cycles)Reviewed November 5, 2026, 10:10 PM ET / November 6, 2026, 03:10 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Remove the native Channels page, its visualization, and the models, diagnostics, localization, fixtures and tests that only it used. Users connect and manage channels in the Gateway Dashboard. - WorkspaceNavigation.Dispatch is the single owner that routes the channels and activity entry points to the Dashboard channels view. - Channel health and the tray Start/Stop channel actions are unchanged, and persisted setup receipts keep their ChannelId so older receipts still load. - Setup Ready offers Chat only. A legacy WhatsApp, Telegram or Channels receipt opens the Dashboard channels view. Dispatch is rejected when the verified Gateway or identity changed or the setup deadline already expired, a failed browser launch keeps the receipt for retry, and a launched browser consumes it because it cannot be withdrawn. Co-authored-by: Copilot App <[email protected]>
8e76740 to
5835b47
Compare
Route the final Dashboard browser hand-off through DashboardBrowser. Fixture runs log the redacted launch target instead of opening a browser and can ask for one simulated failure, so full-app tests can observe whether dispatch happened. Ordinary runs pass the URL straight to Windows. The seam sits after GatewayDashboardLauncher's final authority check and cannot widen it. - Add full-app fixture tests for an allowed Channels receipt, a receipt whose identity was revoked (no launch), a failed launch kept for explicit Retry, and Channels navigation with Retry. - Consume the simulated failure under a lock. Renaming the marker is not an exclusive claim on Windows, so concurrent launches could all take it; a regression test covers eight simultaneous launches. - Pin the disconnected-pages fixture test to Usage, which still exists. - Document the fixture Dashboard behavior and update the ownership ledger. Co-authored-by: Copilot App <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Remove channel code that has no reachable caller now that the native Channels page is gone. Channel setup and management stay in the Gateway Dashboard. Already dead on main: - The tray "channel:" toggle (ToggleChannel/ToggleChannelAsync). Its menu producer was removed in #272. - IOperatorGatewayClient.StartChannelAsync. Its only caller was that toggle; the Channels page used StartChannelDetailedAsync. - MenuDisplayHelper.GetChannelStatusIcon, used only by tests. - The "channelsummary" tray dispatcher case, which nothing produces. The Command Center and openclaw://channel-summary still use CopyChannelSummary. - ChannelHealth.DisplayText and its label map, with no production reader. - Four unused resource strings in all six locales. Dead after the page removal: - IOperatorGatewayClient.StopChannelAsync, last called by the page. - SetupNativeTarget.ChannelId, read only by the page's setup navigation. New receipts no longer write it. Receipts written by earlier builds still load because unknown JSON members are ignored. The replaced test now proves that instead of pinning the old field. Also update the ConnectionPageChannelMetrics comment and answer the channel-management open question in WINDOWS_NODE_ARCHITECTURE.md. Co-authored-by: Copilot App <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Resolve one conflict, in tests/OpenClaw.Shared.Tests/GatewayFixtureProtocolTests.cs. main removed the native Channels page (openclaw#1930) and deleted the three channels.status rows from RealClient_InvalidOrUnknownParametersFailExplicitly. This branch added two agent.identity.get rows at the same spot. Keep the two agent.identity.get rows and drop the three channels.status rows. main's deletion is preserved, and the fixture still rejects malformed agent.identity.get requests. No other file needed manual resolution. Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Companion kept a native Channels page that duplicated the channel setup and management the Gateway Dashboard already provides.
User Impact
User impact: the native Channels page is removed. Users connect and manage channels in the Gateway Dashboard, which now opens at its Channels view from every former entry point. The Dashboard itself and the read-only channel health on the Connection page, in the tray tooltip, and in the Command Center are unchanged.
channelsandactivityhub pages (openclaw://hub/channels,openclaw://hub/activity, MCPapp.navigate) and the command palette's "Go to Channels";openclaw://activitywithout a recognized filter,openclaw://history,openclaw://notifications,openclaw://notification-history, andopenclaw://activity-stream; the owner-menu "Pair device" item; tray actions that targeted those hub tags; the "Open Channels" action on channel-problem notifications; the "Open Activity Stream" button on the one-time tip notification; and verified setup receipts for Channels, WhatsApp, or Telegram.openclaw://activity?filter=session|usage|nodestill opens Sessions, Usage, or Instances, andopenclaw://channelsstill copies the channel summary.ChannelIdfield.hub/activitylinks open the Dashboard Channels view, not native Notifications.ChannelId, was unchanged. New receipts omitChannelId; receipts that still carry it load normally.Why This Change Was Made
The page duplicated functionality the Gateway already owns. This removes the page and the code only it used, and routes the former entry points through
WorkspaceNavigation.Dispatchto the existingGatewayDashboardLauncher. A smallDashboardBrowserseam lets full-app tests observe and fail the final browser hand-off. It is a pass-through outside fixture mode and runs strictly after the authority check. The last commit removes channel leftovers that no reachable code used any more.What was removed
channels.status,channels.logout,web.login.start, andweb.login.wait, plus the detailedchannels.startwrapper; andChannelConfigPatchBuilder, which merged channel bot tokens intoconfig.patch.StartChannelAsyncandStopChannelAsyncwrappers (channels.startandchannels.stop) and the derivedSetupNativeTarget.ChannelId.main: the tray channel toggle and itschannel:action branch (their menu item was removed in Companion application refactoring #272), thechannelsummarytray action,MenuDisplayHelper.GetChannelStatusIcon,ChannelHealth.DisplayText, and four unused localization keys in each of the six locales.Evidence
Head
4f8389592bad581b3f3f3a12a2be67105849f8b7(tree8efdf508166fec18ef9ac13da2542d03a96d12cb). CI is green on this head: run 42144527287, attempt 3. Every job that ran passed, and 7 release, publish, signing, and version-reservation jobs were skipped. Attempts 1 and 2 each failed one UI-job test unrelated to this PR (a known chat layout test host crash, then a voice-history fixture timeout that also failed on an unrelated PR; see Validation), so after each I reran only the failed jobs. CI built merge commitbd5647462b06b5e9ea4abf8421905e8e23c4a034, whose tree equals this head tree, so it tested exactly this code. It also ran the real WSL Gateway jobs (Setup and connect, Network recovery, and Revocation recovery; all passed), which cover setup and connect but not the Channels hand-off. CodeQL run 42144527261 passed both scans on this head.The four full-app tests below start the real Companion against the isolated synthetic fixture Gateway with the operating-system browser launch suppressed and logged. They prove the hand-off reaches the browser step with the right target. They do not show a real browser opening the Dashboard.
GatewayFixtureUiTestsunless named)App,WindowManager,SetupNativeHandoffLauncher, andGatewayDashboardLauncherwith its credential resolverLegacyChannelsReceipt_OpensTheGatewayDashboardChannelsViewopenclaw.setup.verify, receipt consumed, no failure dialog, one dispatch tohttp://<host>:<port>/channels. Reaching dispatch means the resolver returned a credential; none is visible.LegacyChannelsReceipt_RevokedIdentityIsRejectedBeforeAnyDashboardLaunch, screenshot 1SetupNativeChatPresentationTests.SetupDashboardDispatchRequiresTheOriginalGatewayAndIdentityLegacyChannelsReceipt_BrowserFailureKeepsTheReceiptAndRetryOpensTheDashboard, screenshot 2ChannelsNavigation_OpensTheGatewayDashboardAndOffersRetryWhenTheBrowserFails, screenshot 3app.navigatetochannelsand the owner-menu "Pair device" each dispatch to/channels. With one failure armed, "Pair device" shows "Dashboard could not open." with Retry, and Retry dispatches again.SetupDashboardHandoffStoreTests.PendingReceipt_WithLegacyChannelId_StillLoads(unit test; no real earlier build was run)ChannelIdfield load with their destination and session key. A local mutation that rejects unknown JSON members ([JsonUnmappedMemberHandling(Disallow)]onSetupNativeTarget) failed 2 of the class's 51 results.SetupDashboardHandoffStore.csis identical tomain, theSetupNativeDestinationvalues (Chat0,WhatsApp1,Telegram2,Channels3) are unchanged, and the fixture tests issue receipts with the production store.Screenshots: the three hand-off failure dialogs
The screenshots come from the
test-results-uiartifact of CI run 42144527287, attempt 1, produced by./scripts/test-gateway-fixture.ps1 -Screenshotson a GitHub-hostedwindows-2025-vs2026runner. The only endpoint visible is the throwaway loopback fixture Gateway. The machine name shown is the runner's, and there are no credentials, user names, or local paths./channels.App log lines, screenshot hashes, and supporting tests
App log lines from the same CI artifact. The app log redacts the host, and each run uses its own loopback port.
The fixture Gateway request logs in the same artifact record
openclaw.setup.verify1 time for the valid receipt, 1 for the revoked identity, 2 for the browser failure and Retry, and 0 for navigation.channels-receipt-identity-revoked.pngF4A8BE13CD5A8AEBFEB4F44486C3053FB1F72D3EDCA4144202A3198301DF5CD3channels-receipt-browser-failed.pngE8BEFDC2324FDEF5F87A4BDBE962146B14E63BE78B9211645D99274591B0A1B6channels-navigation-browser-failed.pngF523B9462C7C3EBE0DA70AF3ACD7CB09EBA1D57AC1BD3B706A89B2352C14CC1BSupporting tests. Unless noted, each passed in the CI Tray test results for this head:
DashboardBrowserTests(6 tests, 7 cases): ordinary runs hand the exact URL to Windows and ignore the failure marker; fixture runs never reach Windows and log only the redacted URL; the simulated failure is consumed once; concurrent launches consume the marker exactly once (FixtureRun_ConcurrentLaunchesConsumeTheFailureMarkerExactlyOnce); an invalid fixture context fails closed.SetupNativeChatPresentationTests.SetupDashboardDispatchRequiresTheOriginalGatewayAndIdentity: dispatch needs the original Gateway and identity.WorkspaceRoutingBoundaryTests.RetiredChannelRoutes_OpenDashboardInsteadOfAnEmptySettingsPageand theDeepLinkParserTestsroute theories: retired Channels and Activity routes open the Dashboard, and the filtered Activity links keep their pages.SetupDashboardHandoffStoreTests.PendingReceipt_WithLegacyChannelId_StillLoads: receipts that still carry the oldChannelIdfield load.PinnedPagesTests.Visible_OmitsUnknownTags_ButStorageKeepsThem: a retired pin is hidden but its tag is preserved.AiReadyPageRenderingTests.VerifiedReadyPage_ShowsChatActionWithoutIssuingOrFinalizing(Tray UI test, Light and Dark): the Chat-only Ready page. Passed for both themes in the Tray UI step of CI attempts 2 and 3.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: the CI full-app fixture tests prove the Channels hand-offs with the operating-system browser launch suppressed. A local interactive run on the maintainer's real desktop showed the deep link and Search "Go to Channels" opening the Dashboard Channels view in Microsoft Edge (see Real Behavior Proof). The receipt, "Pair device", and Retry paths are proven with the fixture only.Validation
Results for head
4f8389592bad581b3f3f3a12a2be67105849f8b7(tree8efdf508166fec18ef9ac13da2542d03a96d12cb). The local build, Shared, Tray, focused, and documentation runs used the uncommitted working tree that was then committed unchanged as this head; that association was recorded manually from the diff hash and file write times. The SetupEngine run used the committed head..\build.ps1- passed (exit 0).dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore- passed: 4,820 total, 4,795 passed, 25 skipped, 0 failed. That is 36 fewer than the previous head because the removedGetChannelStatusIcon(5),ChannelHealth.DisplayText(26), andStartChannel_RequiresSuccessfulGatewayAcknowledgement(5) cases are gone.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore- passed: 5,041 passed, 0 skipped, 0 failed (26 fewer: the removedGetChannelStatusIcontheory cases).dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore- passed: 2,594 total, 2,590 passed, 4 skipped, 0 failed.SetupDashboardHandoffStoreTests(51 results) - passed 51/51. With[JsonUnmappedMemberHandling(Disallow)]temporarily added toSetupNativeTarget, 2 failed; after removing it, 51/51 passed again..\scripts\validate-docs.ps1- passed (72 Markdown files, 7 proof pools).git diff --check- clean. The diff againstmainis 98 files, +1,212 and -9,172 lines.UI, functional, and accessibility tests. Its Tray UI step passed 205 tests, then the test host crashed inReactorChatLayoutProofTests.ReasoningPicker_ReflectsInheritedDefaultWithoutOverridingExplicitChoices, a known crash listed indocs/CI_FAILURES.md. This PR changes no chat or Reactor files.CI Gatefailed only because it aggregates that job. In the same attempt the mock Gateway scenarios passed 61/61 and the fixture profile app tests passed 34/34. I reran the failed jobs once. In attempt 2 the Tray UI step passed (643 discovered, 636 passed, 7 skipped), the fixture profile app tests passed 34/34, and the mock Gateway scenarios passed 60/61, including all four Channels hand-off tests. The one failure,GatewayFixtureUiTests.HistoricalFractionalVoiceConversationRendersWithoutLoadingPlaceholder, timed out after its 20-second fixture wait for the restored historical voice reply (fixture run336dbee1c8734382af4aa61974b7975f). This PR does not change the chat timeline, voice, or session-restore code. Its only change to that test file outside the pinned-pages test adds an optional timeout to the sharedWaitUiAsynchelper, which this test does not pass, so it kept the 20-second default. The test passed in attempt 1 on the same merge commit and failed the same way on unrelated feat: find conversations and settings through shared navigation search #2016 (feat: find conversations and settings through shared navigation search) in run 42126153991, attempt 2. I reran the failed jobs once more. In attempt 3 every job passed: the Tray UI step passed 636 of 643 discovered (7 skipped), the mock Gateway scenarios passed 61/61, the fixture profile app tests 34/34, the functional UI tests 19/19, and the accessibility tests 21 executed, 21 passed.test-results-trayartifact): 5,041 passed, including every supporting test listed under Evidence.pull_request, this head, attempt 1):C# securityandActions securitypassed.Earlier head 92f95d9 (superseded results)
These ran on head
92f95d9bf9e96986fb285be3a00f45b2d6220f9c, before the final cleanup commit, and are kept for history. They are not claimed for the current head.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-x64 --filter 'FullyQualifiedName~NativeSharedFlowTests|FullyQualifiedName~AiReadyPageRenderingTests'- passed: 39.ApprovalCardsGateAllowAndResolveThroughGatewayfailed in the screenshot helper (Sequence contains no elements) and passed 4 of 4 reruns with the same executable. A focused local run of the four new tests plus seven neighboring test cases (pinned pages, shared root dialog, and settings disconnect pruning) passed 11/11.DashboardBrowserTestspassed 10 consecutive runs. Its concurrency regression test failed on the earlier check-then-delete code (6 of 8 concurrent launches took the failure marker) and on a rename-based claim (8 of 8). It passes with the in-process lock (25 rounds of 8 launches).GatewayHandshakeObservationTests.RefusedTransport_ReportsNetworkWithoutClassifyingStackFrames(expectedNetwork, actualServer), a port-dependent test unrelated to this PR, and attempt 2 passed. An earlier failure that this PR did cause (PinnedPages_DisconnectRetainsDisabledRowsAndFocus_AndReconnectEnablesSameRows) was fixed on that head.Real Behavior Proof
OPENCLAW_GATEWAY_FIXTURE=1, isolatedOPENCLAW_TRAY_*data directories, Windows browser launch suppressed and logged) on a GitHub-hostedwindows-2025-vs2026runner in CI run 42144527287. No real Gateway, browser, or user profile was used in this run. The separate real-profile run is described below.4f8389592bad581b3f3f3a12a2be67105849f8b7(tree8efdf508166fec18ef9ac13da2542d03a96d12cb), built by CI as merge commitbd5647462b06b5e9ea4abf8421905e8e23c4a034with the same tree../scripts/test-gateway-fixture.ps1 -AppPath .\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.22621.0\win-x64\OpenClaw.Tray.WinUI.exe -ArtifactsDirectory .\TestResults\GatewayFixture -Screenshots./channelsafter one verification. The revoked identity was rejected with Close only and no dispatch. The browser failure kept the receipt, offered Retry, and the retry dispatched after a second verification. Navigation and "Pair device" dispatched to/channels, and the armed failure produced the "Dashboard could not open" dialog and Retry.src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.22621.0\win-x64\OpenClaw.Tray.WinUI.exe, built from the working tree that was committed unchanged as this head, as recorded under Validation) ran without isolation on the maintainer's real profile against the existing paired local Gateway at127.0.0.1:18789(Control UI 2026.10.6). No Connection, setup, or pairing setting was changed. The app connected with its stored device token (log: "Pairing status: Paired", "Node status: Connected").OpenClaw.Tray.WinUI.exe openclaw://hub/channelsforwarded the link to the running app (log:Received deep link via IPC,Handling deep link). Microsoft Edge opened a new tab athttp://127.0.0.1:18789/channels, with no token in the URL, showing the Dashboard Settings > Channels view: "No channels connected yet. Pick one below to get started.", guided setup rows for WhatsApp, Telegram, Discord, Google Chat, Slack, Signal, iMessage, and Nostr, "More channels…", and "DM access requests".127.0.0.1:18789/channelsand the page text, read through UI Automation, and the app log lines above. No screenshot is attached because the Dashboard sidebar showed the maintainer's personal chat history.Yes/No/N/A): Yes. The three attachment links were downloaded after publishing and their SHA-256 hashes match the table under Evidence.ChannelIdfield. That an earlier build ignores the field's absence is by code inspection only: it computedChannelIdfrom the destination and never read it from JSON.ConnectionPagesaved-row "Open Dashboard" and other directLauncher.LaunchUriAsynccallers bypass the new seam and are unchanged. The tests only exercise launches made through the app'sGatewayDashboardLauncher.openclaw://hub/channelsdeep link and Search "Go to Channels". Setup receipt hand-offs, "Pair device", the other legacy links, and Retry after a browser failure were proven only with the fixture, which suppresses the browser. No WSL Gateway was used. An earlier isolated native Gateway attempt (OpenClaw 2026.10.9) failed before Gateway startup because the isolated Node runtime install was denied access. That task-owned patch was torn down.%APPDATA%\OpenClawTrayand%LOCALAPPDATA%\OpenClawTrayshowed only writes a connected session makes: the log, diagnostics, and last chat state grew or were rewritten,run.markerwas removed, andgateways.jsonand the device identity file were rewritten at unchanged sizes during the handshake. No file contents were read.Security Impact
Yes/No): No.Yes/No): No. Credential storage and resolution are unchanged. The page's channel credential form, which sent bot tokens to the Gateway throughconfig.patch, is removed with the page. In fixture mode the new seam logs only the origin and first path segment of the target, never the credential or query. Outside fixture mode it is a pass-through.Yes/No): No. None were added. The client no longer sendschannels.status,channels.start,channels.stop,channels.logout,web.login.start, orweb.login.wait, nor the page'sconfig.patchrequests for channel credentials. Channel navigation reuses the existing Gateway Dashboard launcher.Yes/No): No.Yes/No): No.Yes, explain the risk and mitigation: N/A. The one security-relevant surface is the setup hand-off authority chain (theGatewayDashboardLauncherauthorizer hook,WindowManager.OpenSetupDashboard, and the consume-once rule inSetupNativeHandoffLauncher). It is re-routed but not weakened. The fixture seam is gated on the fixture isolation context, runs strictly after the authorizer, fails closed on an invalid fixture context, and does nothing outside fixture mode.Compatibility and Migration
Yes/No): No for the UI: the native Channels page is intentionally removed and the setup Ready screen is Chat-only. Setup receipts saved by earlier builds still load, and deep links andapp.navigatetargets keep working and open the Gateway Dashboard Channels view. New receipts omit the unusedChannelIdfield.Yes/No): No.Yes/No): No. A Channels pin saved by an earlier build is hidden, and its stored tag is preserved.Review Conversations
This PR has no inline review threads or reviews. ClawSweeper posts its findings as a top-level comment. Findings on earlier heads were addressed, and its latest review (head
92f95d9b) reported none.