Skip to content

Fix iOS live chat hydration across projects#877

Merged
arul28 merged 2 commits into
mainfrom
ade/ios-live-chat-hydration-a121ebd3
Jul 23, 2026
Merged

Fix iOS live chat hydration across projects#877
arul28 merged 2 commits into
mainfrom
ade/ios-live-chat-hydration-a121ebd3

Conversation

@arul28

@arul28 arul28 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep Work and Hub chat rosters live across project switches and open scoped session links through the correct project.
  • Bind async hydration, SQLite replacement, and request timeouts to the originating project and socket generation.
  • Isolate cached rosters by machine, publish verified GitHub repository identity from desktop and headless hosts, and fail closed on ambiguous links.
  • Render long assistant answers as normal Markdown with bounded previews and fence-aware tails.

Validation

  • 97 focused iOS tests passed on iPhone 17 Pro simulator.
  • 80 GitHub service tests passed.
  • 5 headless mobile catalog tests passed.
  • Documentation validation passed for 200 files.

ADE   Open in ADE  ·  ade/ios-live-chat-hydration-a121ebd3 branch  ·  PR #877

Summary by CodeRabbit

  • New Features
    • Session links and notifications now open the correct project, lane, branch, and repository-scoped conversation.
    • Project listings include canonical GitHub repository identity when available.
    • Work views can display recently available roster conversations before full synchronization completes.
  • Bug Fixes
    • Improved navigation during project switches and cold launches.
    • Prevented stale synchronization results from overwriting data for the newly selected project.
    • Improved assistant message previews for code, tables, and fixed-width diagrams, including truncated fenced code blocks.

Greptile Summary

This PR strengthens iOS live-chat hydration and cross-project session navigation.

  • Adds canonical GitHub repository identity to desktop and headless mobile project summaries.
  • Routes repository-, lane-, and branch-scoped session links through the machine-wide roster and project catalog.
  • Adds project- and connection-generation guards around iOS hydration requests and database replacement.
  • Hydrates missing lanes before installing Work sessions and improves roster caching, revision tracking, and chat rendering.
  • Expands tests for repository identity, canonical session state, live roster hydration, and assistant rendering.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

Project and connection generations guard hydration writes, retiring sockets fail only their owned requests, overlapping hydration attempts reconcile domain status, and repository-scoped navigation fails closed when canonical identity cannot be established.

T-Rex T-Rex Logs

What T-Rex did

  • The simulator discovery was attempted but failed because xcrun was unavailable.
  • An iOS test run was attempted with xcodebuild but failed because xcodebuild was unavailable.
  • Tool-availability evidence was captured, noting missing prerequisites that prevented proceeding with the workflow.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ios/ADE/Services/SyncService.swift Adds generation-scoped request cleanup, project-scoped hydration guards, coordinated domain statuses, lane-before-session hydration, and host-scoped roster persistence.
apps/ios/ADE/Models/RemoteRosterModels.swift Adds repository-bounded session-target resolution, catalog revision keys, synthetic hydration targets, and per-project roster change detection.
apps/ios/ADE/Views/Hub/HubScreen+ChatNavigation.swift Reworks Hub chat opening to use authoritative roster stubs where possible and activate projects for sessions requiring canonical local hydration.
apps/ios/ADE/Views/Hub/HubScreen.swift Adds retryable roster-based deep-link resolution keyed to request, catalog, roster, and connection revisions.
apps/desktop/src/main/main.ts Includes canonical repository coordinates in desktop mobile-project catalog entries using runtime origins or GitHub remote status.
apps/ade-cli/src/services/sync/headlessMobileProjectSummary.ts Centralizes headless project summary construction and emits paired canonical repository identity.
apps/ios/ADE/App/DeepLinkRouter.swift Preserves validated repository, lane, and branch scope when routing session links and notification payloads.

Reviews (1): Last reviewed commit: "fix(sync): guard cross-project mobile hy..." | Re-trigger Greptile

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jul 23, 2026 12:44am

@arul28 arul28 changed the title ios-live-chat-hydration -> Primary Fix iOS live chat hydration across projects Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 418c89de-891b-4fcf-8da6-043ba2b56d2a

📥 Commits

Reviewing files that changed from the base of the PR and between ae5479a and d5b0786.

⛔ Files ignored due to path filters (2)
  • apps/ios/ADE.xcodeproj/project.pbxproj is excluded by !**/*.xcodeproj/project.pbxproj
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
📒 Files selected for processing (28)
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/sync/headlessMobileProjectSummary.ts
  • apps/ade-cli/src/services/sync/syncMobileProjectIdentity.test.ts
  • apps/desktop/src/main/main.ts
  • apps/desktop/src/main/services/github/githubService.test.ts
  • apps/desktop/src/main/services/github/githubService.ts
  • apps/desktop/src/shared/syncMobileProjectIdentity.ts
  • apps/desktop/src/shared/types/sync.ts
  • apps/ios/ADE/App/ContentView.swift
  • apps/ios/ADE/App/DeepLinkRouter.swift
  • apps/ios/ADE/Models/RemoteModels.swift
  • apps/ios/ADE/Models/RemoteRosterModels.swift
  • apps/ios/ADE/Services/Database.swift
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/Hub/HubScreen+ChatNavigation.swift
  • apps/ios/ADE/Views/Hub/HubScreen.swift
  • apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift
  • apps/ios/ADE/Views/Work/WorkChatHeaderAndMessageViews.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView.swift
  • apps/ios/ADE/Views/Work/WorkMarkdownParsing.swift
  • apps/ios/ADE/Views/Work/WorkRootScreen+Actions.swift
  • apps/ios/ADE/Views/Work/WorkRootScreen.swift
  • apps/ios/ADE/Views/Work/WorkSessionDestinationView.swift
  • apps/ios/ADE/Views/Work/WorkSessionGrouping.swift
  • apps/ios/ADETests/ADETests.swift
  • apps/ios/ADETests/WorkAssistantRenderingTests.swift
  • apps/ios/ADETests/WorkLiveRosterHydrationTests.swift
  • apps/ios/ADETests/WorkSessionCanonicalStateTests.swift

📝 Walkthrough

Walkthrough

The PR propagates repository identity through mobile project summaries, adds scoped iOS work-session navigation, guards hydration against project switches and stale connections, improves roster caching and overlays, and stabilizes assistant markdown preview classification.

Changes

Project identity propagation

Layer / File(s) Summary
Shared project summary identity
apps/ade-cli/src/services/sync/*, apps/desktop/src/shared/*, apps/desktop/src/main/*
Project summaries now derive canonical GitHub owner/name values, with headless summary construction centralized in a shared helper.
Origin parsing coverage
apps/desktop/src/main/services/github/*, apps/ade-cli/src/services/sync/*
Shared GitHub remote parsing is used and GitHub-like non-GitHub origins remain identifiable without producing repository coordinates.

iOS navigation and hydration

Layer / File(s) Summary
Scoped roster navigation
apps/ios/ADE/App/*, apps/ios/ADE/Models/*, apps/ios/ADE/Services/SyncService.swift, apps/ios/ADE/Views/Hub/*
Deep links carry lane, repository, and branch context through roster resolution into hub or Work navigation.
Project-safe hydration and Work projections
apps/ios/ADE/Services/Database.swift, apps/ios/ADE/Services/SyncService.swift, apps/ios/ADE/Views/Work/*
Hydration writes validate expected projects, pending requests track connection generations, roster state is host/project scoped, and Work projections reset or overlay data when projects change.

Assistant rendering

Layer / File(s) Summary
Cached markdown classification
apps/ios/ADE/Views/Work/WorkMarkdownParsing.swift, apps/ios/ADE/Views/Work/WorkChat*
Monospaced classification is retained across preview pagination and drives line budgets and renderer selection; fenced tail previews restore their opening fence.
Rendering validation
apps/ios/ADETests/WorkAssistantRenderingTests.swift
Tests cover tables, fenced trees, wireframes, truncation, and markdown-only rendering paths.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • arul28/ADE#575: Also changes headless mobile project summary construction and icon data handling.
  • arul28/ADE#713: Also modifies iOS deep-link session routing and navigation payloads.

Suggested labels: ios, desktop, docs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.07% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main iOS cross-project live chat hydration fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/ios-live-chat-hydration-a121ebd3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arul28
arul28 merged commit 878a0af into main Jul 23, 2026
34 checks passed
@arul28
arul28 deleted the ade/ios-live-chat-hydration-a121ebd3 branch July 23, 2026 02:49
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