Skip to content

fix(ADA-79): WS keepalive + disconnect-banner debounce + friendly diagnostic#87

Merged
adamfgr merged 2 commits into
mainfrom
wizzo/ada-79-stability-fix
Jul 6, 2026
Merged

fix(ADA-79): WS keepalive + disconnect-banner debounce + friendly diagnostic#87
adamfgr merged 2 commits into
mainfrom
wizzo/ada-79-stability-fix

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 6, 2026

Copy link
Copy Markdown

Fresh PR superseding #84 (queue-contended, no review in 33min). WS keepalive + disconnect-banner debounce + dismissable ede_diagnostic. HIGH user value; Adam waiting. SERVER-SIDE (WS keepalive) → include in next redeploy batch.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0246a8290

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/server/src/ws.ts Outdated
Comment thread packages/client-runtime/src/state/server.ts
Comment thread apps/web/src/components/ChatView.tsx
Address Codex review on #87.

The keepalive introduced a new `heartbeat` variant of the
`ServerConfigStreamEvent` union. Older / version-skewed clients (the mobile
app and stale cached web bundles both bundle the shared client-runtime and
contracts) decode this union with a closed schema, so an unknown `heartbeat`
frame fails decoding ~30s into the connection and tears down the whole
`subscribeServerConfig` subscription — exactly the version-skew scenario the
version-mismatch banner in this PR is meant to tolerate.

Negotiate support instead of emitting unconditionally:
- add an optional, additive `supportsHeartbeat` flag to the
  `subscribeServerConfig` payload (older clients omit it; older servers ignore
  it on decode — backward compatible both directions);
- the server only merges heartbeat frames when the client opts in
  (`shouldSendServerConfigHeartbeat`), so clients that cannot decode the
  variant never receive it;
- both client-runtime consumers opt in via a single shared
  `SERVER_CONFIG_SUBSCRIPTION_INPUT` constant, so the subscription stays a
  single shared stream per environment (no split subscription).

Also stop heartbeats from re-emitting the unchanged projection: a quiet
session previously pushed the current `ServerConfigProjection` downstream on
every 30s tick. `projectServerConfig` now emits no downstream value for
heartbeat frames (transport keepalive only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 12:32
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 12:32
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 13:14
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 13:14
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 14:20
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 14:20

@adamfgr adamfgr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by wizzo-approve: all policy conditions verified against HEAD dc2a36f.

@adamfgr adamfgr added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit 930c6e8 Jul 6, 2026
19 checks passed
@adamfgr adamfgr deleted the wizzo/ada-79-stability-fix branch July 6, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant