[orchestrator-v2] fix(mobile): Stabilize iOS draft attachments, Hermes sort, and Home - #3923
[orchestrator-v2] fix(mobile): Stabilize iOS draft attachments, Hermes sort, and Home#3923mwolson wants to merge 138 commits into
Conversation
…gg#3781) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…pingdotgg#3795) Co-authored-by: Julius Marminge <julius@mac.lan> Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…tgg#3823) Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Horus Lugo <horusgoul@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com> Co-authored-by: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Co-authored-by: Alex <me@pixp.cc> Co-authored-by: codex <codex@users.noreply.github.com> Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Needs human review 25 blocking correctness issues found. Diff is too large for automated approval analysis. A human reviewer should evaluate this PR. You can customize Macroscope's approvability policy. Learn more. |
2857eb3 to
76a88a0
Compare
Capture RCTFatal message and stack to Documents via a native handler so Release Hermes aborts leave last-crash.json without a device console. Harden the JS ErrorUtils path with a minimal write-first record, durable fsync writes, breadcrumb max-wait flush, and an Expo AppDelegate plugin. Skip NativeStackScreenOptions setOptions when content is unchanged so Thread catch-up re-renders do not loop through PreventRemoveProvider and hit maximum update depth.
CI Mobile Native Static Analysis failed on a multi-line if where the opening brace was on the following line.
76a88a0 to
6e9701d
Compare
| // Prefer a non-null archivedAt when the same id appears in both lists. | ||
| if (existing.archivedAt === null && thread.archivedAt !== null) { | ||
| byId.set(String(thread.id), thread); | ||
| } |
There was a problem hiding this comment.
Archive wins membership ID conflicts
Medium Severity
When the same thread id appears in both threads and archivedThreads, normalizeShellThreadMembership always prefers the copy with a non-null archivedAt. An inconsistent full snapshot that still carries a stale archived row can therefore override a fresher active row (archivedAt: null) and keep an unarchived thread off Home.
Reviewed by Cursor Bugbot for commit 30b5502. Configure here.
Completes the pingdotgg#4055 port in the v2-base merge: draft routes carry a pre-allocated thread id, and the conditional subscription blocked promotion to live shell data until remount. Flagged by Grok review.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 47dc628. Configure here.
|
|
||
| Function("markShowcaseReady") { (scene: String) in | ||
| let readyPath = NSHomeDirectory() + "/Library/Caches/T3ShowcaseReadyScene" | ||
| try? scene.write(toFile: readyPath, atomically: true, encoding: .utf8) |
There was a problem hiding this comment.
Crash breadcrumb fsync path removed
Medium Severity
The writeSyncText function, which provided durable last-chance crash log writes, was removed from T3NativeControlsModule. This breaks the breadcrumbPersist mechanism, which still expects this native fsync path. As a result, last-minute breadcrumbs may be lost during iOS fatals, impacting crash diagnostics.
Reviewed by Cursor Bugbot for commit 47dc628. Configure here.
|
Closing for now; may reattempt later after the iOS fixes have landed on main, and have been backmerged to codex-turn-mapping. |
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration. Co-authored-by: codex <codex@users.noreply.github.com>


Summary
Array.prototype.toSortedwith a shared copy-sort helper.PreventRemoveProvider.archivedAtso archived threads do not stick on the Home list after a missed archive delta.Base
This branch is now built on
mwolson/t3codev2-base, a merge of the shared iOS/mobile fixes line (ios-fixes-main) intot3code/codex-turn-mapping. Because GitHub diffs againstt3code/codex-turn-mapping, the PR diff includes that merge (mobile keyboard/feed fixes, shell reconnect heal, serverConfig/vcsRefs caching, and the V2 thread resume completion marker) in addition to the two commits listed below. Review the two head commits for this PR's own delta.Problem and Fix
idand adataUrl. The start-turn path did not treat those dual-tagged attachments as uploads, so order and persistence broke for mobile screenshots.Array.prototype.toSorted. CTM queue UI calls it fromderiveThreadQueueWorkflowState/ThreadQueueControl, so queuing a reply or finishing a turn can crash withTypeError: undefined is not a function.@t3tools/shared/ArraycopySorted([...values].sort) and use it on mobile-reachable call sites (threadWorkflows,ThreadRelationshipsBanner,use-thread-selection, CTMmodel.ts).lineage.relationshipToParent === "subagent"when grouping Home rows; keep fork threads.setOptionsand could hit maximum update depth throughPreventRemoveProvideron CTM device launches.thread.archivedshell delta (or a mis-tagged full snapshot) could keep an archived thread listed as active on Home even after the reconnect heal applied a fresh snapshot.normalizeShellThreadMembershipand apply it to every full snapshot (reducer enrichment refreshes and reconnect heals) so active/archive membership always derives fromarchivedAt. The HTTP heal, forced socket snapshot, and stale-snapshot rejection it pairs with live inv2-base.Validation
Arraytests;shell-sync/shellReducermembership tests.vp check(0 errors) and fullvp run typecheckon the rebuilt branch.com.mwolson.t3code.v2.devfrom local orchestrator-v2 integration; queued reply send after active turn finished without crash; Home list usable after nav stability fix.Notes
v2-base: (1) attachments / Hermes / Home, (2) shell archive membership normalization.t3code/codex-turn-mappingonly. Main-line ios-on-main (fix(mobile): Harden iOS reconnect, crash capture, and chat layout on main #3910) does not haveThreadQueueControl/ this queue path.Note
Stabilize iOS draft attachments, Hermes array sort, and Home screen for mobile
This is a large orchestrator-v2 stabilization PR with dozens of changes across mobile, web, server, and desktop. Key highlights:
persistAttachmentsnow correctly maps upload results back to their source positions and strips client-only fields (id,previewUri) before sending to the server.Array.prototype.toSorted(unsupported on Hermes) with a sharedcopySortedutility throughout mobile thread sorting.DraftHeroHeadlineproject picker.ThreadFeednow auto-corrects scroll position when content underflows the viewport and shows a full-screen loading overlay during hydration.TerminalInputSequencenormalizes all return keys to carriage return (\r);autoFocusprop added to control keyboard focus.makeEnvironmentShellStateno longer paints cached snapshots immediately; starts insynchronizingand waits for an HTTP heal or authoritative socket snapshot.synchronizedmarker so warm-start clients exit the syncing state faster.TerminalCanvasView,GhosttyBridge) with JNI bindings, selection, scroll, and theme support.IncomingShareProviderandIncomingShareInboxserialize share ingestion, merge content into composer drafts idempotently, and clean up temporary files.LegalPagelayout component.server-config/vcs-refsdata (cold start for those caches).Macroscope summarized 47dc628.
Note
Medium Risk
Touches desktop launcher/signing behavior, auto-update state, and substantial mobile native/Expo configuration; misconfiguration could affect local iOS builds, store screenshots CI, or renderer chrome, but changes are mostly additive with tests on key desktop paths.
Overview
Adds a manual GitHub workflow to capture and validate iOS and Android store showcase screenshots (
pnpm screenshots:mobile), upload artifacts, and ignore generated.showcase//artifacts/app-store/screenshots/paths.Desktop changes improve the macOS dev launcher (branded bundle with a separate launcher executable that execs in-bundle
Electron, launcher version bump), context menu positioning scaled by webContents zoom, native fullscreen state exposed to the renderer via IPC/preload, nightly update release notes (setFullChangelog+ HTML/markdown normalization into update state), and WSL Node engine validation during probe.Marketing adds a shared legal document layout, index plus privacy/terms/security pages, footer links, and Grok CLI messaging/assets on the homepage (with minor harness/layout tweaks).
Mobile expands Expo config: repo-root brand assets, Personal Team local iOS builds (optional bundle id, stripped widgets/share/SiWA entitlements), more Android plugins (Gradle heap, predictive back, modern menus/alerts, crash log), DM Sans registered under native PostScript names, and a new Android
T3ComposerEditornative view (chips, paste images, theming). iOS markdown shadow node now rebuilds attributed content from current children instead of stale measure-time cache. Composer iOS fonts align toDMSans-Regular/DMSans-Medium.Also bumps electron-builder, adds minimal root
app.json, extends Macroscope Effect service conventions (dependency acquisition / runtime boundaries), and minor asset/doc updates.Reviewed by Cursor Bugbot for commit 47dc628. Bugbot is set up for automated code reviews on this repo. Configure here.