Skip to content

fix: preserve saved Codex conversation titles on import - #6

Open
KKeygen wants to merge 1 commit into
Walvez:mainfrom
KKeygen:fix/import-codex-thread-titles
Open

KKeygen wants to merge 1 commit into
Walvez:mainfrom
KKeygen:fix/import-codex-thread-titles

Conversation

@KKeygen

@KKeygen KKeygen commented Oct 20, 2026

Copy link
Copy Markdown

The import picker usually labels Codex conversations with their first user message, or a raw thread ID, even when Codex has a saved title. The reader never populated header.title, and the importer never consulted the local title metadata.

Read the local title metadata once per catalog/import request, keyed by exact thread ID. The read-only SQLite name/title takes precedence over session_index.jsonl, followed by rollout metadata and the existing first-prompt/ID fallbacks. This also picks up subsequent Codex renames on the next catalog refresh. Preserve full saved titles while keeping the 80-character limit for prompt-derived labels.

The desktop Node runtime uses native SQLite; older Node can use the optional sqlite3 CLI. Unavailable/corrupt metadata retains the existing fallbacks. No Codex data is written, and re-import does not rename existing DSH sessions.

Validation:

  • npm test: 64 passed, 0 failed, 0 skipped.
  • Three new regression tests passed on both Node 20 (SQLite CLI) and the actual desktop host, Electron 44 / Node 24.18.1 (native SQLite).
  • Coverage includes title precedence, malformed index lines, subsequent renames, older DB schemas, unavailable/corrupt metadata, full Unicode titles, catalog/import agreement, and unchanged existing DSH titles.
  • git diff --check and npm pack --dry-run passed.

The separate compressed-rollout fix is PR #5; this title fix is independently based on main. Only synthetic title fixtures are included; no private title index or conversation data is committed.

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