Skip to content

fix: preserve capture links in the timeline and markdown vault - #497

Merged
EyJunge1 merged 1 commit into
tickernelz:mainfrom
Phototonic:fix/issue494-memory-grouping-metadata
Nov 6, 2026
Merged

EyJunge1 merged 1 commit into
tickernelz:mainfrom
Phototonic:fix/issue494-memory-grouping-metadata

Conversation

@Phototonic

Copy link
Copy Markdown
Contributor

Summary

Closes #494.

When capture updates leave several prompts pointing at one memory, the timeline can emit the memory twice and Svelte throws each_key_duplicate. Grouping now resolves explicit memory-to-prompt links first, then reverse links, using each unique item at most once. The current linked prompt takes priority; older prompts remain visible as standalone entries. One-sided links and page subsets remain supported.

Markdown add/update writes now serialize validated promptId, sessionID, and captureTimestamp fields. Reconciliation preserves surviving indexed metadata for legacy files, lets valid frontmatter capture fields override it, and retains the indexed session, pin state and user/project columns during replacement or shard moves. Capture updates also synchronize the indexed session column immediately.

Historical prompt backlinks remain supported. Blank or invalid capture fields do not explicitly clear surviving indexed values, and provenance already absent from both the file and index cannot be recovered. Existing scan/deletion policy and delete-before-insert behavior are unchanged.

This PR is independently based on main and contains no #495 deletion-safety changes. Its overlap with #496 is confined to reconcile.ts: a three-way application merged cleanly, and the combined regression suite passed. A rebase may be needed if #496 lands first.

Test plan

Checklist

  • Branch is based on current main.
  • bun test --timeout 30000: 1,186 passed, 4 platform-specific skips, 0 failed across 158 files (Bun 1.3.14, Linux).
  • bun run typecheck passes (via bun run check).
  • bun run check passes (formatting, lint and TypeScript).
  • bun run build passes, with zero Svelte errors or warnings.
  • Docs / README updated.

@EyJunge1
EyJunge1 merged commit 6aea3d8 into tickernelz:main Nov 6, 2026
9 checks passed
@EyJunge1 EyJunge1 mentioned this pull request Nov 6, 2026
3 tasks done
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.

网页 "Project Memories" 页面卡在 "Initializing…"(Svelte each_key_duplicate):同一条记忆被两句提问同时关

2 participants