Skip to content

fix: keep global chat replies and card records when a save fails (INC-2180) - #713

Merged
arzafran merged 6 commits into
mainfrom
franco/inc-2180-ultra-save-and-provider-edges
Dec 4, 2026
Merged

arzafran merged 6 commits into
mainfrom
franco/inc-2180-ultra-save-and-provider-edges

Conversation

@arzafran

@arzafran arzafran commented Dec 4, 2026

Copy link
Copy Markdown
Member

What this does

Global chat no longer loses or misreports things when a save fails. A provider reply that could not be saved is kept and written with the next successful save. Choose and Ship cards record the activity first and only then type into the terminal, and the record is removed if typing fails. An owner can also confirm the current provider as their choice after a fallback, and older histories with an automatic Claude fallback no longer read as the owner's pick.

Summary

Covers the provider and save items of INC-2180. Start with Sources/GlobalChatController.swift; the rest is fallout.

  • Pending turns are held in storage health and merged into the next write. A turn's session and provider outcome is restored only if that turn still owns the session, so newer history is never overwritten.
  • GlobalChatCards.submit records, delivers, and retracts on failure. Controller seams make this testable.
  • The Mac host exposes providerChoice, a new optional wire field, so old phones and old Macs still decode each other.
  • The phone title menu uses plain buttons so the current provider can be confirmed.
  • Not in this PR: the iPhone output/workspace items, the autopilot guard question, and the Ship card draft or checkout mismatch case.

Test Plan

  • GlobalChatDispatchTests adds cases for unsaved replies, legacy provider history, fallback choice, card saves, and retry-only-while-owning-the-session. Run in CI.
  • Local: check-structural-budgets.py, check-settings-docs.py, check-v2-contract.sh pass.
  • Not run locally: the app build and unit tests (this worktree has no GhosttyKit and Zig is 0.16.0, 0.17.0 required), so CI is the first compile.

Checklist

  • I added or updated tests for behavior changes
  • Tested via CI

@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
programa-site Ready Ready Preview Dec 4, 2026 3:54pm UTC

@arzafran
arzafran merged commit e7627fb into main Dec 4, 2026
15 checks passed
@arzafran
arzafran deleted the franco/inc-2180-ultra-save-and-provider-edges branch December 4, 2026 16:17

This branch was successfully deployed

1 active deployment
Preview — 5d35943a Deployed Dec 4, 2026 by vercel[bot]
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