Skip to content

Audit mobile resume query refetch policy#440

Open
ymichael wants to merge 2 commits into
mainfrom
bb/audit-mobile-resume-query-refresh-policy-thr_3cci6asx5v
Open

Audit mobile resume query refetch policy#440
ymichael wants to merge 2 commits into
mainfrom
bb/audit-mobile-resume-query-refresh-policy-thr_3cci6asx5v

Conversation

@ymichael

@ymichael ymichael commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • defines the query reconnect rules in docs/research/mobile-resume-query-refetch-audit.md: websocket-reconnect invalidation is for realtime-owned query families only; no websocket reconnect invalidation for focus-owned live reads, static/session reads, expensive/manual reads, observer-less eviction caches, or typeahead/ephemeral queries
  • resolves the previously suspicious items instead of leaving follow-ups: queued messages, host file previews, host provider CLI status, system usage limits, duplicate thread default execution hooks, and the queued-message dependency on PR Keep active thread state consistent after browser resume #439 behavior
  • adds tests for the changed policies and keeps the audit table current with concrete keep/fix decisions

Resolved policy decisions

Item Resolution
threadQueuedMessages Fixed: now refetches stale queue data on focus/pageshow, matching threadTimeline instead of relying on PR #439-specific behavior.
threadHostFilePreview Fixed: added canonical prefix helpers, focus/reconnect refetch, and websocket-reconnect catch-up invalidation.
hostProviderCliStatus Fixed as focus-owned, not websocket-owned: 60s stale window plus focus/network-reconnect refetch. Websocket reconnect is not a semantic CLI dirty event.
systemUsageLimits Fixed as focus-owned, not websocket-owned: mounted Settings refreshes on focus/network reconnect with the existing 30s stale window; manual refresh remains.
Duplicate useThreadDefaultExecutionOptions Fixed: removed the legacy hook from thread-queries.ts; the dedicated hook reuses canonical query keys. The no-focus policy remains intentional because these values seed visible composer controls and should not churn draft defaults on focus.
Terminal and automation queries Fixed: added websocket-reconnect catch-up invalidation for realtime-owned terminal and automation families.

Validation

  • pnpm exec turbo run test --filter=@bb/app 165 files / 1114 tests passed
  • pnpm exec turbo run typecheck --filter=@bb/app
  • git diff --check

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