Commit graph

407 commits

Author SHA1 Message Date
Research Assistant
c8677592fc chore: complete v1.7 context-aware dashboard milestone 2026-05-04 22:22:49 +08:00
Research Assistant
c2fbdbf96e docs(30-01): complete collection view plan
- SUMMARY.md created with deliverables, decisions, self-check
- STATE.md updated: Current Position to Phase 30 Complete, milestone v1.7 all phases complete
- ROADMAP.md updated: Phase 30 marked Complete, milestone v1.7 shipped
- REQUIREMENTS.md updated: COLL-01/02/03 marked Complete
2026-05-04 22:02:59 +08:00
Research Assistant
a54fb4777b feat(30-01): replace _renderCollectionMode placeholder with full collection view
- Metric cards row: papers count, fulltext-ready (with progress bar), deep-read (with progress bar)
- Lifecycle distribution bar chart via _renderBarChart()
- Aggregated health overview via _renderCollectionHealth() showing PDF/OCR/Note/Asset counts
- Single-pass aggregation from domain-filtered canonical index entries
- Empty state via _renderEmptyState() when domain has no items
2026-05-04 22:01:02 +08:00
Research Assistant
18accff3aa style(30-01): add Section 17 CSS for collection view layout
- .paperforge-collection-view flex container
- .paperforge-collection-metrics grid for metric cards
- .paperforge-collection-health grid for health aggregation
- .paperforge-collection-health-cell/counts with ok/warn/fail coloring
2026-05-04 21:59:58 +08:00
Research Assistant
4b4b0248a8 docs(30): capture phase 30 context (collection view) 2026-05-04 21:57:06 +08:00
Research Assistant
3440e22db7 docs(29-01): complete per-paper view plan
- SUMMARY.md with full per-paper dashboard rendering pipeline
- STATE.md updated: session, metrics, position
- ROADMAP.md: Phase 29 marked Complete
- REQUIREMENTS.md: PAPER-01 through PAPER-04 marked complete
2026-05-04 16:18:51 +08:00
Research Assistant
47c8093a3a feat(29-01): implement _renderPaperMode with lifecycle stepper, health matrix, maturity gauge, next-step card
- Replace placeholder _renderPaperMode() with full per-paper view rendering pipeline
- Add _renderNextStepCard() with 6-state stepInfo mapping (sync/ocr/repair/rebuild index/pf-deep/ready)
- Add _openFulltext() using Obsidian vault API to open fulltext.md
- Paper metadata header shows title, authors (comma-joined), year
- Contextual action buttons: Copy Context (reuses ACTIONS), Open Fulltext (conditional on fulltext_path)
- All 4 Phase 27 component methods wired: lifecycle stepper, health matrix, maturity gauge, next-step card
2026-05-04 16:17:37 +08:00
Research Assistant
de2611674a style(29-01): add per-paper view CSS and next-step card styles
- Section 15: Per-Paper View Layout (paper-view, header, title, meta, authors, year, actions, contextual-btn)
- Section 16: Next-Step Recommendation Card (next-step-card with ready state, label, text, trigger button)
2026-05-04 16:17:31 +08:00
Research Assistant
0ee0d274de docs(29): capture phase 29 context (per-paper view) 2026-05-04 15:54:56 +08:00
Research Assistant
7f658bcac5 docs(28-02): complete context detection and mode switching plan
- SUMMARY.md with deviations, decisions, and self-check
- STATE.md updated with P02 metrics, decisions, session
- ROADMAP.md updated phase 28 as complete (2/2 plans)
- REQUIREMENTS.md: DASH-03, DASH-04, REFR-02 marked complete
2026-05-04 15:07:21 +08:00
Research Assistant
424931d7a4 feat(28-02): add event subscriptions, mode header rendering, and lifecycle cleanup
- Add _setupEventSubscriptions() for active-leaf-change (debounced 300ms) and vault modify (filtered to formal-library.json)
- Add _renderModeHeader() with mode badge (global/paper/collection classes) and context name
- Add mode warning for paper not found in index (D-18)
- Refactor onOpen() to call _setupEventSubscriptions() before _detectAndSwitch()
- Refactor onClose() with full cleanup: workspace/vault off(), clearTimeout, null cached data
2026-05-04 15:05:12 +08:00
Research Assistant
0fa589f1fb feat(28-02): add mode detection and switching infrastructure
- Refactor constructor with _currentMode, _currentDomain, _currentPaperKey, _currentPaperEntry state
- Refactor onOpen() to call _detectAndSwitch() for initial data load
- Refactor _buildPanel() with _modeContextEl, _contentEl, _actionsGrid elements
- Add _renderActions() extracted from old _buildPanel action loop
- Add _invalidateIndex() to clear cached index
- Add _detectAndSwitch() for active file type detection (D-01..D-04)
- Add _switchMode() for mode-based content rendering (D-05..D-06)
- Add _renderGlobalMode() with OCR section instance vars for _renderOcr compat
- Add _renderPaperMode() placeholder for Phase 29
- Add _renderCollectionMode() placeholder for Phase 30
- Add _refreshCurrentMode() for index change re-render
- Remove orphaned duplicate code block and duplicate _showMessage
- Clean up double closing brace from orphan removal
2026-05-04 15:03:52 +08:00
Research Assistant
656084b8e2 docs(28-01): complete index loading utilities and CSS shell plan 2026-05-04 14:59:50 +08:00
Research Assistant
8574a61d99 feat(28-01): add mode-aware CSS for content area and header context
- Section 13: .paperforge-content-area with switching opacity transition
- Section 13: .paperforge-content-placeholder with dashed border styling
- Section 14: .paperforge-mode-context with flex layout
- Section 14: .paperforge-mode-badge with 3 color states (global/paper/collection)
- Section 14: .paperforge-mode-name with text-overflow ellipsis truncation
- Section 14: .paperforge-mode-warning using var(--text-warning)
2026-05-04 14:58:19 +08:00
Research Assistant
8944eccb11 feat(28-01): add index loading utilities to PaperForgeStatusView
- _loadIndex(): reads formal-library.json, returns parsed JSON or null
- _getCachedIndex(): lazy-loads and caches items array in this._cachedItems
- _findEntry(key): look up single paper by zotero_key, returns entry or null
- _filterByDomain(domain): filters index items by domain field
2026-05-04 14:57:53 +08:00
Research Assistant
4bc246c080 docs(28): create phase 28 plans (index utilities + context detection shell) 2026-05-04 14:55:59 +08:00
Research Assistant
09fcded42e docs(28): capture phase 28 context (dashboard shell and context detection) 2026-05-04 14:49:28 +08:00
Research Assistant
3910d6d0f2 docs(27-02): complete render methods plan 2026-05-04 14:43:07 +08:00
Research Assistant
54582d2950 feat(27-02): add 7 render methods to PaperForgeStatusView
Task 1: Add _renderSkeleton, _renderEmptyState, _buildMetricBar utilities + enhanced _renderStats with null guard and progress bar
Task 2: Add _renderLifecycleStepper (6-stage) and _renderHealthMatrix (2x2 grid) methods
Task 3: Add _renderMaturityGauge (6-segment) and _renderBarChart (horizontal bars) methods

All methods use createEl() DOM API, gracefully handle null/undefined via loading skeleton or empty state, and produce CSS classes matching Plan 27-01.
2026-05-04 14:41:45 +08:00
Research Assistant
8e7492abc7 docs(27-01): complete component library CSS plan
- Loading skeleton, metric card, lifecycle stepper, health matrix, maturity gauge, bar chart
- 391 lines of new CSS across 6 new sections, all using Obsidian CSS variables
- All 22 verification checks passed
2026-05-04 14:37:36 +08:00
Research Assistant
b22db1a97c feat(27-01): add maturity gauge and bar chart CSS components
- Section 11: Maturity gauge with 6-segment horizontal bar
- Level-specific color classes level-1 through level-6
- Blocking checks listed as bullet points under gauge
- Section 12: Horizontal bar chart with lifecycle stage colors
- .bar-fill with transition: width 0.3s smooth animation
- Stage color variants: imported/cyan, indexed/blue, pdf-ready/purple
- fulltext-ready/green, deep-read/yellow, ai-ready/red
- All colors use var(--*) Obsidian CSS variables
2026-05-04 14:35:37 +08:00
Research Assistant
2bc1372e60 feat(27-01): add lifecycle stepper and health matrix CSS components
- Section 9: Lifecycle stepper with 6 vertical steps, border-radius circles
- Connecting lines via ::before pseudo-element between steps
- States: .completed (green), .current (pulsing), .pending (dimmed)
- Section 10: Health matrix 2x2 CSS grid with color-coded cells
- Status classes: .ok (green), .warn (yellow), .fail (red)
- Hover tooltips via [title]:hover::after with attr(title)
- All colors use var(--*) Obsidian CSS variables
2026-05-04 14:34:56 +08:00
Research Assistant
8f1286df35 feat(27-01): add loading skeleton shimmer and enhanced metric card CSS
- Section 7: Loading skeleton with @keyframes paperforge-shimmer (1.5s)
- Section 7: Empty state with muted italic styling via .paperforge-empty-state
- Section 2 enhanced: opacity 0.3s transition on metric-card and metric-value
- Added .paperforge-metric-progress and .paperforge-metric-progress-fill for optional progress bar
- All colors use var(--*) Obsidian CSS variables
2026-05-04 14:34:11 +08:00
Research Assistant
bc88aac6d5 docs(27): capture phase 27 context (component library) 2026-05-04 14:24:45 +08:00
Research Assistant
de019a4ca7 docs: create milestone v1.7 roadmap (4 phases, context-aware dashboard) 2026-05-04 14:18:44 +08:00
Research Assistant
ec28ea143f docs: define milestone v1.7 requirements (context-aware dashboard) 2026-05-04 14:12:01 +08:00
Research Assistant
27afbc401c chore: bump version to v1.4.15 2026-05-04 13:03:11 +08:00
Research Assistant
d1fb6e69ca fix: restore ROADMAP.md (was rewritten for v1.7, not deleted) 2026-05-04 13:01:59 +08:00
Research Assistant
ce6aaeed71 chore: delete archived REQUIREMENTS.md and ROADMAP.md (archived to milestones/) 2026-05-04 13:01:47 +08:00
Research Assistant
7646cb5b07 chore: add v1.6.0 to plugin versions.json 2026-05-04 13:01:30 +08:00
Research Assistant
a283806abf chore: bump version to v1.6.0 2026-05-04 13:01:13 +08:00
Research Assistant
9a4d38d00e chore: complete v1.6 AI-ready literature asset foundation milestone 2026-05-04 13:00:43 +08:00
Research Assistant
e113e49c6e docs(26-03): complete plugin Copy Context actions 2026-05-04 12:52:16 +08:00
Research Assistant
ecbb7766dd feat(26-03): add Copy Context Quick Action with key resolution
- Add paperforge-copy-context ACTIONS entry with needsKey flag
- Update _runAction to resolve zotero_key from active file frontmatter
- Add needsFilter support for collection context (--all default)
- Implement clipboard copy with JSON validation for context commands
- Add running guard to prevent simultaneous execution
- Add variable timeout (30s context, 60s collection, 600s other)
- Register command palette entries for both context actions
2026-05-04 12:51:07 +08:00
Research Assistant
e5a2102783 docs(26-02): complete context CLI command plan 2026-05-04 12:47:49 +08:00
Research Assistant
c753a96e39 test(26-01): add migration tests for flat-to-workspace, _build_entry workspace write, and idempotency
- test_migrate_flat_note_to_workspace: D-11/D-12 copy-not-move verification
- test_migrate_extracts_deep_reading: D-13 deep-reading.md extraction
- test_migrate_creates_ai_dir: ai/ directory creation
- test_migrate_idempotent_skips_existing: D-15 idempotency
- test_build_entry_writes_to_workspace_after_migration: workspace-aware _build_entry
- test_build_entry_flat_fallback_for_unmigrated_paper: backward compat fallback
- test_build_entry_new_paper_creates_workspace: new paper behavior
- test_run_index_refresh_calls_migrate: spy on run_index_refresh integration
- bonus: test_migrate_returns_zero_when_no_index
2026-05-04 12:46:31 +08:00
Research Assistant
09dab7e206 test(26-02): write 14 tests for context command modes and provenance output
- TestContextSingleKey: single key JSON object with _provenance and _ai_readiness
- TestContextSingleKeyNotFound: missing key returns 1 with error
- TestContextDomainFilter: --domain filters correctly (AIC-03)
- TestContextCollectionFilter: --collection prefix match (AIC-03)
- TestContextAll: --all returns all entries
- TestContextProvenanceTraceability: all 9 provenance path keys present (AIC-04)
- TestContextAiReadinessBlocking: blocking explanation for pdf_ready/fulltext_ready
- TestContextNoEntriesMatch: empty results and no-mode error
- TestContextIndexMissing: missing index guidance
2026-05-04 12:45:52 +08:00
Research Assistant
8e8677dd63 feat(26-01): add migrate_to_workspace() and update _build_entry() for workspace path writing
- Add migrate_to_workspace() function to sync.py that copies flat notes to workspace directories
- Extract ## 🔍 精读 section into deep-reading.md in workspace
- Create ai/ directory in each paper workspace
- Wire migration into run_index_refresh() before build_index()
- Update _build_entry() in asset_index.py to write notes to workspace path when workspace dir exists
- Preserve flat path fallback for backward compatibility when workspace dir does not exist
2026-05-04 12:44:25 +08:00
Research Assistant
ace77d538e feat(26-02): wire context command into CLI subparser, registry, and dispatch
- Add 'context' to _COMMAND_REGISTRY for dynamic module loading
- Add context subparser with key (nargs='?'), --domain, --collection, --all
- Dispatch in main() to paperforge.commands.context.run(args)
- D-06: always outputs JSON, no --json flag needed
2026-05-04 12:43:43 +08:00
Research Assistant
f933075cff feat(26-02): create context command module with single-key and filter modes
- run() reads canonical index, filters by key/domain/collection/all
- _format_context_entry wraps entries with _provenance and _ai_readiness blocks
- AIC-04: blocking explanation when lifecycle != 'ai_context_ready'
- AIC-02: single key outputs single JSON object with provenance
- AIC-03: --domain and --collection output JSON arrays
- D-01: canonical index entry IS the AI context -- no separate pack format
2026-05-04 12:43:14 +08:00
Research Assistant
0739d29c65 docs(26): add workspace migration scope (flat→folder, preserve deep reading) 2026-05-04 12:33:34 +08:00
Research Assistant
a863ebcb24 docs(26): capture phase 26 context (AI context packs) 2026-05-04 12:01:30 +08:00
Research Assistant
8032478f54 docs(25-03): complete Base views lifecycle columns + repair build_index plan 2026-05-04 11:36:44 +08:00
Research Assistant
36dccf13a3 fix(25-03): use double-quote YAML wrapping for lifecycle filter values
- Filters now contain single-quoted lifecycle values (e.g. lifecycle = 'fulltext_ready')
  which broke single-quote YAML wrapping; switched to double-quote wrapper
- Updated _render_views_section(), merge_base_views(), _build_base_yaml()
- Updated filter preservation test to use lifecycle-based filter strings
2026-05-04 11:35:17 +08:00
Research Assistant
1ab6628796 docs(25-01): update ROADMAP progress to 1/3 2026-05-04 11:28:58 +08:00
Research Assistant
e49296f1bb docs(25-01): complete status --json source migration + doctor Index Health plan 2026-05-04 11:28:27 +08:00
Research Assistant
a8eece83e8 feat(25-01): refactor run_status to read canonical index + add doctor Index Health
- run_status() reads canonical index via summarize_index() for lifecycle,
  health, and maturity aggregates; falls back to filesystem when index missing
- JSON output includes lifecycle_level_counts, health_aggregate,
  maturity_distribution (or None when falling back)
- Text output shows lifecycle and health lines when index is present
- run_doctor() shows Index Health section with PDF/OCR/Note/Asset Health
  counts and status per dimension
- Brownfield detection: legacy schema, old Base templates, partial OCR assets
- Fixed status_tag mapping to support 'info' status (existing bug)
- 6 new tests covering index-backed JSON output, fallback, text output,
  Index Health with/without index, and mixed health counts

Phase 25-01, Tasks 2+3
2026-05-04 11:26:39 +08:00
Research Assistant
a7a4abdfde docs(25-02): complete plugin dashboard direct JSON read + doctor/repair Quick Actions 2026-05-04 11:25:31 +08:00
Research Assistant
00cd475f74 feat(25-03): wire repair to call build_index() after fixing source artifacts
- Add build_index() call at end of run_repair() when fix=True or fix_paths=True
- Add 'rebuilt' key to result dict initialization
- Add user-facing messages about repair completion and recovery path (MIG-04)
- Lazy import inside conditional block to avoid circular dependency
- Add tests: build_index called after fix, not called during dry-run,
  rebuilt in result, error fallback on build_index failure
2026-05-04 11:25:12 +08:00
Research Assistant
d143c2ed1b feat(25-02): add doctor and repair Quick Action buttons
- Add 'paperforge-doctor' action: runs 'python -m paperforge doctor'
- Add 'paperforge-repair' action: runs 'python -m paperforge repair'
- ACTIONS array now has 4 entries: sync, ocr, doctor, repair
- Existing _runAction() handles both new commands unchanged (thin CLI shell)
2026-05-04 11:23:56 +08:00