Skip to content

fix(ios): keep cached chats visible while reconnecting and add cold-load skeletons - #7362

Open
me2seeks wants to merge 1 commit into
mainfrom
feat/ios-reconnect-and-skeletons
Open

me2seeks wants to merge 1 commit into
mainfrom
feat/ios-reconnect-and-skeletons

Conversation

@me2seeks

Copy link
Copy Markdown
Contributor

Summary

Fixes misleading offline/empty flashes on the iOS app while paired Hosts are connecting or reconnecting, keeps cached chat lists usable during reconnects, and introduces restrained cold-load skeletons.

  • Accurate connection & reconnect state across Chats, Chat, and Pending
    • Distinguish active connecting / backoff reconnecting from offline waiting-for-network (e.g. Airplane Mode) and true disconnected/revoked states.
    • When a Host is reconnecting with cached conversations already on screen, keep the cached list visible and browsable with a lightweight top reconnecting notice instead of replacing it with a skeleton or offline empty state.
    • Preserve per-Host failure and retry controls in the All scope so one Host reconnecting never masks another Host's initial-load failure.
    • Track catalog watch failures independently from list fetches and keep prior cached rows visible when a post-reconnect refresh fails, exposing a Retry path that also recovers dropped subscriptions.
    • Align ChatScreen with the shared connection state (disable sending while reconnecting; show manual Reconnect only when actually offline) and prevent stale bridge snapshots from overwriting local ScopePill selection.
  • Restrained cold-load skeletons (app/ui/Skeleton.tsx)
    • Add delayed (150 ms) skeletons that respect Light/Dark tokens and Reduce Motion, avoiding flashes on fast local connections.
    • Applied only to cold empty loads (Chats, Chat transcript, Pending, and initial-load settings lists); never used for cached reconnects, pagination, or button actions.
  • Documentation & tests
    • Update DESIGN.md iPhone motion inventory.
    • Add headless behavior regressions in products/maka/ios-shell/tests/ios_shell_behaviors.rs covering cold start from offline + autoReconnect, waiting-for-network offline fallback, multi-host All-scope failure + retry, late catalog watch timeout recovery, cached reconnect in Chats/Chat, and exact 149 ms / 150 ms skeleton delay timing.

Verification

  • CARGO=mbx node scripts/ci.mjs check ios (55 headless behavior tests + aarch64-apple-ios-sim target check)
  • node scripts/ci.mjs check i18n (12 locales)
  • Biome 2.6.3 check & git diff --check origin/main...HEAD
  • Note: Verified in headless NSH + iOS simulator compilation; live iPhone/simulator visual & gesture walk-through has not been run yet.

Part 1 of a 2-PR native stack (Part 2 adds scroll auto-pagination and full-turn view: 'chat' history loading on top of this branch).

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants