Skip to content

feat: parentUuid auto-relink on save + restore subcommand#2

Merged
dudegladiator merged 2 commits into
mainfrom
feat/restore-and-known-issues
Jun 9, 2026
Merged

feat: parentUuid auto-relink on save + restore subcommand#2
dudegladiator merged 2 commits into
mainfrom
feat/restore-and-known-issues

Conversation

@dudegladiator

Copy link
Copy Markdown
Owner

Fixes the failure mode where scattered deletes left surviving messages pointing to deleted ancestors, breaking Claude Code resume render.

  • Session::render_with_relink rewrites parentUuid on survivors to nearest surviving ancestor; foreign uuids preserved verbatim.
  • delete JSON now reports parent_uuid_relinked.
  • New cc-session restore <id> [--list] with pre-restore snapshot kept as <path>.pre-restore.<ts>.
  • 4 new unit tests.

Fixes the failure mode where scattered deletes left surviving messages
pointing to deleted ancestors, making Claude Code render the session as
empty on resume.

- Session::render_with_relink rewrites parentUuid for survivors whose
  ancestor was deleted, walking up to the nearest surviving ancestor (or
  null at the root). Foreign parent uuids are preserved verbatim.
- 'delete' output reports parent_uuid_relinked count.
- New 'cc-session restore <id> [--list]' rolls back from .bak with a
  pre-restore snapshot saved aside as <path>.pre-restore.<ts>.
- 4 new unit tests cover relink-skips-deleted, relink-to-root,
  no-change-byte-equal, and foreign-parent-preserved.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying cc-session-installer with  Cloudflare Pages  Cloudflare Pages

Latest commit: f0f90d8
Status: ✅  Deploy successful!
Preview URL: https://ca27e02e.cc-session-installer.pages.dev
Branch Preview URL: https://feat-restore-and-known-issue.cc-session-installer.pages.dev

View logs

@dudegladiator dudegladiator merged commit 9702bf5 into main Jun 9, 2026
5 checks passed
@dudegladiator dudegladiator deleted the feat/restore-and-known-issues branch June 9, 2026 12:20
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