Commit graph

134 commits

Author SHA1 Message Date
Research Assistant
20acbbfc23 chore: bump version to v1.5.0 2026-05-11 00:21:35 +08:00
Research Assistant
e25a6b193e fix(dashboard): use same wikilink parser as Open PDF button for PDF detection 2026-05-11 00:17:21 +08:00
Research Assistant
ba6fffa1f7 feat(dashboard): PDF files now trigger per-paper mode via index pdf_path match 2026-05-11 00:15:42 +08:00
Research Assistant
1001674a72 fix(dashboard): workspace path detection now triggers paper mode for any file in workspace dir
- Remove _findEntry() precondition — works even if index not yet loaded
- Add case-insensitive flag to key regex (/i)
2026-05-10 23:40:35 +08:00
Lin Zhaoxuan
0c7082dcec Merge pull request #7 from LLLin000/feature/skill-refine
feat: unified release — skill redesign + deep-finalize + sync safety + dashboard v2
2026-05-10 23:32:23 +08:00
Research Assistant
30f9613482 merge: integrate dashboard-refine (deep-finalize + slug-freeze) into skill-refine
Resolved conflicts:
- styles.css: take dashboard-refine (more refined CSS)
- SKILL.md, deep-reading.md, paper-resolution.md: take skill-refine (modular skill redesign)
2026-05-10 23:28:13 +08:00
Research Assistant
7fedced9f6 fix(setup,plugin): rewrite BBT detection for Zotero 7 .xpi compatibility
Setup wizard (Python):

- Replace broken manual_path direct-candidate scan with unified platform-path-first approach

- Use _looks_like_bbt() — normalize to alnum+lower, match 'betterbibtex'

- Accept both .xpi files (Zotero 7) and directories (Zotero 6)

- Correct Linux profile path (.zotero/zotero/<random>, not .zotero/zotero/Profiles)

Plugin (JS):

- Remove isDirectory() restriction in scanBbtUnderProfiles/scanBbtDirectChildren

- Accept .xpi file entries for Zotero 7 compatibility

- Also remove all control_dir references (CLI argument removed in v1.4.17)
2026-05-10 23:18:14 +08:00
Research Assistant
d50c2ff4c0 fix(plugin): remove all control_dir references — CLI argument was removed in v1.4.17
- Remove --control-dir from setup args (CLI no longer accepts it)

- Remove control_dir from DEFAULTS, config parser, valid path keys

- Remove control_dir from settings assignment and JSDoc

- Remove dir_index display and validate_index check
2026-05-10 23:05:22 +08:00
Research Assistant
f8c05959ed style: align collection workflow overview with global library snapshot
- Match outer frame padding/background/shadow to library-snapshot

- Match inner stage card padding/background/layout to snapshot-pill

- Use align-items: stretch on funnel (pill parity), arrow stays centered

- Reduce collection-header bottom gap for tighter domain-to-card spacing

- Synchronize stage-label font-size (12px -> 11px)
2026-05-10 22:22:31 +08:00
Research Assistant
0c31f89d4d feat: add deep-finalize command — signal dashboard on /pf-deep completion
- new command paperforge deep-finalize <key>: sets deep_reading_status=done in frontmatter + refreshes index
- dashboard now only auto-refreshes on formal-library.json changes (removed per-note modify handler)
- pf-deep reference updated with Post-Processing section instructing agent to call deep-finalize at end
2026-05-10 21:50:27 +08:00
Research Assistant
5c6ccaad34 feat: dashboard ui refine — arrow icons, maillard colors, responsive grid, setup bugfix
Dashboard UI:

- Replace text expand/collapse with SVG arrow + clickable gradient container

- Map agent_platform key to display name (OpenCode, not opencode)

- Maillard/Morandi palette for OCR progress bars (pending brown, done deep green)

- Shorten 'Needs Attention' to 'Attention' to prevent label wrap

- Responsive workflow overview: CSS Grid + container queries (narrow: 2x2, wide: 4x1 with max-width 160px stop)

Setup Wizard:

- Fix Phase 7 verification crash (undefined agents_src/agents_dst variables)

Skill restructure:

- Move chart-reading references under references/ directory

- Remove old pf-*.md script files (deployed via skill_deploy service)

- Add new reference files (deep-reading, paper-qa, paper-resolution, save-session)
2026-05-10 20:56:27 +08:00
Research Assistant
c6c5723296 style: tighten collection header spacing, fix u00B7 encoding, add stage max-width
- Fix CSS unicode escape: \\u00B7 -> literal middle dot character

- Remove 'papers' count line in collection header

- Tighten collection-header padding from 64px to 14px top only

- Reset collection-title margin to 0

- Add max-width: 160px + justify-self: center to workflow stages

- workflow-stage-label font-size: 11px -> 12px
2026-05-10 20:52:22 +08:00
Research Assistant
e662033fd9 feat: dashboard ui refine — arrow icons, maillard colors, responsive grid, setup bugfix
Dashboard UI:

- Replace text expand/collapse with SVG arrow + clickable gradient container

- Map agent_platform key to display name (OpenCode, not opencode)

- Maillard/Morandi palette for OCR progress bars (pending brown, done deep green)

- Shorten 'Needs Attention' to 'Attention' to prevent label wrap

- Responsive workflow overview: CSS Grid + container queries (narrow: 2x2, wide: 4x1 with max-width 160px stop)

Setup Wizard:

- Fix Phase 7 verification crash (undefined agents_src/agents_dst variables)

Skill restructure:

- Move chart-reading references under references/ directory

- Remove old pf-*.md script files (deployed via skill_deploy service)

- Add new reference files (deep-reading, paper-qa, paper-resolution, save-session)
2026-05-10 20:52:21 +08:00
Research Assistant
d8a0d4d83e docs: align dashboard ux contract with refined ui 2026-05-10 20:52:21 +08:00
Research Assistant
09a520fb7a style: strengthen collection and global dashboard hierarchy 2026-05-10 20:52:21 +08:00
Research Assistant
f9fbbfb2f0 fix(dashboard): fix _renderNextStepCard this.plugin is undefined
- Replace this.plugin with this.app.plugins.plugins['paperforge']
- PaperForgeStatusView does not have a plugin property
- Remove debug console.log lines
2026-05-10 17:12:22 +08:00
Research Assistant
b31d5e94d9 debug(dashboard): add console.log for discussion.json path troubleshooting 2026-05-10 16:58:15 +08:00
Research Assistant
71d44c8966 fix(dashboard): use Obsidian adapter API for discussion.json read (handles unicode paths reliably) 2026-05-10 16:41:38 +08:00
Research Assistant
68e548e637 fix(dashboard): reset expanded state on mode switch
- Clear _techDetailsExpanded when switching modes to prevent stale state
- Ensures technical details starts collapsed for each new paper
2026-05-10 16:10:26 +08:00
Research Assistant
1bb320b70e refactor(dashboard): restructure per-paper layout per visual spec
- Merge status strip + file buttons into one row (left pills, right buttons)
- Move OCR/Analyze toggles into technical details disclosure body
- Replace All Set card with compact complete state row
- Save/restore technical details expanded state to prevent toggle flash
- Delete unused _renderPaperStatusStrip and _renderPaperFilesRow methods
- UI text: use Chinese labels (打开 PDF, 打开全文, 加入 OCR, 标记精读)
2026-05-10 16:09:53 +08:00
Research Assistant
0f9aae4a88 style(dashboard): rewrite Sections 39-43 per Native Light Surface Design spec
- Remove all box-shadows and ::before elevation pseudo-elements
- Typography constrained to 4 sizes (16/14/13/12) and 3 weights (600/500/400)
- Cards only for primary content modules (overview, discussion, OCR pipe, issues)
- Status pills: 999px radius, text-only status colors (no colored backgrounds)
- Technical details: inline disclosure row, not a bordered box
- Workflow toggles: not a card (simple flex row)
- Contextual buttons: Obsidian interactive-normal variables
- Section labels: no accent border, simple uppercase 12px muted
- Dark theme: no shadows, only background tweaks
2026-05-10 16:05:45 +08:00
Research Assistant
f8fac94222 style(dashboard): establish CSS base --pf-* vars, typography tokens, utility classes 2026-05-10 15:59:20 +08:00
Research Assistant
82bcbc7946 fix(dashboard): remove redundant _refreshCurrentMode from checkbox handler
- processFrontMatter triggers modify event which auto-refreshes the view
- Double refresh was resetting technical details toggle state (flash on first click)
- Discussion card only shows for papers with ai/discussion.json (currently 2Y9M3ILK only)
2026-05-10 15:28:58 +08:00
Research Assistant
fd47d52c13 fix(dashboard): fix discussion card rendering after sync read migration
- Replace leftover .catch() from old Promise chain with proper try/catch
- Use fs.readFileSync for reliable file access in Obsidian plugin context
2026-05-10 15:19:59 +08:00
Research Assistant
806292febb style(dashboard): luxury-minimal visual refinement
- Section labels: accent left-border matching metric card pattern
- Cards: ::before pseudo-element for smooth elevation on hover
- Per-paper header: larger title (16px), author (13px)/year (12px faint) hierarchy
- Body text: bumped from 11px to 13.5px for overview/discussion
- Status pills: rgba() translucent backgrounds with colored text
- Dark theme: deeper shadow on card hover (0 2px 12px rgba(0,0,0,0.3))
- Refined spacing, font weights, and transition timing for premium feel
2026-05-10 14:57:12 +08:00
Research Assistant
25b91b29ca fix(dashboard): only show issue panel for serious blockers
- Collection view: remove issue summary entirely (health counts are workflow state, not errors)
- Global view: only show issues for runtime mismatch, index missing, export missing, token missing
- Remove pdfIssues aggregation (not critical)
- CSS: soften issue colors (orange left border instead of red, muted text)
2026-05-10 14:38:22 +08:00
Research Assistant
01dddfcd0a fix(dashboard): check OS env for PaddleOCR token (match doctor logic)
- Doctor reads PADDLEOCR_API_TOKEN from OS environment variables
- Dashboard now checks 3 sources: plugin settings → .env file → process.env
2026-05-10 14:31:36 +08:00
Research Assistant
2ad8af1474 fix(dashboard): fix discussion card path on Windows + OCR token fallback check
- Discussion card: use lastIndexOf('/') instead of path.dirname to avoid
  Windows backslash separator breaking Obsidian vault path resolution
- OCR token: also check .env PADDLEOCR_API_TOKEN as fallback when plugin
  settings paddleocr_api_key is empty
2026-05-10 14:29:32 +08:00
Research Assistant
6d70e1f857 refactor: inline testable.js into main.js to remove external module dependency
- ACTIONS, resolvePythonExecutable, getPluginVersion, checkRuntimeVersion,
  classifyError, buildRuntimeInstallCommand, parseRuntimeStatus,
  buildCommandArgs, runSubprocess now defined directly in main.js
- Plugin no longer needs src/testable.js at runtime
- Tests continue to import from src/testable.js (unchanged)
- Fixes 'Cannot find module ./src/testable' error in Obsidian plugin loader
2026-05-10 14:17:14 +08:00
Research Assistant
064644c7c6 test: update ACTIONS count from 6 to 4, remove copy-context test cases 2026-05-10 14:10:41 +08:00
Research Assistant
808cae61f6 feat(dashboard): add do_ocr/analyze workflow toggle checkboxes to per-paper view
- Replace OCR queue toggle button with checkbox pair (do_ocr + analyze)
- Mirrors Base view toggles: writes to formal note frontmatter via processFrontMatter
- Dashboard modify event handler picks up file change and auto-refreshes
- Workers (OCR, deep-reading) read frontmatter from note file on disk
2026-05-10 14:06:37 +08:00
Research Assistant
b9fb1c919c style(dashboard): add refined CSS for redesigned per-paper, collection, and global views
- Status strip pills matching existing badge design (color-green/text-error)
- Paper overview card with card-style hover border + accent left border via ::before
- Discussion card with session-based Q&A styling + expand/truncate
- Workflow overview funnel with centered stage pills and arrows
- Issue summary with subtle error border + dot indicators
- Library snapshot pills and system status grid for global view
- Contextual button base style shared across all views
- All new components use Obsidian CSS variables for dark/light theme support
2026-05-10 14:04:14 +08:00
Research Assistant
9226ad0f03 refactor(dashboard): contract global view to system homepage
- Remove OCR pipeline and metric cards from global mode (moved to base)
- Add library snapshot: papers, PDFs ready, OCR done, deep-read done
- Add system status grid: runtime, index, Zotero export, OCR token
- Add issues panel with contextual Run Doctor / Repair Issues (only when issues exist)
- Add contextual Start Working actions: Open Literature Hub + Sync Library
- Add null guards to _renderStats and _renderOcr for safe backwards compat
2026-05-10 13:56:17 +08:00
Research Assistant
c5097373f4 refactor(dashboard): redesign base/collection view as batch workflow workspace
- Replace metric cards + bar chart + health grid with workflow funnel overview
- Move OCR pipeline from global to base (same progress bar logic, new container)
- Replace health matrix with compact issue summary (only visible when issues exist)
- Add contextual action buttons: Sync Library + Run OCR
- Remove _renderCollectionHealth (replaced by inline issue summary)
2026-05-10 13:53:06 +08:00
Research Assistant
c39ee8fa60 refactor(dashboard): redesign per-paper view as reading companion
- Replace lifecycle stepper + health matrix + maturity gauge with compact status strip
- Add paper overview card: extract Pass 1 summary from formal note ## 🔍 精读
- Add recent discussion card: read ai/discussion.json with 150-char truncation + expand
- Add files row: Open PDF + Open Fulltext
- Add technical details section: collapsed by default
- Keep OCR queue toggle and simplified next-step card
2026-05-10 13:50:01 +08:00
Research Assistant
0475387c55 fix(dashboard): add workspace path detection for paper mode routing
- Add _extractZoteroKeyFromPath: extract key from dirname pattern '{KEY} - {title}'
- Modify _resolveModeForFile: fallback to workspace detection for any file type
- Fixes fulltext.md and other workspace files dropping to global mode
2026-05-10 13:46:18 +08:00
Research Assistant
36a8ba8400 refactor(dashboard): Phase 1 cleanup - remove Copy Context, deep-reading dead code, static Quick Actions grid
- Delete Copy Context and Copy Collection Context from ACTIONS array
- Remove all _renderDeep* dead methods (StatusCard, Pass1Card, QACard)
- Remove _getPassCompletion and _extractPass1Content helpers
- Remove deep-reading mode case from _renderModeHeader
- Remove Copy Context handlers from _runAction
- Remove copy-context command palette registrations
- Delete static Quick Actions section from _buildPanel
- Delete _renderActions method
- Replace ready-state Copy Context fallback in _renderNextStepCard
- Add implementation plan at docs/superpowers/plans/
2026-05-10 13:44:50 +08:00
Research Assistant
f885adae48 feat: skill auto-deploy in update + Copy Context as pure JS + shared skill_deploy service
- New services/skill_deploy.py: single source of truth for agent skill deployment
  - AGENT_CONFIGS with 9 platforms, all vault-local
  - deploy_skills() with install/update mode (overwrite flag)
  - Used by both setup wizard and update worker
- update.py: _deploy_all_skills() after pip/git/zip update
- setup_wizard.py: delegates skill deploy to shared service
- config.py: add agent_platform default
- main.js: Copy Context + Copy Collection Context now pure JS
  - Uses in-memory _cachedItems / _currentPaperEntry
  - No subprocess spawn, no timeout, no JSON parse errors
- testable.js: remove needsKey/needsFilter from context actions
- commands.test.mjs: update assertions for removed flags
2026-05-10 12:33:23 +08:00
Research Assistant
11c787ed96 fix: add v1.4.18 entry to versions.json — missing from bump script 2026-05-10 11:37:58 +08:00
Research Assistant
0adfde6ae9 bump: 1.4.17 -> 1.4.18 2026-05-10 11:25:45 +08:00
Research Assistant
06c2ce5f9d fix(plugin): extract testable functions to src/testable.js, fix vitest imports
- Move resolvePythonExecutable, getPluginVersion, classifyError, ACTIONS, etc. to src/testable.js
- main.js now requires from ./src/testable.js instead of inline duplication
- Tests import from ../src/testable.js (no obsidian dependency)
- Remove vitest obsidian mock setup (no longer needed)
- Fixes L3 Plugin Tests that failed because main.js requires 'obsidian'
2026-05-10 11:03:31 +08:00
Research Assistant
71d2d05f41 fix(plugin): mock obsidian module for vitest — main.js requires it at top level 2026-05-10 10:52:21 +08:00
Research Assistant
aff3cfe622 fix(plugin): update Vitest imports after src/ inline refactor
- Add named exports for testable functions (resolvePythonExecutable, getPluginVersion, etc.)
- Update test imports from ../src/*.js to ../main.js
- Fix repair action test: disabled flag was removed when ACTIONS was inlined
2026-05-10 10:48:06 +08:00
CTZ
152056d044 fix(plugin): cross-platform macOS Python/Zotero/BBT detection and pip bootstrap
- Add paperforgeEnrichedEnv() to enrich PATH for GUI Obsidian on macOS/Linux
- Add getPaperforgePythonCmd() preferring Homebrew/pyenv over Apple CLT Python
- Add tryExecPythonVersion() with multi-candidate fallback for pre-check
- Add scanBbtUnderProfiles() using real Zotero Profiles/extensions/ layout
- Add scanBbtDirectChildren() for safe shallow BBT folder detection
- Add macOS /Applications/Zotero.app and Linux Zotero install detection
- Use paperforgeEnrichedEnv() in setup wizard spawn calls
- Add --user flag to pip install on non-Windows
- Pass PaddleOCR key as --paddleocr-key CLI arg instead of env var
- Add Apple CLT stub Python specific error message in _formatSetupError()

Based on PR #1 by Chartreuse310
Original commit: 156f653 (improve setup modal i18n and update directory defaults)
Co-authored-by: CTZ <yoyflying@163.com>
2026-05-10 10:37:08 +08:00
Research Assistant
15d849f7e6 fix: remove deprecated control_dir from doctor/setup/repair; enable repair button; fix UTF-8 encoding in doctor output 2026-05-10 01:50:24 +08:00
Research Assistant
caab9ff9ee refactor: inline src/ modules back into main.js — single file, no runtime require 2026-05-09 23:48:08 +08:00
Research Assistant
ba1a5cc7e0 revert: remove formal-library deprecation console.warn from plugin 2026-05-09 23:13:02 +08:00
Research Assistant
05629bce82 refactor: v2.1 contract hardening — PFResult unification, ErrorCode expansion, adapter cleanup, SyncService orchestration
Core contract:
- ErrorCode: 8→26 with _missing_() graceful degradation for unknown codes
- PFResult: +warnings/next_actions, PFError: +suggestions
- OcrStatus: 4→9 granular states (NONE/QUEUED/BLOCKED/NO_PDF/DONE_INCOMPLETE restored 1:1)
- field_registry.yaml: +owner/deprecated/replacement/enum values/default

Adapter cleanup:
- new core/io.py (read_json/write_json), core/date_utils.py (extract_year)
- new adapters/collections.py (build_collection_lookup)
- adapters/bbt.py: cut worker dependency, _private→public+alias
- worker/_utils.py + _domain.py: re-export from core instead of duplicate defs

Command unification:
- All 6 commands (sync/status/ocr/deep/repair/dashboard) → PFResult
- cli.py --json dest unified to 'json' (was json_output on status/doctor)
- commands/sync.py → SyncService (no more int/dict/PFResult mixing)

Service hardening:
- SyncService.run() orchestrates full sync lifecycle (select→index→clean)
- cleanup loops (orphaned records, flat notes) migrated from worker
- worker/sync.py: freeze line + services→worker one-way dependency
- plugin/main.js: formal-library.json fallback deprecation warning

Verification: 181/181 tests, 0 new lint errors
2026-05-09 22:20:07 +08:00
Research Assistant
0d49b5d285 fix: pre-existing test issues blocking CI on non-Windows platforms
test_ocr_preflight: mock fitz.open (not builtins.open) + set needs_sanitize=True
  - Code uses fitz.open(), not builtins.open() — mock was targeting wrong function
  - fitz.open() only called when meta.needs_sanitize is true — mock returned {} which skipped it
  - These tests were always broken but CI never ran before v2.1

test_e2e_cli: guard against None stdout in doctor_verdict test on Windows CI

L3 runtime.test.mjs: use platform-agnostic path matching
  - path.join produces / on Linux but \\\\ on Windows — test used \\\\ only
2026-05-09 18:06:37 +08:00
Research Assistant
c16e3e5198 fix(ci): two pre-existing CI config issues blocking pipeline
L2: removed -m cli marker filter (no test had the marker → exit code 5)
L3: committed package-lock.json (npm ci failed without it)
gitignore: added paperforge/plugin/node_modules/
These are CI config issues, not code regressions from v2.1.
2026-05-09 17:50:38 +08:00