Repository navigation
fix: preserve capture links in the timeline and markdown vault - #497
Merged
EyJunge1 merged 1 commit intoNov 6, 2026
Merged
Conversation
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andcaptureTimestampfields. 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
mainand contains no #495 deletion-safety changes. Its overlap with #496 is confined toreconcile.ts: a three-way application merged cleanly, and the combined regression suite passed. A rebase may be needed if #496 lands first.Test plan
each_key_duplicate):同一条记忆被两句提问同时关 #494 focused suite: 43 passed, 0 failed across 8 files.each_key_duplicate):同一条记忆被两句提问同时关 #494/fix(markdown): preserve index when vault inventory is unsafe #496 focused suite in a separate checkout: 63 passed, 0 failed across 9 files.Checklist
main.bun test --timeout 30000: 1,186 passed, 4 platform-specific skips, 0 failed across 158 files (Bun 1.3.14, Linux).bun run typecheckpasses (viabun run check).bun run checkpasses (formatting, lint and TypeScript).bun run buildpasses, with zero Svelte errors or warnings.