Skip to content

fix(webchat): sessions persist after reconnects#89017

Merged
openclaw-clownfish[bot] merged 8 commits into
openclaw:mainfrom
zhangguiping-xydt:feat/issue-87700
Jun 22, 2026
Merged

fix(webchat): sessions persist after reconnects#89017
openclaw-clownfish[bot] merged 8 commits into
openclaw:mainfrom
zhangguiping-xydt:feat/issue-87700

Conversation

@zhangguiping-xydt

@zhangguiping-xydt zhangguiping-xydt commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

What problem does this PR solve?

  • Fix classification: root-cause fix for a scoped Control UI reconnect/session-lifecycle bug.
  • Root cause: the session lifecycle state source was split after a Control UI sleep/network reconnect: the UI continued to display the previous sessionId, while Gateway freshness handling treated the next send like an ordinary stale send and rotated that matching transcript into a reset archive before the resumed turn landed.
  • Why this is root-cause fix: the source invariant is now enforced at the owner boundaries: Control UI creates a one-shot private reconnect marker only for the displayed matching session, Gateway accepts that marker only from operator UI clients, and reply initialization receives the resume request only after public protocol validation remains closed.
  • The reconnect recovery is now scoped to Control UI behavior instead of publishing a new general chat.send resume contract or Plugin SDK reply-options surface.

Why does this matter now?

  • The linked bug is user-visible session loss after an ordinary Control UI reconnect.
  • The earlier shape fixed that path by adding chat.send.resumeSession, but that made the fix look like a new public Gateway protocol feature and required a broader product/session-policy decision.

What is the intended outcome?

  • A Control UI reconnect send can preserve the currently visible matching session for that one send.
  • Ordinary stale sends still follow configured idle/daily reset freshness and create a fresh sessionId when policy requires it.
  • chat.send.resumeSession is not part of the public Gateway protocol schema, generated Swift model, or docs.
  • requestedSessionId / resumeRequestedSession stay on the internal Gateway/reply path and are not part of exported Plugin SDK GetReplyOptions.

What is intentionally out of scope?

  • This does not introduce a third-party reconnect/resume API.
  • This does not change session reset configuration, daily reset timing, idle freshness evaluation, transcript storage, or migration behavior.

What does success look like?

  • Control UI reconnect recovery remains available for the original user path.
  • Public WebChat / non-operator clients cannot use the private Control UI marker as a generic session freshness override.
  • Protocol validation rejects resumeSession as an extra chat.send property.
  • Plugin SDK reply-runtime keeps GetReplyOptions free of the private reconnect resume controls.

What should reviewers focus on?

  • The product boundary: reconnect resume is now an internal Control UI affordance, not a published Gateway protocol field or Plugin SDK option.
  • The session-state boundary: the one-shot resume still requires a matching sessionId; ordinary stale sends still rotate.
Summary guidance

This PR description is the contributor's durable explanation of the change. Write it for human maintainers first; ClawSweeper and Barnacle use the same text to understand intent, proof, risk, and current review state.

Describe the intent and outcome in 2-5 bullets. Avoid restating the diff; reviewers and bots can read the changed files.

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

Linked context

Which issue does this close?

Closes #87700

Which issues, PRs, or discussions are related?

Related #89017

Was this requested by a maintainer or owner?

No direct maintainer request; ClawSweeper requested maintainer/product review for the public protocol shape, so this update narrows the shape to avoid a public API decision.

Linked context guidance

Link the issue, PR, discussion, maintainer request, or owner request that explains why this PR should exist. Maintainer context helps reviewers and automation distinguish intended work from drive-by churn.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Control UI reconnect send preserves the matching visible session without exposing a public chat.send.resumeSession field.

  • Real environment tested: Foreground Gateway websocket RPC from the current checkout, using real Control UI and public WebChat client identities with browser-origin and device-identity handshake requirements enabled.

  • Exact steps or command run after this patch:

    • Started a foreground dev Gateway from the current checkout with isolated state.
    • Seeded stale session registry rows for the ordinary-send and reconnect-send cases.
    • Sent real chat.send websocket RPCs for Control UI reconnect, public WebChat with the private marker, and ordinary stale Control UI send.
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output): Validation live-control-ui-reconnect-proof (pass, exit_code=0, 103436ms):

    LIVE_GATEWAY_PROOF: PASS foreground Gateway websocket RPC exercised #87700/#89017 behavior
    scenario=control-ui-reconnect-send result=PASS requested=reconnect-preserved-session observed=reconnect-preserved-session behavior=preserved_same_visible_session_after_reconnect
    scenario=public-webchat-private-marker result=PASS rpc_ok=false error=invalid_chat_send_params behavior=private_marker_rejected_for_non_operator_client
    scenario=ordinary-stale-control-ui-send result=PASS requested=ordinary-old-session observed=e5ef8f7a-8fcc-4cc0-ade9-006bd8111b02 behavior=rotated_by_stale_freshness
    LIVE_GATEWAY_PROOF: PASS public protocol stayed closed while Control UI reconnect recovery worked
    
  • Observed result after fix:

    • Control UI reconnect send with the private marker kept the same visible session id.
    • Public WebChat sending the private Control UI reconnect marker was rejected by chat.send validation.
    • Ordinary stale Control UI send without the reconnect marker rotated to a new session id.
    • resumeSession remains outside the public chat.send protocol contract.
  • What was not tested: None for the scoped Gateway/session behavior covered by this proof.

  • Proof limitations or environment constraints: The live proof targets the runtime session boundary that caused [Bug]: Control UI webchat session silently resets after network disconnect / sleep — previous session file renamed to .jsonl.reset.* and lost from sessions tab #87700; Control UI marker construction is covered by the supplemental controller regression tests below.

  • Before evidence (optional but encouraged): Before the scoped reconnect handling, a stale send with the displayed matching session was handled like an ordinary stale send and rotated instead of preserving the visible reconnect session.

Real behavior proof guidance

External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only.

Screenshots are encouraged even for CLI, console, text, or log changes. Terminal screenshots, copied live output, redacted runtime logs, recordings, and linked artifacts count.

If your environment cannot produce the ideal proof, explain that under Proof limitations or environment constraints so reviewers and ClawSweeper can direct the next step properly.

Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.

Tests and validation

Which commands did you run?

  • pnpm lint --threads=8 (pass, exit_code=0, 206428ms)
  • node scripts/run-vitest.mjs packages/gateway-protocol/src/index.test.ts src/plugins/contracts/plugin-sdk-subpaths.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts ui/src/ui/controllers/chat.test.ts (pass, exit_code=0, 139848ms)
  • pnpm exec oxfmt --check src/auto-reply/dispatch.ts src/auto-reply/reply/dispatch-from-config.types.ts src/auto-reply/reply/get-reply.types.ts src/plugins/contracts/plugin-sdk-subpaths.test.ts (pass, exit_code=0, 2584ms)
  • git diff --check (pass, exit_code=0, 1276ms)
  • TMPDIR=<isolated temp dir> NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.full-core-support-boundary.config.ts (pass, exit_code=0, 9189ms)
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm build:ci-artifacts (pass, exit_code=0, 178580ms)
  • ClawSweeper commit review on the submitted range (pass; no actionable findings)

What regression coverage was added or updated?

  • Protocol validator coverage proves resumeSession is not a public chat.send parameter.
  • Gateway websocket coverage proves the private reconnect marker is accepted only for Control UI and rejected for public WebChat.
  • Plugin SDK contract coverage proves openclaw/plugin-sdk/reply-runtime does not expose requestedSessionId / resumeRequestedSession through GetReplyOptions.
  • Control UI controller coverage proves ordinary sends do not include any resume marker and reconnect sends use the private marker once.

What failed before this fix, if known?

  • check-lint failed because the controller regression test read __controlUiReconnectResume with dot syntax, triggering no-underscore-dangle; the assertion now checks property absence without relaxing lint rules.
  • The earlier build-artifacts boundary failure was tied to the stale pre-sync checkout; after syncing with current main, the same core-support boundary suite passes.

If no test was added, why not?

  • This update only fixes CI after the existing behavior and SDK-boundary regression coverage was already present; the current test and live-proof commands above revalidated that coverage on the submitted range.
Testing guidance

List focused commands, not every incidental check. CI is useful support, but external PRs still need real behavior proof above when behavior changes.

Risk checklist

Did user-visible behavior change? (Yes/No)

Yes. Control UI reconnect sends can preserve the matching visible session once; this is the intended fix for the linked session-loss path.

Did config, environment, or migration behavior change? (Yes/No)

No.

Did security, auth, secrets, network, or tool execution behavior change? (Yes/No)

Yes, in the limited sense that Gateway request validation now has an internal Control UI-only marker. Non-operator/public clients are rejected by validation coverage.

What is the highest-risk area?

Session-state and protocol boundary: avoiding a generic client-controlled override of idle/daily freshness.

How is that risk mitigated?

  • resumeSession was removed from the public schema and generated Swift model.
  • requestedSessionId / resumeRequestedSession were removed from exported GetReplyOptions and kept on internal Gateway/reply option types.
  • The private marker is stripped before validation only for operator UI clients.
  • Public WebChat coverage proves the marker is rejected for non-Control UI clients.
  • Reply initialization still only resumes when the supplied sessionId matches the current session entry.

Related open PR / competition scan / contract scope:

Patch quality warnings / notes:

  • Patch quality warning, diff size: the PR necessarily spans Control UI request construction, Gateway request validation, session initialization, generated protocol model, docs, and regression tests so the contract is narrowed consistently; splitting would leave either the UI marker, protocol schema, or Gateway behavior inconsistent.
  • Patch quality warning, default return: src/gateway/server.chat.gateway-server-chat-b.test.ts returns undefined from the mocked reply only to stop the harness after capturing reply initialization options; this is test-only control flow, not a production fallback.
  • Patch quality warning, type escape: the unknown casts are confined to UI helper/test setup where the shared UI state object is intentionally sliced down to chat-controller fields; they do not widen the runtime chat.send payload or relax Gateway validation.
Risk guidance

Use this for author judgment that is not obvious from the diff. ClawSweeper can see touched files, but it cannot know which behavior you think is risky, why the risk is acceptable, or what mitigation reviewers should verify.

Current review state

What is the next action?

Maintainer-ready confidence: high after syncing with current main, fixing the remaining lint failure, revalidating build-artifacts coverage, refreshing live Gateway proof, and passing ClawSweeper commit review.

Review the narrowed implementation and let CI settle after this update.

What is still waiting on author, maintainer, CI, or external proof?

Which bot or reviewer comments were addressed?

  • RF-001: the existing status: ⏳ waiting on author label is addressed by this update; it should be recalculated by hosted ClawSweeper after submit.
  • RF-002: addressed by Plugin SDK contract coverage proving public dispatch helper parameter types cannot accept private resume keys.
  • RF-003: disclosed as the remaining maintainer product judgment: the one-shot Control UI exception to idle/daily freshness is intentionally scoped, requires a matching current sessionId, and is backed by live Gateway proof.
  • RF-004: addressed by keeping requestedSessionId and resumeRequestedSession out of exported Plugin SDK GetReplyOptions.
  • RF-005: disclosed as the intended scoped session-policy exception; it is Control UI-only, one-shot, and requires the matching current sessionId.
  • RF-006: addressed by narrowing public reply-runtime dispatch signatures and running targeted Vitest coverage for Plugin SDK subpaths, Gateway reconnect forwarding/rejection, and session freshness behavior.
  • RF-007: addressed by keeping resume controls out of the public Plugin SDK surface and carrying them only through internal Gateway/reply option types.
  • RF-008: addressed by running the requested Vitest command successfully.
  • RF-009: addressed by running the requested oxfmt --check command successfully.
  • RF-010: addressed by running git diff --check successfully.
Review state guidance

Keep this as the durable state for review progress. If useful information appears in comments, fold the current next action or blocker back here so maintainers and ClawSweeper do not need to reconstruct state from comment history.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: S triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels Jun 1, 2026
@clawsweeper

clawsweeper Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 22, 2026, 12:30 AM ET / 04:30 UTC.

Summary
The PR adds a private Control UI reconnect marker, Gateway stripping/validation, internal reply/session options, docs, and tests so a matching reconnect send can preserve the visible session once without exposing a public resumeSession protocol field.

PR surface: Source +86, Tests +225, Docs +1. Total +312 across 18 files.

Reproducibility: yes. at source level: current main still treats stale daily/idle entries as non-reusable, and Control UI currently forwards only the visible sessionId without a reconnect-specific resume intent. I did not run the physical sleep, Docker, and Chrome wake scenario in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Public Resume Surface: 0 public fields added; 2 internal option fields added. The current revision avoids a new public chat.send or Plugin SDK contract while still adding an internal Gateway/reply path reviewers need to approve.
  • Freshness Exception: 1 one-shot operator UI path added. The PR changes reset behavior for a narrow reconnect case, so this product/session-policy fact matters more than raw file count.

Stored data model
Persistent data-model change detected: serialized state: src/auto-reply/reply/session.test.ts, serialized state: src/auto-reply/reply/session.ts, unknown-data-model-change: src/auto-reply/reply/session.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #87700
Summary: This PR is the open candidate fix for the canonical Control UI reconnect reset report; archive visibility and broader history-family work overlap but do not replace this root-cause fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Mantis proof suggestion
A short real Control UI browser proof would materially complement the RPC proof by showing the visible chat does not clear after reconnect. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify in Control UI that a reconnect send preserves the visible session and ordinary stale sends still rotate.

Risk before merge

  • [P1] Merging intentionally lets a matching operator UI reconnect send bypass configured idle/daily rollover once, which is a session-policy choice maintainers should explicitly accept.
  • [P1] The private marker is stripped before public protocol validation for operator UI clients, so the owner boundary is safer than a public field but still needs maintainer approval as an internal request-shape exception.
  • [P1] The supplied proof covers live Gateway websocket RPC behavior, but I did not independently run the full physical Mac sleep, Docker, and Chrome wake scenario in this read-only review.
  • [P1] This PR prevents the reconnect-triggered reset path, but it does not solve adjacent archive/history discoverability work tracked by related issues.

Maintainer options:

  1. Accept the scoped freshness exception (recommended)
    Maintainers can approve the one-shot matching-session reconnect behavior as the intended fix, with the current tests and live RPC proof guarding public-client rejection and ordinary stale rotation.
  2. Tighten the owner boundary before merge
    If maintainers want browser-Control-UI-only behavior, change the server check from operator UI classification to the browser Control UI classifier and add a regression case for TUI or other operator clients.
  3. Pause for broader session UX
    If maintainers do not want any rollover bypass, pause or close this PR and pursue proactive stale-session UI/archived-history disclosure instead.

Next step before merge

  • [P2] The remaining action is maintainer session-policy approval, not an automated code repair.

Security
Cleared: No concrete security or supply-chain issue found; the diff does not change dependencies, workflows, lockfiles, package scripts, or secret handling, and public clients remain rejected by validation coverage.

Review details

Best possible solution:

Land this PR only after maintainers explicitly accept the one-shot Control UI freshness exception, while keeping public Gateway protocol and Plugin SDK surfaces closed and leaving archive/history discovery to separate work.

Do we have a high-confidence way to reproduce the issue?

Yes at source level: current main still treats stale daily/idle entries as non-reusable, and Control UI currently forwards only the visible sessionId without a reconnect-specific resume intent. I did not run the physical sleep, Docker, and Chrome wake scenario in this read-only review.

Is this the best way to solve the issue?

Yes, with maintainer approval: this is a focused candidate because it keeps the public protocol and Plugin SDK closed, requires a matching current sessionId, and preserves ordinary stale-send rotation. The safer alternative, if maintainers reject the exception, is proactive stale-session UI disclosure rather than a hidden resume path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a594d2ce7325.

Label changes

Label justifications:

  • P1: The PR targets a user-facing Control UI session continuity bug where reconnects can make visible conversation history disappear from the active session.
  • merge-risk: 🚨 compatibility: The patch intentionally changes existing idle/daily reset behavior for a matching reconnect send, which can affect operator expectations during upgrades.
  • merge-risk: 🚨 session-state: The patch changes when stale session state is reused versus rotated, so a mistake could preserve or reset the wrong session.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix live Gateway websocket RPC output showing reconnect preservation, public-client rejection, and ordinary stale-send rotation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix live Gateway websocket RPC output showing reconnect preservation, public-client rejection, and ordinary stale-send rotation.
Evidence reviewed

PR surface:

Source +86, Tests +225, Docs +1. Total +312 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 11 112 26 +86
Tests 6 226 1 +225
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 339 27 +312

Acceptance criteria:

  • [P1] Review supplied live Gateway proof in the PR body.
  • [P1] If landing, prefer a maintainer-run browser/Control UI smoke or Mantis visual proof for the visible reconnect flow.

What I checked:

Likely related people:

  • steipete: Commit 367826f6e4e9 added the daily reset policy and tests that make sessions stale across the default reset boundary, which is central to this reconnect rollover path. (role: introduced reset policy behavior; confidence: medium; commits: 367826f6e4e9; files: src/auto-reply/reply/session.ts, src/config/sessions/reset.ts, docs/reference/session-management-compaction.md)
  • Byungsker: Commit 709dc671e442 added archival of old transcripts on daily/scheduled reset, matching the .jsonl.reset.* artifact in the linked report. (role: scheduled reset archive contributor; confidence: high; commits: 709dc671e442; files: src/auto-reply/reply/session.ts)
  • BunsDev: Commit cb9d7884cca3 preserved local session continuity by carrying session ids through Control UI/TUI sends, making this history directly adjacent to the missing reconnect-specific intent. (role: adjacent Control UI session continuity contributor; confidence: high; commits: cb9d7884cca3; files: ui/src/ui/controllers/chat.ts, src/gateway/server-methods/chat.ts, src/tui/tui-last-session.ts)
  • vincentkoc: Recent history includes reset-policy helper isolation and current-line ownership in the session and UI/Gateway files, so this person is a strong routing candidate for reviewing the session freshness boundary. (role: recent session and Gateway area contributor; confidence: medium; commits: c70be4b4afd0, c645ec4555c0; files: src/config/sessions/reset-policy.ts, src/auto-reply/reply/session.ts, ui/src/ui/controllers/chat.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 1, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 1, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed size: S proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 1, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Jun 20, 2026
@zhangguiping-xydt
zhangguiping-xydt marked this pull request as ready for review June 20, 2026 12:48
@zhangguiping-xydt

Copy link
Copy Markdown
Contributor Author

Update on the latest revision:

  • Synced this branch with current main and resolved the protocol generator conflict by keeping the new main-side defaults while removing the proposed chat.send.resumeSession default.
  • Narrowed the reconnect fix so session resume remains an internal Control UI behavior instead of a public Gateway protocol field:
    • removed public chat.send.resumeSession from the schema and generated Swift model;
    • Control UI now sends a private one-shot __controlUiReconnectResume marker only when its reconnect marker matches the currently visible sessionId;
    • Gateway strips and honors that marker only for operator UI clients before normal public parameter validation;
    • public WebChat / non-operator clients sending the private marker are rejected.
  • Updated docs and regression coverage for protocol validation, Gateway websocket behavior, and Control UI request construction.

Reasoning:

The linked bug is user-visible session loss after a Control UI reconnect or sleep/resume. A general resumeSession protocol field would make this look like a new client contract and a client-controlled freshness override. Keeping the hint private to Control UI preserves the intended reconnect recovery while ordinary stale sends stay on the existing idle/daily rollover path, avoiding a broader public API/product decision.

Validation run for this revision:

  • node scripts/run-vitest.mjs packages/gateway-protocol/src/index.test.ts ui/src/ui/controllers/chat.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts
  • pnpm exec oxfmt --check on the changed files
  • git diff --check
  • ClawSweeper commit review passed

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

1 participant