mirror of
https://github.com/panatgithub/AnkiHeadingSync.git
synced 2026-07-22 06:51:43 +00:00
中文: 修复 pendingWriteBack 持久化加载,丢弃旧 Semantic QA 状态,并修正发布链接与多级列表问答文案。 English: Preserves pendingWriteBack state loading, drops old Semantic QA state, and fixes release links and QA Group wording.
3.6 KiB
3.6 KiB
Pre-release Remaining Fixes Gap Report
Scope
This report records the real repository state on 2026-04-27 before implementing the remaining pre-release fixes.
Pending writeback load behavior
- Runtime state shape already defines modern
PendingWriteBackStateinsrc/domain/manual-sync/entities/PluginState.tswith:filePathblockStartLineexpectedFileHashtargetMarkerrawBlockHashtargetNoteId- optional
markerKind - optional
targetGroupId
src/application/services/MarkdownWriteBackService.tsalready emits modern pending entries for both:- card ID marker writes with
markerKind: "card-id" - group GI writes with
markerKind: "group-gi"andtargetGroupId
- card ID marker writes with
src/infrastructure/persistence/DataJsonPluginStateRepository.tscurrently drops all persisted pending entries on load by returningpendingWriteBack: []frommigratePluginState().- Result:
- writeback conflicts are persisted during a session
- after Obsidian restart, the recovery queue is lost
Malformed and legacy pending handling
DataJsonPluginStateRepository.tsdeclaresLegacyPendingWriteBackState, but current load migration does not validate or preserve any pending items.- Current repository behavior therefore treats all pending shapes the same way:
- valid modern items are dropped
- malformed items are dropped
- legacy
cardId/noteIdonly items are dropped
- There is currently no explicit validation contract for pending items during load.
Old Semantic QA state behavior
DataJsonPluginStateRepository.tsstill migrates every loaded card throughmigrateCardState().sanitizeCardType()currently keeps"cloze"and converts every other value to"basic".- Result:
- removed
semantic-qacards are silently converted tobasic - converted cards remain in
state.cards - converted cards still contribute note IDs to
files[*].noteIdsthroughcollectMigratedFileNoteIds()
- removed
- Current test coverage in
src/infrastructure/persistence/DataJsonPluginStateRepository.test.tsexplicitly asserts this silent conversion.
Release link status
manifest.jsoncurrently has:author: "Dusk"authorUrl: "https://github.com/panAtGitHub"
- Required repository link is not yet applied.
README wording status
README.mdstill says:Sync QA Group list blocks into managed group notes
- This is stale product language relative to the current user-facing route.
i18n legacy wording status
- Active user-facing wording in
src/presentation/i18n/messages/en.tsandsrc/presentation/i18n/messages/zh.tsstill includes:QA Group 12ObsiAnki QA Group 12Managed note typeManaged model contract托管笔记类型托管模型约束
- These messages are still part of the live settings UI.
- Current active text suggests a fixed managed-model narrative that does not match the intended release wording.
Build and sync script status
scripts/stage-plugin-dist.mjsstages:manifest.jsonversions.json- optional
styles.css - generated package
README.md
scripts/sync-plugin-dist.mjscopies fromdist/plugin:main.jsmanifest.json- optional
styles.css
- The generic sync script does not delete
data.json, but repository instructions still require strict file selection during final vault sync.
Exact files likely to change
src/infrastructure/persistence/DataJsonPluginStateRepository.tssrc/infrastructure/persistence/DataJsonPluginStateRepository.test.tsmanifest.jsonREADME.mdsrc/presentation/i18n/messages/en.tssrc/presentation/i18n/messages/zh.ts