Repository navigation
feat: add Ask OpenClaw to Companion Home - #2419
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🦞👀 ClawSweeper review completeClawSweeper finished reviewing this revision. |
|
Codex review: passed. What this changesAdds an Ask OpenClaw tab beside Home for the Gateway’s built-in setup and repair assistant. Example: A connected administrator selects Ask OpenClaw and chooses “Show recent changes.”
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open. This maintainer-authored feature is absent from main, and the previous recovery-route blocker is fixed; this review found no remaining blocking defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherWorkspace hosts the existing chat surface; a dedicated conversation owner translates helper input into authenticated Gateway RPCs and projects replies, wizard steps, and recovery notices back into that surface. flowchart LR
A[Home tab selector] --> B[Ask OpenClaw conversation]
B --> C[System agent client]
C --> D[Authenticated Gateway transport]
D --> E[Gateway setup helper]
E --> F[Replies and wizard steps]
F --> B
B --> G[Shared native chat surface]
Technical reviewBest possible solution: Keep the helper on the shared chat surface with one conversation owner, capability-gated access, and recovery through the active Gateway’s Models page. Do we have a high-confidence way to reproduce the issue? This is a feature addition; source inspection confirms that main lacks the separate native helper conversation. Is this the best way to solve the issue? The implementation reuses the existing renderer and connection owner while keeping the helper’s distinct protocol and conversation lifecycle in focused owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4c53470cee20. 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. 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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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 (2 earlier review cycles)
Reviewed December 1, 2026, 3:21 AM ET / 08:21 UTC (Revision 3). |
… fallbacks - Keep an outcome-unknown message visible with a warning until a later turn is accepted, without resending it or reordering history on refresh - Name the failed operation (action, history, start, rejoin) in retry notices - Hide the composer while the helper cannot accept text; restore secrets only on a definite non-send - Offer Control UI when a select step has no options; clear the composer on Gateway scope change - Run pending helper navigation only while Ask OpenClaw is shown; Inbox "Open chat" targets the main chat - Prune Ask OpenClaw on Settings exit when the helper is unavailable Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve append-only Resources.resw conflicts by keeping both Ask OpenClaw and chat activity strings. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Treat a client replaced with a repeated epoch as a new connection. - Seed multiselect steps from the Gateway's initial values. - Report a send as not written when the connection closes after the readiness check. - Remove the unused Busy notice, GetHomeTab and a dead composer branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Home keeps the chat icon, so restore the main design source and remove the notice row for an unshipped Home.svg. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- An UNAVAILABLE session invalidation keeps the turn as unknown with ReplyUnknown; only an INVALID_REQUEST refusal restores the draft. - A later accepted turn no longer clears unknown rows. - A reconnect while a step or question is live rejoins before input. - The conversation gets no client until the connection belongs to the registry's active Gateway. - Ledger and fixture docs updated to match. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
An inference-unavailable rejoin after an unknown turn now shows Set up AI while the row keeps its unknown marker. A sensitive select step no longer renders a disabled secret input; buttons answer it. Narrow the ledger wording for invalidated sessions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Echo a typed config set with its value hidden, as the Gateway logbook does; the request and a restored draft keep the typed text. - A sync that settles, including after a reconnect, clears its own failure notice; a refused action keeps its notice until the next send. - Document both invariants in the architecture ledger. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The local echo of a typed config set now hides the path as well as the value and accepts U+FEFF as a separator, matching the Gateway parser's white-space rules. A turn the Gateway refuses with INVALID_REQUEST (a guard that runs before the turn) returns its text to the composer. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve openclaw#2377 (suggested tasks) overlaps: keep both the Ask OpenClaw helper welcome guard and the task-suggestion composer wiring in OpenClawReactorChatRoot, both fixture scenario parameters in GatewayScenario, and both string sets in every Resources.resw locale. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…s newer text A refused or unwritten turn returned its text only to an empty composer, so a newer draft silently dropped it. Keep the row marked Not sent instead, retain it across history refreshes, and show a localized status under it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A refused turn's text returns to the conversation draft, but the composer shows it only on the next dispatcher pass. The composer's own post-send clear or newer typing in that gap overwrote the restored text. UpdateDraft now takes the composer's last applied draft revision: a stale clear is ignored and stale typing keeps the refused text as a Not sent row. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A send refused before its first await completes synchronously. The composer then keeps its text, and SetSending(false) reports that same text with the old draft revision before the window applies the restored draft. UpdateDraft treated it as newer typing and added a duplicate Not sent row beside the composer text. UpdateDraft now treats composer text that normalizes to the restored draft as shown. The composer and conversation share ChatComposerSubmissionPolicy.NormalizeMessage. The async refusal test now models the real order (the composer clears, then the refusal), and a provider-level test covers the synchronous refusal. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin the two ClawSweeper fixes that had no regression guard: a Gateway scope change clears the mounted Ask OpenClaw composer before any prefill, and Inbox "Open chat" opens the agent's main chat instead of the remembered Home tab. Both assertions fail when their fix is reverted. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…-home Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/re-review |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Local AI setup refuses a Gateway this app did not install and opens Connection settings, so a remote Gateway that advertises the helper without working inference left the user without a recovery path. Reuse the Models page that the helper's model-account handoff already opens; it configures providers for the active Gateway, remote or local, and still links Local AI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
45ea55f588f0ec5596e7df90694e6994b709483c↑ The late ClawSweeper finding on
172f354cis fixed: Set up AI opens the active Gateway's Models page, the route the model-account handoff already uses, with a source guard.↑ The final two-model delta review found no defects; since then this PR changed only that 4-file fix and merged
main(#2422), which does not reach the Ask thread.↑ Screenshots show Home, the Ask OpenClaw ready state and a live Gateway reply; the fix does not change any of those states.
↑ Each of the 10 earlier ClawSweeper items is fixed or answered, with named tests.
↑ Build and Test CI passed on this head (run 46604928258).
↑ The ClawSweeper re-review of this head found no findings and rated readiness, proof and patch quality platinum (4/6).
↓ Set up AI was not clicked at runtime: it appears only when the Gateway's AI is down, and the fixture's inference-unavailable state is test-only.
↓ Three product decisions remain open for the owner (listed under Evidence).
↓ Interactive proof ran on the developer's own profile, not on an isolated
windows-winui-interactivepool host.What Problem This Solves
Companion Home shows the selected agent's main conversation, but there is no clearly labeled place to ask OpenClaw itself for setup and repair help. Users cannot tell where to ask OpenClaw for help and where to chat with their agent. The web Control UI already separates these two.
User Impact
User impact: Home has two tabs, Home and Ask OpenClaw, with an underline showing which one is selected, as in the web Control UI. Ask OpenClaw uses the same chat surface as Home, so its history, quick-action cards and composer look and behave like the agent chat. Home keeps its chat icon and stays the selected agent's chat. Companion remembers the chosen tab for each Gateway. The tabs appear only when the connected Gateway advertises
openclaw.chatandopenclaw.chat.historyand the connection hasoperator.adminscope; otherwise Home looks as before.Compatibility: settings gain one optional field (
HomeTabByGateway). Existing settings load unchanged, and an older release loads the new file and ignores the field.Why This Change Was Made
A new tab makes the built-in helper easy to find without replacing the agent's chat. The tab reuses the shared chat surface instead of adding a second chat UI. A small conversation owner (
AskOpenClawConversation) talks to the Gateway's existingopenclaw.chatandopenclaw.chat.historymethods. When the outcome of a turn is uncertain it never re-sends: it rejoins, shows the uncertainty, and restores input only when the turn definitely wasn't sent.Evidence
Behavior checked: Home and Ask OpenClaw tab switching, loading history, a fresh welcome with quick actions, sending a quick action, receiving a live reply from the real Gateway, and the AI-unavailable state. Everything ran against the installed Store Gateway (2026.10.600.0) on the developer's own profile.
Head
172f354c, the latest captures. The current head45ea55f5changes only where the Set up AI button goes, which none of these states shows. A recapture on45ea55f5was blocked because the workstation was locked: a capture of the locked session returned a black frame and was discarded. (proof commit7964422c):A4E0768B9868B2611B577D99B7B5185B1EDF1F756710938E9F52AC9D22221DE6B8D4CB11283D75847CD187BE668163489143BBFCBA75BC0D30EB5B991BC2E1B6FE0262C193C9C5BC2E3143ECC74842F00CD3972EBCA86307C205D67C33D30A7DTray log for this run (
%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log):The first two lines are the tab's first opening (history, then the welcome). The last line is the quick action.
Earlier head
c8fc7c32(same PR source;172f354conly adds themainmerge of #2422):Welcome behavior: On first opening, Ask OpenClaw loads history and then sends one welcome per app run. The Gateway does not keep passive welcomes, so after a restart you see the old history plus a new welcome. The web Control UI does the same (
initializeSession).Review: A full two-model adversarial review ran at
4a6df1c3, followed by delta reviews through2c757fa3. The final delta review (pr2419-2c757fa3-r1) found no defects. This PR's own source, docs and skill diff at172f354cis byte-identical to that reviewed tree. Themainmerge adds only #2422 (child-session waits). It reaches the shared chat root, butChatSubagentPresentation.ProjectWaitreturns nothing without asessions_yieldhandoff, and the Ask thread has no child sessions, so it cannot change Ask OpenClaw. The only later change is the 4-file Set up AI fix below.ClawSweeper review of
172f354c: every earlier item was resolved. It raised one new P2, fixed in45ea55f5:CompanionPageId.DefaultModel), as the model-account handoff already does. It used to open Local AI setup, which refuses a Gateway this app did not install, so a remote Gateway had no way to fix its model. The Models page sets up providers and the default model for local and remote Gateways, and still offers Local AI.WorkspaceNavigationTests.WindowManager_OwnsOneWorkspaceWindowForChatAndSettings_AndResetsScopeOnCloseasserts the Models route and that HomeTabs no longer callsShowLocalAiSetupClawSweeper re-review of
45ea55f5: no findings, nothing required before merge, and "Ready for maintainer review". Readiness, proof and patch quality are each platinum (4/6).Earlier ClawSweeper findings (review of
6cf5dcc7):AskOpenClawConversationTests.UnknownOutcome_RefreshWithoutMatchingHistoryKeepsTheLocalMessageVisibleand the otherUnknownOutcome_*testsUnknownOutcome_RejoinFailureKeepsTheUnknownNoticeAndRetriesWithoutResending,InferenceUnavailableAfterAnUnknownTurn_ShowsAiUnavailableAndKeepsTheRowUnknown,ReconnectAfterAiUnavailableRejoin_ClearsTheNoticeAndKeepsTheRowUnknownSensitiveInput_RestoresOnlyWhenTheSameContextWasDefinitelyNotSent,SensitiveStep_SendsUntrimmedValueButNeverKeepsOrEchoesItChatProvider_HidesComposerUntilConversationIsReady(every phase)GatewaySwitch_VisibleHelperReactivatesAndLoadsNewScope,GatewaySwitch_DropsLateResultsAndStartsANewSessionWorkspaceNavigationTestsorder guard (ApplyAskDraft: clear, then prefill)WorkspaceNavigationTestsguard onOpenGatewayInboxRouteFailureOperationassertions inAskOpenClawConversationTests,LocalizationValidationTests.WorkspaceHomeTabs_AllRuntimeReferencesResolveInEveryLocaleresaved contains HomeTabByGateway: False)WorkspaceHomeTabsTests.ExistingSettingsWithoutHomeTabByGateway_LoadAndAcceptRememberedTabThe parser's rejection of an empty
replymatches the upstream contract, which declaresreplyasNonEmptyString.Open product decisions (not defects; both reviewers kept each one):
config setis refused while the composer holds newer text, only the masked echo is kept.Required proof pools
windows-winui-interactive: the Home tab selector and the Ask OpenClaw chat surface are new WinUI interactive states.Validation
All on the exact tree of head
45ea55f5(run on172f354cplus the uncommitted fix, byte-identical to the commit), Windows x64:.\scripts\validate-docs.ps1: passed.git diff --check origin/main...HEAD: passed..\build.ps1: passed.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 6,263 passed, 29 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 7,309 passed, 0 failed.dotnet test .\tests\OpenClaw.WinNode.Cli.Tests\OpenClaw.WinNode.Cli.Tests.csproj --no-restore: 141 passed, 0 failed.45ea55f5passed. Run 46598760427 on172f354cpassed.Real behavior proof
.\run-app-local.ps1 -UseStoreGateway -NoBuildlaunched this worktree's Debug tray on the developer's own profile, connected to the installed Store Gateway 2026.10.600.0.172f354c(see Evidence).c8fc7c32, whose PR source matches172f354c.45ea55f5changes only where the Set up AI button goes, not how either state renders.Not verified / blocked
windows-winui-interactivepool host was not used. Proof came from the developer's own profile, not the isolated pool environment.45ea55f5: the workstation was locked. Its only change from172f354cis the Set up AI destination.172f354c. Their source is unchanged sincec8fc7c32.