Skip to content

feat(snapshot): add conditional replies and adaptive shell polling - #108

Merged
entelecheia merged 5 commits into
mainfrom
feat/105-adaptive-polling
Nov 10, 2026
Merged

entelecheia merged 5 commits into
mainfrom
feat/105-adaptive-polling

Conversation

@entelecheia

@entelecheia entelecheia commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Repeated snapshots currently transfer full bodies and use fixed polling intervals. This implements delivery 2 of #105: cached values carry an X-Acon-Version hash, and a matching optional X-Acon-Known request header gets {changed:false}. Conditional control stays outside plugin input and the canonical cache key; every body field, including a producer-owned known, remains unchanged. Producer cursor/changed:false replies and errors retain precedence. H2 forwards the header, configured-origin CORS preflight allows it, and older nodes/clients continue using full replies.

Panel, Space and per-tool inbox polling adapt to max(pollMs, 3 * last duration), capped at 60 seconds. Inbox retains its previous 5-second minimum. Space preserves polling cadence across one-second timer jitter instead of drifting into skipped polls. Hidden tabs start no panel/Space polls; visibility resumes one immediate or deferred busy follow-up. Existing heartbeat and PiP behavior remain. Inbox applies each tool as it finishes and rechecks signature-guarded views after each round so snooze expiry updates Inbox, Mini/PiP and pet pose without new provider data.

Room motion uses client observation time. Repeated cached timestamps or later sample jumps therefore cannot cause false source gaps; the shell does not keep a separate server sample time. Routine SWR reuse stays healthy, while actual failed replies retain existing failure handling. Both transports share a header reader, and producer body fields are preserved.

Synthetic body-rewriting probes request the full source using header controls and remove metadata that no longer describes their body. A separate SWR-grace case deliberately preserves stale/sample headers and checks healthy actors, no failure banner and unchanged writes.

Validation of the tree committed as b38e393406a31ca3cf0fb74ec59c9e0b802f9401:

  • Local macOS Chromium --space-motion-only: 1 capture, 0 findings; actual transform transition present (0.8 seconds), 10-second message fade and zero unchanged writes.
  • Local macOS Chromium --space-views-only: 80 captures, 0 findings. Team/Flow/Board each pass 16 rows. The 3D idle window remains at render count 102 before/after with no pending frames; SWR case has no failure banner, no stale actors and zero unchanged writes. Representative motion/3D screenshots inspected.
  • Focused scheduler/cache/header/static/CORS/lineage/historical compatibility tests: 82 passed. Main/N-1 TypeScript, boundary, README facts, syntax and diff checks passed.
  • Full check remains hosted-CI work. Current-head independent OCR/full UI review is pending. Safari/VoiceOver are unverified. Documentation freshness stamps are unchanged.

Related to #105. Push transport and producer changes remain separate.

Final round (owner escalated to Claude): transport failures clear stored versions, the static transport retries without X-Acon-Known after a refused preflight and stops sending it to that node, producer ok:false replies keep failure handling even with changed:false, open item peeks refresh each inbox round, and docs drop the separate server sample-time claim. Local macOS Chromium ui-check at this head: 419 captures, 0 findings.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 13:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T13:47:36.519913Z 22376cc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@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: 22376ccd0c

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread shell/shell.js Resolved
…n any failure

- Clear the stored panel version on any failed reply, status 0 included,
  so a reconnect asks for a full reply.
- Static transport: when a request carrying X-Acon-Known fails in transport
  (e.g. an Access CORS policy refusing the header in preflight), retry it
  plain and stop sending the header to that node for the page.
- Remove the unread serverSampledAt state.
- README: Access CORS must allow X-Acon-Known for conditional replies.
- CHANGELOG: note the Space cursor-only reply passthrough for 0.1.8 shells.
- Inbox and Space treat an ok:false reply as a failure even when it also
  says changed:false, so the failure banner and stale actors still show.
- Each inbox round re-renders an open item peek, so a snooze that expires
  without a data change updates the peek too.
- Docs no longer claim a separately retained server sample time; Room
  motion uses the client observation clock.
@entelecheia
entelecheia merged commit 01f6fff into main Nov 10, 2026
3 checks passed
@entelecheia
entelecheia deleted the feat/105-adaptive-polling branch November 10, 2026 15:38
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.

2 participants