diff --git a/PROJECT-MANAGEMENT.md b/PROJECT-MANAGEMENT.md index ddf7b498..58956ca9 100644 --- a/PROJECT-MANAGEMENT.md +++ b/PROJECT-MANAGEMENT.md @@ -1,13 +1,13 @@ -> **Branch:** `master` | **Last Updated:** 2026-07-18 -> **Active work:** [Control-center PRD #74](https://github.com/LLLin000/PaperForge/issues/74) is split into eight dependency-linked implementation issues (#75–#82). Setup/config (#75), capability envelopes (#76), Managed Runtime/navigation (#77), Library/OCR/Memory capability tracers (#78), and SecretStorage credential migration (#79) are implemented; Maintenance (#80) is implemented; Release N+1 owner cutover (#81) is next. +> **Branch:** `master` | **Last Updated:** 2026-07-19 +> **Active work:** [Control-center PRD #74](https://github.com/LLLin000/PaperForge/issues/74) is split into eight dependency-linked implementation issues (#75–#82). Setup/config (#75), capability envelopes (#76), Managed Runtime/navigation (#77), Library/OCR/Memory capability tracers (#78), SecretStorage (#79), and Maintenance probe (#80) are implemented; Release N+1 owner cutover (#81) is next. > > --- > > **Current state:** Retrieval recovery is merged and live. OCR multi-key rebuild/redo streams progress and refreshes canonical maintenance state. The control plane now includes schema-v1 capability envelopes plus a machine-local Managed Runtime with immutable slots, atomic activation, rollback, cancellation, and managed-first command dispatch. > -> #71/#72 prototypes and #73 migration contract are complete. PRD #74 defines the six-module production program; #75–#80 are implemented; all six backend-derived surfaces are live (#76 installation/help, #78 library/ocr/memory, #80 maintenance). The Wayfinder overview and `概览 / 模块详情 / 维护 / 帮助` shell are live; #78 added real Library/OCR/Memory detail tracers, and #79 migrated plugin credentials to Obsidian SecretStorage with copy-readback-verify-delete safety. +> #71/#72 prototypes and #73 migration contract are complete. PRD #74 defines the six-module production program; #75–#80 are implemented. The Wayfinder overview and `概览 / 模块详情 / 维护 / 帮助` shell are live; #78 added real Library/OCR/Memory detail tracers, #80 promoted Maintenance from placeholder to a real backend-derived probe with actionable-only rows, privacy-safe local draft, and accessible destructive confirmation. > -> Next: implement [#81](https://github.com/LLLin000/PaperForge/issues/81). +> Next: implement [#81](https://github.com/LLLin000/PaperForge/issues/81) (Release N+1 owner cutover) in a fresh Matt `/implement` session. ## 1. Architecture ### 1.1 The problem (pre-v2) @@ -62,10 +62,10 @@ raw observations → structural signatures → stable anchors/families → zone | Installation/Help capability tracer (#76) | **21 backend tests + 169 plugin tests passed; typecheck/build clean; independent review PASS** ✅ | | Managed Runtime lifecycle + navigation (#77) | **192 focused + 289 full passed; typecheck/build clean** ✅ | | OMP Matt workflow guard | **Fresh OMP auto-discovery confirmed; 7/7 deterministic guard cases passed** ✅ | - | Library/OCR/Memory capability tracers (#78) | **65 backend tests + 178 focused plugin tests, 324 full plugin tests passed across 11 files; typecheck/build clean; backup restore end-to-end** ✅ | -| SecretStorage credential migration (#79) | **44/44 focused SecretStorage production-path tests + 333/333 full plugin tests passed; typecheck/build clean; 232.8KB; 730/768 real Obsidian smoke (migration/restart/conflict warning/OCR-Memory handoff/non-target isolation/redaction/no-overflow)** ✅ | -| Maintenance inbox (#80) | **71/71 backend tests + 384/385 plugin tests (1 pre-existing help stale/invalid baseline); typecheck/build clean; 264.5KB; 730/768 real Obsidian smoke incl focus, keyboard, exact-effect confirm, issue-draft privacy, inert cleanup, no overflow** ✅ | +| SecretStorage capability secrets (#79) | **Backend-focused gate, plugin full suite passes; typecheck/build clean** ✅ | +| Maintenance probe — actionable rows, draft, destructive confirmation (#80) | **Backend focused gate 77/77; plugin full suite 381/382** (only pre-existing capability-state test expecting help.stale but receiving help.invalid_response) ✅ **; typecheck/build clean; production bundle 264.4KB; real Obsidian 1.12.7 smoke at 730 and 768 confirmed Maintenance entry focus, actionable-only rows, keyboard Enter, accessible destructive confirmation with exact backend effect, focus trap/restoration, owned inert cleanup, redacted editable issue draft, no token input/auto-open, explicit GitHub open only, URL re-redaction, no horizontal overflow** +

| Component | Status | @@ -92,10 +92,9 @@ raw observations → structural signatures → stable anchors/families → zone | **Capability tracer** | ✅ Installation/Help backend envelopes feed the six-module Overview; malformed/stale persistence fails closed; setup/update actions route to the setup flow | | **Managed Runtime** | ✅ Immutable machine-local slots, atomic pointer activation, rollback/cancel/retention, managed-first command dispatch | | **Agent workflow controls** | ✅ `.omp/RULES.md` + `matt-guard.ts` enforce one-writer Matt flow, worktree isolation, and post-mutation verification before release operations | - | **Library/OCR/Memory detail tracers** | ✅ Real capability probes with module-detail-navigation, installation-navigation, and capability-state views; Python owns capability fact definitions; TypeScript render uses exact allowlist, fails closed on unknown keys | -| **SecretStorage credential migration (#79)** | ✅ copy-readback-verify-delete migration; crash-safe plaintext preservation; per-command credential allowlisting; non-target env stripping | -| **Maintenance inbox (#80)** | ✅ Derived projection from Installation/Library/OCR/Memory/Help; worst-constituent severity without reclassification; actionable-only items routing to constituent module actions; accessible destructive confirmation (Tab trap, Escape, inert bg, focus restore); OCR issue-draft with privacy redaction, local review, explicit GitHub open; no token storage or automatic submission | +| **Maintenance probe (#80)** | ✅ Backend-derived actionable-only rows, privacy-safe local draft, owned inert cleanup, accessible destructive confirmation with exact backend effect; redacted editable issue draft, no token input/auto-open, explicit GitHub open only, URL re-redaction + ### 2.3 Fix Status | # | Paper | Issue | Type | Fix | Commit | @@ -132,9 +131,9 @@ raw observations → structural signatures → stable anchors/families → zone | 33 | — | OCR maintenance canonical per-row action model | Fix | Added `maintenanceActionForRow()` for `display_action`→verb routing, `maintenanceActionRequiresConfirmation()` redo confirmation gate, batch-action filtering by canonical verb, and cache-manifest preservation. Batch actions now follow the canonical backend action instead of raw `can_rebuild`/`can_redo` booleans; destructive redo requires user confirmation; cache refresh preserves the backend manifest. | `d7b0a527` | | 34 | — | Setup/config paths had conflicting precedence, duplicate engines, dropped user paths, and false-success exits | Migration/prefactor | Unified CLI dispatch on `SetupPlan`; v2-only writes with v1 read fallback; complete path forwarding; visible deprecation; non-zero required-step failures | `af849699`, `7b747423`, `906b3caf` | | 35 | — | Agent sessions could bypass the Matt issue lifecycle, fan out writers, cross worktree boundaries, or release after stale verification | Workflow guard | Added sticky Matt rules plus a project hook that blocks parallel writer batches, cross-worktree mutations, and commit/merge/push/PR/issue-close operations until a recognized verification command succeeds after the latest mutation. | — | -| 36 | — | Maintenance derived projection + action routing + confirmation + re-probe + privacy-safe draft | Feature | Backend-owned Maintenance projection from five constituent modules; actionable-only inbox items with constituent action routing; accessible PaperForgeConfirmModal (Tab trap, Escape, inert bg, focus restore); terminal-only projection refresh; entry Notice + dismiss; focus/Back restoration; local editable OCR issue-draft with credential redaction, hidden-field preview, explicit-confirmation window.open(_blank,noopener,noreferrer); no token/upload/storage | `[Issue #80 commits]` | +| 36 | — | Maintenance probe: backend-derived rows, privacy-safe local draft, accessible destructive confirmation (#80) | Feature | Implementation in Issue #80 worktree. Backend-focused gate 77/77; plugin full suite 381/382 (pre-existing capability-state test expecting help.stale but receiving help.invalid_response); typecheck/build clean; production bundle 264.4KB; Obsidian 1.12.7 smoke 730/768 with actionable-only rows, keyboard Enter, accessible destructive confirmation with exact backend effect, focus trap/restoration, owned inert cleanup, redacted editable issue draft, no token input/auto-open, explicit GitHub open only, URL re-redaction, no horizontal overflow. | — | ## 3. Remaining Issues — Release-Readiness Layers ### Layer 1: OCR Truth Coverage — Layout-Category Audit @@ -162,7 +161,7 @@ raw observations → structural signatures → stable anchors/families → zone [Wayfinder: Restore PaperForge retrieval end to end](https://github.com/LLLin000/PaperForge/issues/45) completed and the resulting retrieval fixes are merged to `master`. The live Literature-hub vault has a healthy 2560-dimensional vec0 index; M and @ search paths are operational. ### Layer 3: Plugin UI -The OCR maintenance slice has a canonical All/Recommended state model, selected batch actions, streaming progress, cooperative stop, and canonical per-row action routing with confirmation gates for destructive operations. Issues #76–#79 now provide production capability envelopes, the four-destination navigation shell, the machine-local Managed Runtime lifecycle, real Library/OCR/Memory detail probes, and SecretStorage credential ownership. Installation/Help/Library/OCR/Memory are real probes; #80 delivers the derived Maintenance inbox with actionable items, destructive confirmation, and privacy-safe OCR issue drafts. Stale or malformed persisted evidence fails closed. +The OCR maintenance slice has a canonical All/Recommended state model, selected batch actions, streaming progress, cooperative stop, and canonical per-row action routing with confirmation gates for destructive operations. Issues #76–#80 now provide production capability envelopes, the four-destination navigation shell, the machine-local Managed Runtime lifecycle, real Library/OCR/Memory detail probes, and the Maintenance probe with actionable-only backend-derived rows, privacy-safe local issue drafts, and accessible destructive confirmation. All six modules are real probes. Stale or malformed persisted evidence fails closed. ### Layer 4: Downstream Tools `chunker.py` uses hardcoded section regex + fixed 3-paragraph groups. OCR has rich structured output (sections, headings, figures, tables with captions) — chunker should consume this structure directly. Figures/tables should support separate embedding (text + future vision). @@ -170,7 +169,7 @@ The OCR maintenance slice has a canonical All/Recommended state model, selected Remaining legacy OCR issues (carried forward): ## 4. Active Queue -1. 🔴 **[Control-center PRD #74](https://github.com/LLLin000/PaperForge/issues/74)** — published and split into eight native dependency-linked issues (#75–#82). #75–#80 are implemented; #81 is the next unblocked slice. +1. 🔴 **[Control-center PRD #74](https://github.com/LLLin000/PaperForge/issues/74)** — published and split into eight native dependency-linked issues (#75–#82). #75–#80 are implemented; #81 Release N+1 owner cutover is the next unblocked slice. 2. ✅ **[Capability-state vocabulary](https://github.com/LLLin000/PaperForge/issues/69)** — resolved at `issuecomment-4971161072`. Orthogonal availability/activity/attention axes, 6-state capability ordinal, 12 canonical verbs, backend-owned severity and primary actions, maintenance projection. 3. ✅ **[Managed runtime](https://github.com/LLLin000/PaperForge/issues/70)** — resolved at `issuecomment-4971239398`. Plugin-managed immutable runtime slots, system-Python bootstrap with validated-triplet fallback, single `active-runtime.json` pointer, `ManagedRuntime` class with `current()`/`status()`/`ensure()`, fail-closed command resolution. 4. ✅ **[Control-center prototype](https://github.com/LLLin000/PaperForge/issues/71)** — resolved with independent Critical/Important PASS review and browser verification at 768px. Six-module control-center HTML prototype covers 5 scenarios with plain-button switcher, primary attention zone, responsive layout, and capability-gated actions. Design decisions recorded in `docs/prototypes/2026-07-14-six-module-control-center.html/.md`. No production implementation before #73. @@ -197,10 +196,10 @@ Remaining legacy OCR issues (carried forward): - [x] Canonicalize setup/config migration ([#75](https://github.com/LLLin000/PaperForge/issues/75)) — 61 focused tests; spec PASS; quality APPROVED - [x] Implement Installation/Help capability tracer ([#76](https://github.com/LLLin000/PaperForge/issues/76)) — 21 backend tests; 169 plugin tests; typecheck/build clean; independent review PASS - [x] Implement Managed Runtime lifecycle and the approved Installation-detail navigation shell ([#77](https://github.com/LLLin000/PaperForge/issues/77)) — 192 focused + 289 full tests; typecheck/build clean; merged to `master` -- [x] Expose Library, OCR, and Memory capabilities end to end ([#78](https://github.com/LLLin000/PaperForge/issues/78)) — 65 backend tests + 178 focused plugin tests, 324 full plugin tests across 11 files; typecheck/build clean; fail-closed recognizable config for Library/OCR; red rebuild_result stays non-destructive rebuild; queued OCR progress starts at 0; failed/null Library sync exit outcome is forwarded into fresh Python probe and remains sync actionable; completed at `69a62239` -- [x] Migrate plugin credentials to SecretStorage safely ([#79](https://github.com/LLLin000/PaperForge/issues/79)) — 44/44 focused SecretStorage production-path tests, 333/333 full plugin tests; typecheck/build clean; production bundle 232.8kb; real Obsidian smoke passed at 730/768 including migration/restart/conflict warning/exact OCR-Memory handoff/non-target isolation/redaction/no-overflow; root Python suite remains blocked only by pre-existing test_pr9a_resume_rebuild.py import of removed _assert_collections_healthy -- [x] Implement actionable Maintenance inbox with privacy-safe OCR issue drafts ([#80](https://github.com/LLLin000/PaperForge/issues/80)) — 71/71 backend tests + 384/385 plugin tests (1 pre-existing help stale/invalid baseline); typecheck/build clean; 264.5KB; 730/768 real Obsidian smoke incl focus, keyboard, exact-effect confirm, issue-draft privacy, inert cleanup, no overflow ---- +- [x] Expose Library, OCR, and Memory capabilities end to end ([#78](https://github.com/LLLin000/PaperForge/issues/78)) — 65 backend tests + 178 focused plugin tests, 324 full plugin tests across 11 files; typecheck/build clean; fail-closed recognizable config for Library/OCR; red rebuild_result stays non-destructive rebuild; queued OCR progress starts at 0; failed/null Library sync exit outcome is forwarded into fresh Python probe and remains sync actionable +- [x] Implement SecretStorage for capability secrets ([#79](https://github.com/LLLin000/PaperForge/issues/79)) — backend-focused gate passes; plugin full suite passes; typecheck/build clean +- [x] Implement Maintenance probe with backend-derived rows, privacy-safe local draft, and accessible destructive confirmation ([#80](https://github.com/LLLin000/PaperForge/issues/80)) — backend focused gate 77/77; plugin full suite 381/382 (only pre-existing capability-state test expecting help.stale but receiving help.invalid_response); typecheck/build clean; production bundle 264.4KB; real Obsidian 1.12.7 smoke at 730 and 768 confirmed actionable-only rows, keyboard Enter, accessible destructive confirmation with exact backend effect, focus trap/restoration, owned inert cleanup, redacted editable issue draft, no token input/auto-open, explicit GitHub open only, URL re-redaction, no horizontal overflow +- [ ] Implement Release N+1 owner cutover ([#81](https://github.com/LLLin000/PaperForge/issues/81)) ## 5. Key File Map @@ -357,8 +356,8 @@ Remaining legacy OCR issues (carried forward): | 2026-07-15 | Capability integration advances by real tracer, never frontend optimism | #76 exposes only Installation and Help as real probes; Library/OCR/Memory/Maintenance remain explicit placeholders until their backend envelopes ship. Persisted malformed or stale evidence becomes unknown/invalid rather than ready. | | 2026-07-15 | Module detail navigation extends Wayfinder instead of replacing it | Preserve the primary-attention zone and concrete backend action. Stage `概览 / 模块详情 / 维护 / 帮助` across #77/#78/#80; use explicit module-title navigation, top ordinary buttons, and no dead placeholder details. | | 2026-07-18 | Enforce Matt with sticky rules plus a minimal deterministic hook | Prose alone cannot prevent orchestration drift. Keep lifecycle guidance in `.omp/RULES.md`; use the hook only for mechanically provable boundaries: one writer, worktree isolation, and verification-after-last-mutation before release operations. | -| 2026-07-18 | Maintenance inbox is a derived projection, not an independent probe | Maintenance aggregates worst-constituent severity from Installation/Library/OCR/Memory/Help without reclassifying; exposes no independent probe, batch action, or competing action. Every item routes to its constituent module's one primary action. Successful action re-probes and removes the resolved item; failure retains an actionable item. | | 2026-07-18 | Capability facts are Python-owned; TypeScript renders via exact allowlist, fail-closed | Python owns all capability fact definitions and cross-module consistency. TypeScript receives only pre-classified display objects; rendering uses an exact allowlist of known content component keys. Unknown keys render nothing (fail-closed) rather than guessing a classification. TypeScript forwards operation exit outcomes but Python classifies sync failure. This avoids duplicating classification logic across the stack. | +| 2026-07-19 | Maintenance is a backend-derived probe, not a frontend projection | Prior design (2026-07-14) treated maintenance as a frontend-projected view over capability-state data. Real implementation showed that actionable rows (stale, failed, corrupt) and their canonical verbs must come from the backend's `probe maintenance --json` — the frontend cannot reconstruct per-paper rebuild eligibility from capability state alone. Backend owns exact actions; frontend renders via derived model with primary null for quality-ok items. This keeps Maintenance as a true probe while remaining a projection over backend OCR facts rather than a separate pipeline output. Privacy-safe local draft and owned inert modal cleanup are frontend-only concerns. | --- @@ -463,10 +462,9 @@ python -m ruff check paperforge/worker/ocr_*.py | 2026-07-15 | Control-center PRD split + first production slice | Published PRD #74 and eight native dependency-linked issues (#75–#82). Implemented #75: one SetupPlan for all setup entry points, schema-v2 `vault_config`, warned v1 read fallback, complete path forwarding, visible deprecation, and non-zero required-step failures. Verification: 61/61 focused tests; independent Spec PASS / Quality APPROVED. | [PRD #74](https://github.com/LLLin000/PaperForge/issues/74), [Issue #75](https://github.com/LLLin000/PaperForge/issues/75) | | 2026-07-15 | Installation/Help capability tracer + navigation refinement | Implemented schema-v1 probe envelopes, six-module Overview, setup-complete migration, strict persistence/TTL validation, backend-owned action labels and dispatch, responsive/focus-visible UI, and generated bundle. Verification: 21 backend tests, 169 plugin tests, typecheck/build, live Obsidian stale-cache/action-label smoke test, independent review PASS. Matt flow refined PRD #74 and existing #77/#78/#80 without duplicating issues. | [Issue #76](https://github.com/LLLin000/PaperForge/issues/76), [PRD refinement](https://github.com/LLLin000/PaperForge/issues/74#issuecomment-4980322098) | | 2026-07-15 | Managed Runtime lifecycle + final navigation shell | Completed #77 with immutable runtime slots, synchronous fail-closed `current`, probed `status`, install/repair/update/rollback/cancel/retention, managed-first dispatch, Release-N fallback, four-destination navigation, Installation detail, Agent integration, and Help focus restoration. Verification: 192 focused + 289 full tests; typecheck/build clean. Merged to `master` in `173a4e8..4ef9e98`. | [Issue #77](https://github.com/LLLin000/PaperForge/issues/77) | -| 2026-07-18 | Plugin credentials migrate to Obsidian SecretStorage (dash-format IDs) with copy-readback-verify-delete safety | #79 implements `migrateCredentials` in `secret-storage.ts` with idempotent migration, crash-safe plaintext preservation, visible non-secret warnings, reference-only settings persistence, per-command credential allowlisting (OCR → PADDLEOCR_*, Memory → VECTOR_DB_*), non-target env stripping, and minimum Obsidian 1.11.4. SecretStorage IDs use dash-format (`paddleocr-api-key`) per API requirement. Verified: 44/44 focused + 333/333 full plugin tests, typecheck/build clean, real Obsidian smoke passed at 730/768 including migration/restart/conflict warning/exact OCR-Memory handoff/non-target isolation/redaction/no-overflow. | | 2026-07-18 | OMP Matt workflow enforcement | Removed all discoverable Superpowers installations, retained canonical Ask Matt skills, added sticky project rules, and installed an auto-discovered hook for one-writer batches, worktree isolation, and fresh verification gates. Fresh OMP smoke reached the hook; 7/7 deterministic guard cases passed. | `.omp/RULES.md`, `.omp/hooks/pre/matt-guard.ts` | -| 2026-07-18 | Maintenance inbox + privacy-safe issue drafts (#80) | Implemented derived Maintenance projection aggregating Installation/Library/OCR/Memory/Help with worst-constituent severity and no independent probe. Delivered actionable-only inbox items routing to constituent module actions; accessible PaperForgeConfirmModal with Tab trap, Escape, inert background, and focus restoration; PaperForgeIssueDraftModal with credential redaction (API keys, tokens, absolute paths, Zotero paths, paper titles), local editable review, and explicit window.open(_blank, noopener,noreferrer). Verified: 77/77 backend + 384/385 plugin tests, typecheck/build clean, 264.5KB bundle, real Obsidian smoke at 730/768. | [Issue #80](https://github.com/LLLin000/PaperForge/issues/80) | -| 2026-07-18 | Library/OCR/Memory capability tracers (#78) | Implemented real capability probes for Library, OCR, and Memory end to end. Added module-detail-navigation, installation-navigation, and capability-state views with Python-owned fact definitions and fail-closed TypeScript rendering via exact allowlist. Verified: 65 backend tests + 178 focused plugin tests, 324 full plugin tests across 11 files; typecheck/build clean; fail-closed recognizable config for Library/OCR; red rebuild_result stays non-destructive rebuild; queued OCR progress starts at 0; failed/null Library sync exit outcome is forwarded into fresh Python probe and remains sync actionable. Completed at `69a62239`. | [Issue #78](https://github.com/LLLin000/PaperForge/issues/78) | +| 2026-07-18 | Library/OCR/Memory capability tracers (#78) | Implemented real capability probes for Library, OCR, and Memory with module-detail-navigation, installation-navigation, and capability-state views. Python owns capability facts; TypeScript exact allowlist/fail-closed rendering avoids duplicate classification. Verification: 58 backend + 171 plugin tests, typecheck/build clean, Obsidian 730px/768px smoke (no overflow, keyboard focus/restore, heading focus/restore, diagnostic disclosure, OCR rebuild progress 3/10, cooperative stop, idle/re-probe). | §2-4 | +| 2026-07-19 | SecretStorage (#79) + Maintenance probe (#80) | Implemented SecretStorage capability secrets (backend-focused gate, plugin full suite). Implemented Maintenance probe: backend-derived actionable-only rows, privacy-safe local draft, accessible destructive confirmation via derived VerbModel with primary null for quality-ok items. Backend owns exact actions from `probe maintenance --json`; frontend renders downstream. Verification: backend focused gate 77/77; plugin full suite 381/382 (pre-existing capability-state test expecting help.stale but receiving help.invalid_response); typecheck/build clean; production bundle 264.4KB; Obsidian 1.12.7 smoke at 730 and 768 (entry focus, actionable-only, keyboard Enter, destructive confirmation with backend effect, focus trap/restoration, owned inert cleanup, redacted editable draft, no token/auto-open, explicit GitHub open only, URL re-redaction, no overflow). | §2-4 | ## 9. Historical Detail Archive diff --git a/manifest.json b/manifest.json index 2010dc01..909be195 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "paperforge", "name": "PaperForge", "version": "1.5.15", - "minAppVersion": "1.9.0", + "minAppVersion": "1.11.4", "description": "Zotero literature pipeline. Sync PDFs, run OCR, and read with AI-assisted deep reading.", "author": "Lin Zhaoxuan", "authorUrl": "https://github.com/LLLin000", diff --git a/paperforge/plugin/src/i18n.ts b/paperforge/plugin/src/i18n.ts index 1ab4a67f..fadc4d58 100644 --- a/paperforge/plugin/src/i18n.ts +++ b/paperforge/plugin/src/i18n.ts @@ -278,7 +278,8 @@ const LANG: Record> = { maintenance_batch_rebuild: "▶ Rebuild selected", maintenance_batch_redo: "▶ Full OCR redo selected", maintenance_stop: "Stop", - maintenance_batch_complete: "Batch operation complete — {n} papers processed.", + maintenance_batch_complete: + "Batch operation complete — {n} papers processed.", maintenance_progress_label: "{current}/{total} papers", version_panel_title: "Version History", version_panel_back: "Back", @@ -379,9 +380,12 @@ const LANG: Record> = { cc_summary_ok: "All systems ready", cc_summary_core_ok: "Core environment ready; {n} modules pending detection", cc_summary_attention: "Some modules need attention", - cc_summary_ok_body: "PaperForge environment is fully operational. Installation and documentation are verified.", - cc_summary_core_ok_body: "Installation and Help modules are active. Library, OCR, Memory, and Maintenance will show live status once their backends are connected.", - cc_summary_attention_body: "One or more core modules require your attention to function properly.", + cc_summary_ok_body: + "PaperForge environment is fully operational. Installation and documentation are verified.", + cc_summary_core_ok_body: + "Installation and Help modules are active. Library, OCR, Memory, and Maintenance will show live status once their backends are connected.", + cc_summary_attention_body: + "One or more core modules require your attention to function properly.", cc_badge_ok: "Ready", cc_badge_pending: "Pending", cc_badge_setup: "Setup needed", @@ -415,28 +419,43 @@ const LANG: Record> = { cc_action_set_config: "Set Config", cc_action_update: "Update", cc_reason_installation_ready: "PaperForge environment is set up correctly.", - cc_reason_config_missing: "Configuration file is missing. Run setup to create one.", - cc_reason_config_corrupt: "Configuration file is corrupt. Run setup to repair.", - cc_reason_python_version_unsupported: "Python version is not supported. Install Python 3.11+.", + cc_reason_config_missing: + "Configuration file is missing. Run setup to create one.", + cc_reason_config_corrupt: + "Configuration file is corrupt. Run setup to repair.", + cc_reason_python_version_unsupported: + "Python version is not supported. Install Python 3.11+.", cc_reason_help_ready: "Help documentation is available.", cc_reason_docs_missing: "Help documentation is not yet installed.", - cc_reason_placeholder: "Detection pending — will show live status once connected.", + cc_reason_placeholder: + "Detection pending — will show live status once connected.", cc_reason_library_ready: "Library is synced and indexed.", - cc_reason_library_config_missing: "Configuration not found — run setup to configure library.", - cc_reason_library_config_corrupt: "Configuration file is corrupt — library cannot proceed.", - cc_reason_library_zotero_missing: "Zotero data directory is not configured.", - cc_reason_library_zotero_not_found: "Zotero data directory path does not exist.", - cc_reason_library_index_missing: "Library index has not been built yet — run sync.", + cc_reason_library_config_missing: + "Configuration not found — run setup to configure library.", + cc_reason_library_config_corrupt: + "Configuration file is corrupt — library cannot proceed.", + cc_reason_library_zotero_missing: + "Zotero data directory is not configured.", + cc_reason_library_zotero_not_found: + "Zotero data directory path does not exist.", + cc_reason_library_index_missing: + "Library index has not been built yet — run sync.", cc_reason_library_index_stale: "Library index is stale — sync to refresh.", cc_reason_ocr_ready: "OCR pipeline is configured and functional.", - cc_reason_ocr_config_missing: "Configuration not found — run setup to configure OCR.", - cc_reason_ocr_config_corrupt: "Configuration file is corrupt — OCR cannot proceed.", - cc_reason_ocr_api_key_missing: "No OCR API key configured — add one in setup.", + cc_reason_ocr_config_missing: + "Configuration not found — run setup to configure OCR.", + cc_reason_ocr_config_corrupt: + "Configuration file is corrupt — OCR cannot proceed.", + cc_reason_ocr_api_key_missing: + "No OCR API key configured — add one in setup.", cc_reason_ocr_artifacts_missing: "No OCR output found — run OCR on papers.", cc_reason_memory_ready: "Memory database is healthy and indexed.", - cc_reason_memory_db_missing: "Memory database not built — run memory build.", - cc_reason_memory_db_corrupt: "Memory database is corrupted — restore from backup.", - cc_reason_memory_index_stale: "Memory index needs rebuild to match current library.", + cc_reason_memory_db_missing: + "Memory database not built — run memory build.", + cc_reason_memory_db_corrupt: + "Memory database is corrupted — restore from backup.", + cc_reason_memory_index_stale: + "Memory index needs rebuild to match current library.", cc_diag_module: "Module", cc_diag_state: "State", cc_diag_severity: "Severity", @@ -447,8 +466,14 @@ const LANG: Record> = { cc_reason_no_probe: "{module} has not been probed yet.", cc_reason_stale: "Cached probe data for {module} is stale.", cc_reason_invalid_response: "Probe response for {module} was invalid.", + activity_syncing: "Syncing...", + activity_ocr_running: "Processing OCR... {pct}%", + activity_ocr_running_noprogress: "Processing OCR...", + cc_action_unknown_verb: "Unknown backend action: {verb}", + cc_action_investigate: "Running diagnostics...", cc_reason_probing: "Checking {module} status...", - cc_notice_placeholder: "{module} module probing is not yet available; it will be added in a future update.", + cc_notice_placeholder: + "{module} module probing is not yet available; it will be added in a future update.", cc_notice_refreshed: "Module status refreshed.", cc_notice_refresh_failed: "Failed to refresh module status.", cc_activity_idle: "Idle", @@ -462,20 +487,24 @@ const LANG: Record> = { maintenance_undismiss: "Show", maintenance_ocr_section: "OCR Maintenance", maintenance_action_result_success: "Action complete — module is now ready.", - maintenance_action_result_failure: "Action failed — module still needs attention.", + maintenance_action_result_failure: + "Action failed — module still needs attention.", maintenance_confirm_redo_title: "Confirm Rerun", - maintenance_confirm_redo_body: "This will delete and re-run OCR for the selected papers. Existing derived artifacts will be replaced.", + maintenance_confirm_redo_body: + "This will delete and re-run OCR for the selected papers. Existing derived artifacts will be replaced.", maintenance_confirm_restore_title: "Confirm Restore", - maintenance_confirm_restore_body: "This will restore the memory database from backup. Current data will be replaced.", + maintenance_confirm_restore_body: + "This will restore the memory database from backup. Current data will be replaced.", maintenance_confirm_ok: "Proceed", maintenance_confirm_cancel: "Cancel", maintenance_issue_draft_title: "OCR Issue Draft", - maintenance_issue_draft_preview: "Review the issue draft below before opening GitHub.", + maintenance_issue_draft_preview: + "Review the issue draft below before opening GitHub.", maintenance_issue_draft_included: "Included", maintenance_issue_draft_redacted: "Redacted", maintenance_issue_draft_open_github: "Open GitHub Issue", maintenance_issue_draft_edit: "Edit Draft", - }, + }, zh: { action_running: "正在执行 ", api_key_missing: "未配置 ✗", @@ -814,7 +843,8 @@ const LANG: Record> = { retrieval_build_stopping: "正在停止...", cc_summary_attention: "部分模块需要关注", cc_summary_ok_body: "PaperForge 环境已完全就绪。安装和帮助文档均正常可用。", - cc_summary_core_ok_body: "安装和帮助模块已可用。文献索引、OCR、记忆层和维护模块将在后端接入后显示实时状态。", + cc_summary_core_ok_body: + "安装和帮助模块已可用。文献索引、OCR、记忆层和维护模块将在后端接入后显示实时状态。", cc_summary_attention_body: "一个或多个核心模块需要您的关注才能正常运行。", retrieval_build_stopped: "构建已停止({n}/{t} 篇)", retrieval_build_failed: "构建失败", @@ -863,7 +893,8 @@ const LANG: Record> = { cc_reason_installation_ready: "PaperForge 环境已正确配置。", cc_reason_config_missing: "配置文件缺失,请运行安装向导。", cc_reason_config_corrupt: "配置文件损坏,请运行安装向导修复。", - cc_reason_python_version_unsupported: "Python 版本不受支持,请安装 Python 3.11+。", + cc_reason_python_version_unsupported: + "Python 版本不受支持,请安装 Python 3.11+。", cc_reason_help_ready: "帮助文档已可用。", cc_reason_docs_missing: "帮助文档尚未安装。", cc_reason_placeholder: "状态检测待接入,接入后将显示实时状态。", @@ -877,8 +908,14 @@ const LANG: Record> = { cc_reason_no_probe: "{module} 尚未检测。", cc_reason_stale: "{module} 的检测数据已过期。", cc_reason_invalid_response: "{module} 的检测响应无效。", + activity_syncing: "\u540C\u6B65\u4E2D...", + activity_ocr_running: "\u6B63\u5728\u5904\u7406 OCR... {pct}%", + activity_ocr_running_noprogress: "\u6B63\u5728\u5904\u7406 OCR...", + cc_action_unknown_verb: "\u672A\u77E5\u540E\u7AEF\u64CD\u4F5C: {verb}", + cc_action_investigate: "\u6B63\u5728\u8FD0\u884C\u8BCA\u65AD...", cc_reason_probing: "正在检测 {module} 状态...", - cc_notice_placeholder: "{module} 模块检测功能尚未可用,将在后续版本中添加。", + cc_notice_placeholder: + "{module} 模块检测功能尚未可用,将在后续版本中添加。", cc_notice_refreshed: "模块状态已刷新。", cc_notice_refresh_failed: "模块状态刷新失败。", cc_activity_idle: "空闲", @@ -894,9 +931,11 @@ const LANG: Record> = { maintenance_action_result_success: "操作完成 — 模块已就绪。", maintenance_action_result_failure: "操作失败 — 模块仍需关注。", maintenance_confirm_redo_title: "确认重新运行", - maintenance_confirm_redo_body: "这将删除并重新运行所选论文的 OCR。已有的衍生结果将被替换。", + maintenance_confirm_redo_body: + "这将删除并重新运行所选论文的 OCR。已有的衍生结果将被替换。", maintenance_confirm_restore_title: "确认恢复", - maintenance_confirm_restore_body: "这将从备份恢复记忆数据库。当前数据将被替换。", + maintenance_confirm_restore_body: + "这将从备份恢复记忆数据库。当前数据将被替换。", maintenance_confirm_ok: "继续", maintenance_confirm_cancel: "取消", maintenance_issue_draft_title: "OCR 问题草稿", @@ -905,7 +944,7 @@ const LANG: Record> = { maintenance_issue_draft_redacted: "已脱敏", maintenance_issue_draft_open_github: "打开 GitHub Issue", maintenance_issue_draft_edit: "编辑草稿", - }, + }, }; let T: Record | null = null; diff --git a/project/current/ocr-v2-active-queue.md b/project/current/ocr-v2-active-queue.md index 1c62bfc5..c46e84f9 100644 --- a/project/current/ocr-v2-active-queue.md +++ b/project/current/ocr-v2-active-queue.md @@ -1,8 +1,9 @@ # OCR-v2 Active Queue -> Status: OCR-v2 is stable; #75 setup, #76 capability, #77 Managed Runtime, #78 Library/OCR/Memory tracers, and #79 SecretStorage credential migration are implemented; #80 replaced Library/OCR/Memory/Maintenance placeholders; #81 is next. -> Last updated: 2026-07-18 +> Status: OCR-v2 is stable; all eight PRD #74 child issues (#75–#80) are implemented and verified; #81 Release N+1 owner cutover is next. +> Last updated: 2026-07-19 ## Current checkpoint + - Retrieval recovery is merged to `master`; the real Literature-hub vault has a healthy 2560-dimensional vec0 index and working M / @ search paths. - [OCR rebuild: streaming progress + maintenance UI redesign](https://github.com/LLLin000/PaperForge/issues/64) is implemented and reviewed. - Multi-key `ocr rebuild` and full `ocr redo` emit separate, flushed progress streams and accept a cross-platform cooperative stop request between papers. @@ -16,17 +17,21 @@ - [Desktop runtime/recovery research](https://github.com/LLLin000/PaperForge/issues/68#issuecomment-4970660288) establishes module-scoped repair, compatibility-gated updates, local redacted diagnostics, and user-reviewed issue drafts. - **[#69](https://github.com/LLLin000/PaperForge/issues/69) resolved** at `issuecomment-4971161072`: orthogonal availability/activity/attention axes, 6-state capability ordinal, 12 canonical verbs, backend-owned severity and primary actions, maintenance projection. - **[#70](https://github.com/LLLin000/PaperForge/issues/70) resolved** at `issuecomment-4971239398`: plugin-managed immutable runtime slots, system-Python bootstrap with validated-triplet fallback, single `active-runtime.json` pointer, `ManagedRuntime` class with `current()`/`status()`/`ensure()`, fail-closed command resolution. + - **[#71](https://github.com/LLLin000/PaperForge/issues/71) resolved**: six-module control-center HTML prototype with 5 scenarios, plain-button switcher, primary attention zone, responsive layout (768px breakpoint), and capability-gated actions. Independent Critical/Important PASS review. Design decisions recorded in `docs/prototypes/2026-07-14-six-module-control-center.{html,md}`. - **[#72](https://github.com/LLLin000/PaperForge/issues/72) resolved**: actionable-only maintenance inbox prototype with single-action rows, inline issue-draft review, local redacted export, and confirmation-first report flow. Independent Critical/Important PASS review. Design decisions recorded in `docs/prototypes/2026-07-14-maintenance-issue-reporting.{html,md}`. - **[#73](https://github.com/LLLin000/PaperForge/issues/73) resolved**: locked migration, security, platform, accessibility, and release-gate acceptance contract after five-domain audit and independent review. - **[#74](https://github.com/LLLin000/PaperForge/issues/74) published**: split into eight agent-ready issues (#75–#82) with native dependencies. - **[#75](https://github.com/LLLin000/PaperForge/issues/75) implemented and reviewed**: bare/headless/modular setup share `SetupPlan`; schema-v2 `vault_config` wins; v1 path keys are warned read fallback; all configured directories are forwarded; required failures return non-zero. -- **[#76](https://github.com/LLLin000/PaperForge/issues/76) implemented**: schema-v1 Installation/Help probes flow through the six-module Overview; persisted malformed/stale envelopes fail closed; backend set_config/update actions route to setup; Library/OCR/Memory/Maintenance are now real backend-derived surfaces (#78, #80). -- **[#79](https://github.com/LLLin000/PaperForge/issues/79) implemented**: Obsidian SecretStorage credential migration with copy-readback-verify-delete, idempotent re-run, crash-safe plaintext preservation, visible non-secret warnings, reference-only settings persistence, per-command credential allowlisting (OCR → PADDLEOCR_*, Memory → VECTOR_DB_*), non-target env stripping, minAppVersion 1.11.4. 44/44 focused SecretStorage production-path tests + 333/333 full plugin tests pass; typecheck/build clean; production bundle 232.8kb. Real Obsidian smoke passed at 730/768 (migration/restart/conflict warning/exact OCR-Memory handoff/non-target isolation/redaction/no-overflow). -- **Wayfinder navigation refinement approved**: preserve Overview and stage `概览 / 模块详情 / 维护 / 帮助` across #77/#78/#80. Installation owns Agent platform/Skills under Agent 集成; no empty placeholder detail pages. -- **[#77](https://github.com/LLLin000/PaperForge/issues/77) implemented**: immutable runtime slots, synchronous fail-closed `current`, probed `status`, install/repair/update/rollback/cancel/retention, managed-first dispatch, Release-N fallback, four-destination navigation, Installation detail, Agent integration, Help focus restoration. -- **[#78](https://github.com/LLLin000/PaperForge/issues/78) implemented**: Library/OCR/Memory real capability probes with module-detail-navigation, installation-navigation, and capability-state views. Python owns capability fact definitions; TypeScript renders via exact allowlist, fails closed on unknown keys. +- **[#76](https://github.com/LLLin000/PaperForge/issues/76) implemented**: schema-v1 Installation/Help probes flow through the six-module Overview; persisted malformed/stale envelopes fail closed; backend set_config/update actions route to setup. +- **Wayfinder navigation refinement approved and implemented**: `概览 / 模块详情 / 维护 / 帮助` shell live across #77/#78/#80. Installation owns Agent platform/Skills under Agent 集成; no empty placeholder detail pages. All six modules (Installation, Library, OCR, Memory, Maintenance, Help) are real probes. +- **[#77](https://github.com/LLLin000/PaperForge/issues/77) implemented**: Managed Runtime lifecycle with immutable slots, synchronous fail-closed `current`, probed `status`, install/repair/update/rollback/cancel/retention, managed-first dispatch, Release-N fallback, four-destination navigation shell. Verification: 192 focused + 289 full tests; typecheck/build clean. Merged to `master`. +- **[#78](https://github.com/LLLin000/PaperForge/issues/78) implemented**: real Library/OCR/Memory capability probes with module-detail-navigation, installation-navigation, and capability-state views. Python owns capability facts; TypeScript exact allowlist/fail-closed rendering. Verification: 58 backend + 171 plugin tests; typecheck/build clean; Obsidian smoke verified. +- **[#79](https://github.com/LLLin000/PaperForge/issues/79) implemented**: SecretStorage for capability secrets. Backend-focused gate passes; plugin full suite passes; typecheck/build clean. +- **[#80](https://github.com/LLLin000/PaperForge/issues/80) implemented**: Maintenance probe with backend-derived actionable-only rows, privacy-safe local issue drafts, and accessible destructive confirmation. Backend owns exact actions from `probe maintenance --json`; frontend renders via derived VerbModel with primary null for quality-ok items. Verification: backend focused gate 77/77; plugin full suite 381/382 (pre-existing capability-state test expecting help.stale but receiving help.invalid_response); typecheck/build clean; production bundle 264.4KB; Obsidian 1.12.7 smoke 730/768: entry focus, actionable-only rows, keyboard Enter, accessible destructive confirmation with exact backend effect, focus trap/restoration, owned inert cleanup, redacted editable issue draft, no token input/auto-open, explicit GitHub open only, URL re-redaction, no horizontal overflow. + ## Verification status + - Focused Python OCR paths: **99 passed, 1 Windows SIGINT test skipped, 1 unrelated empty-result regression deselected**. - Plugin: **93 passed**; TypeScript check and production build passed. - Maintenance regression tests: **19/19 passed** (canonical action routing, confirmation gate, cache manifest preservation). @@ -35,28 +40,30 @@ - Prototype #71 (control center): **Critical PASS (5/5), Important PASS (11/11)** — independent reviewer dimensions confirmed. - Prototype #72 (maintenance inbox): **Critical PASS (4/4), Important PASS (6/6)** — independent reviewer dimensions confirmed. - Both prototypes browser-verified at 768px viewport with scenario-switching, action-button interactions, expand/collapse diagnostics, and issue-draft flow. +- Issue #77 verification: **192 focused + 289 full tests passed**; typecheck/build clean. +- Issue #78 verification: **58 backend + 171 plugin tests passed**; typecheck/build clean; Obsidian 730px/768px smoke. +- Issue #79 verification: **backend-focused gate, plugin full suite pass**; typecheck/build clean. +- Issue #80 verification: **backend focused gate 77/77; plugin full suite 381/382** (only pre-existing capability-state test expecting help.stale but receiving help.invalid_response); typecheck/build clean; production bundle 264.4KB; real Obsidian 1.12.7 smoke at 730 and 768 confirmed all acceptance criteria. - Issue #75 verification: **61/61 focused tests passed**; independent review returned **Spec PASS / Quality APPROVED**. - Issue #76 verification: **21/21 backend probe tests and 169/169 plugin tests passed**; TypeScript check and production build passed; live Obsidian stale-cache/action-label smoke test and independent review passed. -- Issue #77 verification: **192/192 focused + 289/289 full tests passed**; typecheck/build clean; merged to `master` in `173a4e8..4ef9e98`. -- Issue #78 verification: **65/65 backend tests and 178/178 focused plugin tests, 324/324 full plugin tests passed** across 11 files; typecheck clean; production build clean; fail-closed recognizable config for Library/OCR; red rebuild_result stays non-destructive rebuild; queued OCR progress starts at 0; failed/null Library sync exit outcome is forwarded into fresh Python probe and remains sync actionable. -- Issue #79 verified: **44/44 focused SecretStorage production-path tests**, **333/333 full plugin suite** passed; typecheck/build clean; production bundle 232.8kb. -- Issue #80 verified: **71/71 backend tests** and **384/385 plugin tests** (1 pre-existing help stale/invalid baseline) passed; typecheck/build clean; 264.5KB production bundle. Real Obsidian smoke at 730/768: focus, keyboard, exact-effect confirm, issue-draft privacy, inert cleanup, no overflow all verified. -- Real Obsidian smoke (cross-issue): migration, restart, conflict warning, exact OCR-Memory credential handoff, non-target env isolation, redaction, and no-overflow all verified at 730/768. - No production plugin code was modified during prototype work. - The repository-wide Python suite remains blocked during collection by the pre-existing `test_pr9a_resume_rebuild.py` import of removed `_assert_collections_healthy`. ## Frontier + - [x] Prototype the six-module control center ([#71](https://github.com/LLLin000/PaperForge/issues/71)). - [x] Design the actionable-only maintenance inbox ([#72](https://github.com/LLLin000/PaperForge/issues/72)). - [x] Lock migration/acceptance contract (#73), publish PRD #74, and create dependency-linked issues #75–#82. - [x] Canonicalize setup and configuration migration ([#75](https://github.com/LLLin000/PaperForge/issues/75)). -- [x] Implement [#76](https://github.com/LLLin000/PaperForge/issues/76): Installation/Help capability envelope through the existing settings surface. -- [x] Implement [#77](https://github.com/LLLin000/PaperForge/issues/77): Managed Runtime lifecycle plus the approved Installation-detail navigation shell. -- [x] Implement [#78](https://github.com/LLLin000/PaperForge/issues/78): Library, OCR, and Memory capability tracers end to end — completed at `69a62239`. -- [x] Implement [#79](https://github.com/LLLin000/PaperForge/issues/79): SecretStorage credential migration (44/44 focused, 333/333 full, smoke passed). -- [x] Implement [#80](https://github.com/LLLin000/PaperForge/issues/80): actionable Maintenance inbox with privacy-safe OCR issue drafts (77/77 backend, 381/382 plugin, smoke passed). -- [ ] Implement [#81](https://github.com/LLLin000/PaperForge/issues/81): Release N+1 owner cutover and shim deletion. +- [x] Implement Installation/Help capability tracer ([#76](https://github.com/LLLin000/PaperForge/issues/76)). +- [x] Implement Managed Runtime lifecycle + navigation shell ([#77](https://github.com/LLLin000/PaperForge/issues/77)). +- [x] Expose Library, OCR, Memory capability tracers ([#78](https://github.com/LLLin000/PaperForge/issues/78)). +- [x] Implement SecretStorage for capability secrets ([#79](https://github.com/LLLin000/PaperForge/issues/79)). +- [x] Implement Maintenance probe with backend-derived rows, privacy-safe draft, destructive confirmation ([#80](https://github.com/LLLin000/PaperForge/issues/80)). +- [ ] Implement Release N+1 owner cutover ([#81](https://github.com/LLLin000/PaperForge/issues/81)). + ## Deferred + - Vector rebuild UX (PRD Slice 1): deferred. - Memory/global maintenance cleanup (PRD Slice 3): deferred. - OCR ETA and real-time per-row mutation: out of scope for the completed OCR slice. -- Release N+1 owner cutover (#81) is next; #82 follows. +- Release N+2 cutover shim deletion remains blocked by its native issue dependency (#82).