Skip to content

Align iOS remote sessions and timeline UX with HarmonyOS - #2865

Open
wgqqqqq wants to merge 3 commits into
mainfrom
wgq/ios-harmony-logic-parity
Open

Align iOS remote sessions and timeline UX with HarmonyOS#2865
wgqqqqq wants to merge 3 commits into
mainfrom
wgq/ios-harmony-logic-parity

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

The iOS app could treat cached content as a live connection, eagerly hydrate the previously selected account device, refetch complete transcripts during session switches, and repeatedly rebuild long Markdown timelines. This aligns its remote directory, cache, session resume, tool presentation, and scrolling behavior with the HarmonyOS implementation.

Changes:

  • load device and workspace branches on disclosure, keep their loading/failure state isolated, and retain device-scoped cached rows when refresh or optional persistence work fails
  • defer account target hydration until the user selects a device while still restoring the account directory immediately
  • restore complete cached transcripts without a blocking full-history request, reset volatile poll versions safely, and serialize rapid cache misses so only the first and latest selection issue transcript RPCs
  • consume authoritative message_snapshot replacements, handle history rollback to zero, and repair older peers that report a shorter count without a snapshot
  • reject hollow cached assistant rows and fetch their authoritative content instead of resuming beyond missing bodies
  • collapse consecutive completed tools across tool kinds while keeping running, failed, interactive question, and plan tools visible
  • cache Markdown projections, correct upward-reading gesture detection, preserve bottom following across session/send transitions, and support interactive keyboard dismissal
  • avoid redundant remote state publication and timeline row projection; keep nested message/tool stacks non-lazy to prevent SwiftUI accessibility layout loops on long conversations
  • preserve confirmed remote mutations and clean up cached drafts, transcripts, cursors, and rows after confirmed deletion

Validation:

  • pnpm run mobile:architecture
  • pnpm run mobile:ui:check
  • (cd src/apps/mobile/shared && ./gradlew jvmTest compileKotlinIosSimulatorArm64 :core-feature:assembleOpenBitFunMobileCoreDebugXCFramework)
  • (cd src/apps/mobile/ios && ./Testing/run-pure-swift-tests.sh)
  • full iOS simulator build and install with the Xcode 16.4 toolchain
  • live account-device directory expansion and long remote-session restore in the iOS 18.6 simulator
  • long-session CPU settled from a reproduced continuous ~100% layout loop to 0–0.1%; the simulator accessibility tree remained readable with 392 elements
  • git diff --check

Remote scenarios exercised: Remote Control through device-scoped transport and persistence tests plus the live account relay in the iOS simulator. Remote Workspace execution, Peer Device Mode, and Detached Dispatch are unchanged.

@wgqqqqq wgqqqqq changed the title Align iOS remote loading and cache behavior with HarmonyOS Align iOS remote sessions and timeline UX with HarmonyOS Sep 7, 2026
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