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
This commit is contained in:
Research Assistant 2026-05-04 16:18:51 +08:00
parent 5fe5b00c98
commit 49551f2cd8
4 changed files with 128 additions and 21 deletions

View file

@ -16,10 +16,10 @@ Requirements for milestone v1.7: Context-Aware Dashboard.
### Per-Paper Dashboard
- [ ] **PAPER-01**: User sees a lifecycle stepper showing the current state and which stages are complete.
- [ ] **PAPER-02**: User sees a health matrix (PDF/OCR/Note/Asset dimensions) with color-coded status.
- [ ] **PAPER-03**: User sees maturity level (1-6) as a segmented progress bar with blocking checks listed.
- [ ] **PAPER-04**: User sees a recommended next step (sync/ocr/pf-deep/ready) with an action trigger.
- [x] **PAPER-01**: User sees a lifecycle stepper showing the current state and which stages are complete.
- [x] **PAPER-02**: User sees a health matrix (PDF/OCR/Note/Asset dimensions) with color-coded status.
- [x] **PAPER-03**: User sees maturity level (1-6) as a segmented progress bar with blocking checks listed.
- [x] **PAPER-04**: User sees a recommended next step (sync/ocr/pf-deep/ready) with an action trigger.
### Collection Dashboard
@ -68,10 +68,10 @@ Deferred to future milestone.
| DASH-04 | Phase 28 | Complete |
| REFR-01 | Phase 28 | Complete |
| REFR-02 | Phase 28 | Complete |
| PAPER-01 | Phase 29 | Pending |
| PAPER-02 | Phase 29 | Pending |
| PAPER-03 | Phase 29 | Pending |
| PAPER-04 | Phase 29 | Pending |
| PAPER-01 | Phase 29 | Complete |
| PAPER-02 | Phase 29 | Complete |
| PAPER-03 | Phase 29 | Complete |
| PAPER-04 | Phase 29 | Complete |
| COLL-01 | Phase 30 | Pending |
| COLL-02 | Phase 30 | Pending |
| COLL-03 | Phase 30 | Pending |

View file

@ -39,7 +39,7 @@
- [x] **Phase 27: Component Library** — Pure CSS/DOM visualization building blocks using Obsidian design tokens (2 plans planned)
- [x] **Phase 28: Dashboard Shell & Context Detection** — Auto-detect active file type and switch to correct dashboard mode (completed 2026-05-04)
- [ ] **Phase 29: Per-Paper View** — Lifecycle stepper, health matrix, maturity gauge, and next-step guidance for individual papers
- [x] **Phase 29: Per-Paper View** — Lifecycle stepper, health matrix, maturity gauge, and next-step guidance for individual papers (completed 2026-05-04)
- [ ] **Phase 30: Collection View** — Domain-level lifecycle/health aggregation for Base files
---
@ -88,8 +88,10 @@ Plans:
3. Maturity gauge shows the current level (1-6) as filled segments with the numeric level displayed, and below the gauge lists which checks are currently blocking advancement to the next level.
4. Next-step panel recommends exactly one concrete action with a one-line explanation of why (e.g., "Run OCR — fulltext is missing but PDF is present"). If the paper is already ai_context_ready, the panel shows "Ready" with no action needed.
5. Next-step panel includes a clickable action trigger that either executes the recommended CLI command (sync/ocr) via the existing action runner, or copies the zotero_key for `/pf-deep`, or confirms readiness with a "Copy Context" shortcut.
**Plans**: TBD
**Plans**: 1 plan
**UI hint**: yes
Plans:
- [x] 29-01-PLAN.md — Per-paper view wiring: metadata header, lifecycle stepper, health matrix, maturity gauge, next-step card, contextual actions
### Phase 30: Collection View
**Goal**: User can see aggregated domain-level lifecycle and health statistics when viewing any Base file in the PaperForge dashboard.
@ -116,7 +118,7 @@ Plans:
| 26. Traceable AI Context Packs | v1.6 | 3/3 | Complete | 2026-05-04 |
| 27. Component Library | v1.7 | 2/2 | Complete | 2026-05-04 |
| 28. Dashboard Shell & Context Detection | v1.7 | 2/2 | Complete | 2026-05-04 |
| 29. Per-Paper View | v1.7 | 0/TBD | Not started | - |
| 29. Per-Paper View | v1.7 | 1/1 | Complete | 2026-05-04 |
| 30. Collection View | v1.7 | 0/TBD | Not started | - |
---

View file

@ -2,14 +2,14 @@
gsd_state_version: 1.0
milestone: v1.7
milestone_name: Context-Aware Dashboard
status: Phase complete — ready for verification
stopped_at: Completed 28-02-PLAN.md
last_updated: "2026-05-04T15:05:30.000Z"
status: Planning complete
stopped_at: Completed 29-01-PLAN.md
last_updated: "2026-05-04T08:18:38.480Z"
progress:
total_phases: 4
completed_phases: 1
total_plans: 4
completed_plans: 4
completed_phases: 3
total_plans: 5
completed_plans: 5
---
# Project State
@ -23,8 +23,8 @@ See: .planning/PROJECT.md (updated 2026-05-03)
## Current Position
Phase: 28 (dashboard-shell-context-detection) — PLANNING COMPLETE
Plans: 2 of 2 planned
Phase: 29 (per-paper-view) — PLANNING COMPLETE
Plans: 1 of 1 planned
## Performance Metrics
@ -64,6 +64,7 @@ Plans: 2 of 2 planned
| Phase 27-component-library P02 | 3 min | 3 tasks | 1 files |
| Phase 28-dashboard-shell-context-detection P01 | 1 min | 2 tasks | 2 files |
| Phase 28-dashboard-shell-context-detection P02 | 5 min | 2 tasks | 1 files |
| Phase 29 P01 | 10 min | 2 tasks | 2 files |
## Accumulated Context
@ -107,6 +108,10 @@ Recent decisions affecting current work:
None yet.
- [Phase 29-per-paper-view]: _renderPaperMode() uses entry.next_step string → maps to 6-state stepInfo object for human-readable label + action trigger, with /pf-deep as clipboard copy (no CLI action)
- [Phase 29-per-paper-view]: Contextual action row created inside _renderPaperMode() before components — Copy Context reuses existing ACTIONS.paperforge-copy-context (needsKey), Open Fulltext uses new _openFulltext() with vault.getAbstractFileByPath + workspace.openLinkText
- [Phase 29-per-paper-view]: Next-step action trigger for sync/ocr/repair calls ACTIONS.find by cmd + _runAction(); /pf-deep copies key via clipboard; ready shows "Copy Context" shortcut — all three paths are explicit in _renderNextStepCard
### Blockers/Concerns
- Brownfield rollout must protect existing vaults, old Base templates, partial OCR assets, and legacy config shapes.
@ -114,6 +119,6 @@ None yet.
## Session Continuity
Last session: 2026-05-04T15:05:30.000Z
Stopped at: Completed 28-02-PLAN.md
Last session: 2026-05-04T08:18:38.476Z
Stopped at: Completed 29-01-PLAN.md
Resume file: None

View file

@ -0,0 +1,100 @@
---
phase: 29-per-paper-view
plan: 01
subsystem: ui
tags: obsidian-plugin, dashboard, per-paper, lifecycle, health-matrix, maturity-gauge, next-step, css
requires:
- phase: 27-component-library
provides: _renderLifecycleStepper, _renderHealthMatrix, _renderMaturityGauge, _renderSkeleton, _renderEmptyState
- phase: 28-dashboard-shell-context-detection
provides: _detectAndSwitch, _switchMode, _findEntry, _currentPaperEntry, ACTIONS, _runAction
provides:
- Full _renderPaperMode() implementation wired to Phase 27 components
- _renderNextStepCard() 6-state recommendation engine
- _openFulltext() Obsidian vault file opener
- CSS Section 15: Per-Paper View Layout
- CSS Section 16: Next-Step Recommendation Card
affects: [30-collection-view]
tech-stack:
added: []
patterns:
- Contextual action row created inline in _renderPaperMode before components
- Next-step action dispatch using ACTIONS.find(cmd) + _runAction for sync/ocr/repair
- Clipboard API (navigator.clipboard.writeText) for /pf-deep key copy
- Obsidian vault API (getAbstractFileByPath + openLinkText) for Open Fulltext
key-files:
created: []
modified:
- paperforge/plugin/main.js
- paperforge/plugin/styles.css
key-decisions:
- "Next-step action button for /pf-deep copies zotero_key to clipboard (no CLI command exists for deep reading)"
- "Ready state next-step card shows Copy Context shortcut instead of action trigger"
- "Copy Context button reuses existing paperforge-copy-context ACTIONS entry with needsKey"
requirements-completed: [PAPER-01, PAPER-02, PAPER-03, PAPER-04]
duration: 10 min
completed: 2026-05-04
---
# Phase 29: Per-Paper View Summary
**Full per-paper dashboard rendering pipeline: lifecycle stepper, health matrix, maturity gauge, next-step recommendation card, contextual actions, and paper metadata header**
## Performance
- **Duration:** 10 min
- **Started:** 2026-05-04T08:16:09Z
- **Completed:** 2026-05-04T08:26:00Z
- **Tasks:** 2
- **Files modified:** 2
## Accomplishments
- Replaced `_renderPaperMode()` placeholder with full rendering pipeline: metadata header (title, authors, year), lifecycle stepper, 2x2 health matrix, 6-segment maturity gauge with blocking checks, next-step recommendation card with action trigger
- Added `_renderNextStepCard()` helper with 6-state stepInfo mapping: sync, ocr, repair, rebuild index, /pf-deep, ready -- each with human-readable label + contextual action button
- Added `_openFulltext()` helper using Obsidian vault API to open fulltext.md files
- Added CSS Section 15 (Per-Paper View Layout) and Section 16 (Next-Step Recommendation Card)
- Contextual action buttons: Copy Context (reuses existing `paperforge-copy-context` action with `_runAction`) and Open Fulltext (conditional on `entry.fulltext_path`)
- All verification criteria pass -- JS syntax check clean, old placeholder text removed, all CSS classes defined
## Task Commits
Each task was committed atomically:
1. **Task 1: Add per-paper view CSS layout and next-step card styles** - `de26116` (style)
2. **Task 2: Replace _renderPaperMode() placeholder with full per-paper view** - `47c8093` (feat)
## Files Created/Modified
- `paperforge/plugin/styles.css` - Added Section 15 (Per-Paper View Layout) with .paperforge-paper-view, .paperforge-paper-header, .paperforge-paper-title, .paperforge-paper-meta, .paperforge-paper-authors, .paperforge-paper-year, .paperforge-paper-actions, .paperforge-contextual-btn classes; Added Section 16 (Next-Step Recommendation Card) with .paperforge-next-step-card, .paperforge-next-step-label, .paperforge-next-step-text, .paperforge-next-step-trigger classes
- `paperforge/plugin/main.js` - Replaced `_renderPaperMode()` placeholder (14 lines) with full implementation (133 lines) including contextual action buttons row, paper metadata header, lifecycle stepper render, health matrix render, maturity gauge render, next-step card render; Added `_renderNextStepCard(container, entry, key)` with 6-state mapping; Added `_openFulltext(fulltextPath)` using Obsidian vault API
## Decisions Made
- **Next-step button for /pf-deep**: Copies zotero_key to clipboard via `navigator.clipboard.writeText(key)` since there's no CLI command for deep reading -- the user pastes the key in OpenCode Agent. For ready state, shows "Copy Context" shortcut.
- **Action dispatch pattern**: Next-step card for sync/ocr/repair calls `ACTIONS.find(a => a.cmd === info.cmd)` then `_runAction(action, trigger)` -- same pattern used by the Quick Actions grid, ensuring consistent behavior.
- **Contextual action row**: Created inside `_renderPaperMode()` before the components, with Copy Context on the left and Open Fulltext conditional on `entry.fulltext_path` existence.
- **Open Fulltext implementation**: Uses Obsidian's `app.vault.getAbstractFileByPath()` + `app.workspace.openLinkText()` to open the fulltext.md file in the editor.
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
None.
## Known Stubs
- `_renderCollectionMode()` at line 956 remains a placeholder ("Phase 30 will add") -- intentional, planned for Phase 30.
## Next Phase Readiness
- Per-paper view fully wired: Phase 28 `_switchMode('paper')` -> `_renderPaperMode()` now renders complete per-paper dashboard with all 4 Phase 27 component methods
- Ready for Phase 30 (Collection View) to wire `_renderCollectionMode()` with aggregated lifecycle bar chart, health summary, and paper count
- No blockers
---
## Self-Check: PASSED
- [x] `paperforge/plugin/styles.css` exists
- [x] `paperforge/plugin/main.js` exists
- [x] Commit `de26116` exists (Task 1)
- [x] Commit `47c8093` exists (Task 2)
*Phase: 29-per-paper-view*
*Completed: 2026-05-04*