Skip to content

[codex] Fix conversation history restore decoding#33

Closed
jskoiz wants to merge 1 commit into
mainfrom
codex/fix-conversation-history-restore
Closed

[codex] Fix conversation history restore decoding#33
jskoiz wants to merge 1 commit into
mainfrom
codex/fix-conversation-history-restore

Conversation

@jskoiz

@jskoiz jskoiz commented Apr 15, 2026

Copy link
Copy Markdown
Owner

What changed

  • fixed ConversationStore's async history index loader to decode ISO-8601 dates before reading persisted metadata
  • fixed ConversationSnapshotLoader to use the same ISO-8601 date decoding when restoring saved conversations

Why

Persisted conversation files and the history index are written with ISO-8601 timestamps. The async restore path was using a plain JSONDecoder, so restores could fail after the app had already saved valid history.

User impact

  • saved chats restore correctly after relaunch or reinstall
  • the app stops falling back to fresh empty conversations when existing history is present
  • chat history and archive counts stay aligned with the actual saved threads instead of drifting from failed restores

Root cause

ConversationStore encoded dates as ISO-8601 but two async decode paths did not set dateDecodingStrategy = .iso8601. That mismatch broke history restoration and pushed the app into creating replacement empty threads.

Validation

  • built the PR branch for iOS Simulator with scheme Yemma4
  • manually reproduced the history flow in the simulator before the fix and confirmed the clean branch compiles with the restore patch applied

@vercel

vercel Bot commented Apr 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
yemma-4 Ready Ready Preview, Comment Apr 15, 2026 11:58pm

@jskoiz

jskoiz commented May 6, 2026

Copy link
Copy Markdown
Owner Author

@codex review please run a code review on the latest PR head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jskoiz

jskoiz commented May 7, 2026

Copy link
Copy Markdown
Owner Author

Codex review pass: I did not find a blocking issue in this pass. Caveat: I did not run local tests; this is the narrow ISO-8601 restore fix, but PR checks only show GitGuardian/Vercel-style checks, not an iOS build/test lane.

@jskoiz

jskoiz commented May 7, 2026

Copy link
Copy Markdown
Owner Author

Closing during open-PR cleanup: superseded by #36, which carries the async restore decoding fix with targeted tests. No code was merged from this branch.

@jskoiz jskoiz closed this May 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