Skip to content

Feature/20260708 product m u 2 - #48

Merged
donfaquir merged 20 commits into
mainfrom
feature/20260708-product-m-u-2
Jul 14, 2026
Merged

Feature/20260708 product m u 2#48
donfaquir merged 20 commits into
mainfrom
feature/20260708-product-m-u-2

Conversation

@donfaquir

Copy link
Copy Markdown
Owner

摘要

变更类型

  • 缺陷修复
  • 新功能或行为变更
  • 文档或元数据(LICENSE、CI 等)
  • 重构或性能(无行为变化)
  • 其他:

检查清单

  • 本地已运行 npm run build(若改动前端)
  • 本地已运行 cd src-tauri && cargo test(若改动 Rust)
  • 不包含无权再许可的第三方素材或机密信息
  • 已阅读并遵守 CONTRIBUTING.mdCODE_OF_CONDUCT.md

备注

donfaquir and others added 20 commits July 9, 2026 14:43
Replace hardcoded [1,3,7,14,30] day intervals with the SM-2 spaced
repetition algorithm. EF and interval are now persisted per thought
and adjusted by answer quality (Passed/Sloppy/Failed).

- Add SrsState, ChallengeQuality, sm2_next() in thought_parser
- DB migration v2→v3: srs_easiness_factor, srs_interval_days columns
- Rewrite next_due_after_anchor() to use SM-2 interval with legacy fallback
- Sort review queue by EF ascending (harder first)
- Frontend: call write-back on all outcomes, pass sloppy flag
- 6 new SM-2 unit tests
Also fix settings modal to allow clearing API key.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Pure-backend latent paragraph marking with three strategies:
high-similarity pairs, semantic isolation, cross-doc recurrence.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
… queue

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
…ry export

- Add cognitive push scheduler (startup + 30min periodic) with tauri-plugin-notification
- Add configurable push frequency and quiet hours in Settings > Cognition
- Add ThoughtGrowthStoryCard component with journey timeline and Markdown export
- Add get_thought_growth_story Tauri command for reading thought history
- Register growth_story module and cognitive_push in lib.rs invoke_handler

Co-authored-by: Claude (big-pickle) <noreply@anthropic.com>
…hancements

Add AI-not-configured guide to writing coach and thought AI panel;
add image export, privacy checks and confirm dialog for growth story.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
…empty

Previously scan_vault only ran after rebuild_index with indexed_chunks > 0.
If the embedding index was already built, subsequent app launches never
triggered a scan, leaving the review queue permanently empty of latent
paragraph candidates.

Now open_workspace checks for the "has chunks but no candidates" condition
and fires a background scan to populate the candidates table.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Review panel:
- Fix React key collision for candidate items (candidateId || thoughtId)
- Add loading state text on "Start challenge" button while generating
- Add "Skip" button that dismisses current candidate and reloads queue
- Strip .md extension from candidate file display name
- Show marking reason (similar/isolated/cross-doc) below candidate label

Content filters (latent_paragraphs.rs):
- Add table filter: skip chunks where >50% lines contain pipe chars
- Add frontmatter filter: skip YAML metadata blocks (--- fenced)
- Add heading-only filter: skip chunks with only # heading lines
- Add 6 unit tests for the new filters

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
…code)

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
For cross_doc_recurrence candidates, store the other document paths in
the cluster (excluding self) so the UI can display which notes contain
similar concepts. For high_similarity candidates, the paired document
was already available.

Frontend shows a "Related notes:" section with document name tags
below the marking reason when viewing a candidate in the review panel.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Add a prefetch pipeline that generates questions in the background:
- On queue load, immediately start generating for items[0], chain to [1]
- startRound checks cache first — cache hit = instant question (0 wait)
- Cache miss falls back to on-demand generation (existing behavior)
- After answering or skipping, prefetch the next item in the queue
- Cache is cleared on queue reload (dismiss/promote) to stay fresh

Typical user experience after this change:
- First item: 0-5s wait (prefetch races with user reading the excerpt)
- Second item onward: 0 wait (question pre-generated while answering)

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Store in-flight prefetch Promises in a Map. When the user clicks
"Start Challenge" while a prefetch is still pending, await the
existing Promise instead of firing a duplicate LLM request.

Three-tier lookup in startRound:
1. Cache hit → instant (0 wait, 0 requests)
2. In-flight hit → await same Promise (reduced wait, 0 extra requests)
3. Miss → on-demand generation (full wait, 1 request)

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Users can now exit a challenge question without answering by clicking
"Give up" / "放弃本题", which resets to the pick phase.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Problem: candidates generated before new content filters (table,
frontmatter, heading-only) were added remain in the DB and still
show table-heavy content in the review queue.

Solution:
- Add FILTER_VERSION constant (bumped to 2) and latent_meta table
- On workspace open, check stored version vs current; if mismatched,
  clear non-dismissed candidates and re-scan with updated filters
- Strengthen table detection: any line with |---| triggers skip,
  or >30% pipe-containing lines (was 50%)

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
@donfaquir
donfaquir merged commit 2501862 into main Jul 14, 2026
2 checks passed
@donfaquir
donfaquir deleted the feature/20260708-product-m-u-2 branch July 14, 2026 07:49
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