fix(onboarding): verify bootstrap message rendered before consuming one-shot gate - #307
Merged
steipete merged 2 commits intoMay 11, 2026
Conversation
Only persist the first-run bootstrap gate when the injected chat message is confirmed as accepted by the chat UI. Treat unverified sends as retryable so a false-positive send signal does not permanently suppress the hatching prompt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to Scott's PR #274 onboarding/chat work. The hatching/bootstrap prompt path was running, but
BootstrapMessageInjectorcould consumeHasInjectedFirstRunBootstrapafter JavaScript merely returned"sent"without confirming the message actually rendered or the composer accepted it.This PR hardens the injector so false-positive sends stay retryable instead of permanently suppressing the first-run hatching prompt.
Changes
sent-unverified,no-input, andno-send-button.MarkInjected()for confirmedsent.sent-unverifieddoes not flipHasInjectedFirstRunBootstrap, while verifiedsentstill does.Validation
./build.ps1— PASS (Cli, Shared, WinNodeCli, WinUI)dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restorewithOPENCLAW_REPO_ROOTset — PASS: 1465 total, 1443 succeeded, 22 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --no-buildwithOPENCLAW_REPO_ROOTset — PASS: 911 total, 911 succeeded, 0 skippeddotnet vstest ./tests/OpenClaw.Tray.Tests/bin/Debug/net10.0/OpenClaw.Tray.Tests.dll— PASS: 911 total, 911 passedOpenClaw.Tray.WinUI.exefrom this worktree with isolatedOPENCLAW_TRAY_DATA_DIR; process stayed alive for 15 secondsNote: a full
dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restorebuild+test invocation hung in this local shell during project build output; the already-built test DLL passed viadotnet test --no-buildanddotnet vstest.Mike retest unstick command
Mike's current box already has
HasInjectedFirstRunBootstrap=true, so after installing this build and before retesting first-run hatching, run:This is not a reset of credentials; it only reopens the one-shot bootstrap prompt gate.