From b8f2076e4d3a873fa6a4ffee075ec99d19f1ace9 Mon Sep 17 00:00:00 2001 From: Research Assistant Date: Wed, 6 May 2026 12:41:43 +0800 Subject: [PATCH] fix: maturity gauge string-blocker iteration, paper header sync, setup control_dir removal --- paperforge/plugin/main.js | 17 +++++++++++------ paperforge/setup_wizard.py | 4 +--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/paperforge/plugin/main.js b/paperforge/plugin/main.js index 72646a43..32f82eea 100644 --- a/paperforge/plugin/main.js +++ b/paperforge/plugin/main.js @@ -651,10 +651,13 @@ class PaperForgeStatusView extends ItemView { gauge.createEl('div', { cls: 'gauge-level', text: `Level ${currentLevel} / 6` }); - if (currentLevel < 6 && blockingChecks && blockingChecks.length > 0) { - const list = gauge.createEl('ul', { cls: 'gauge-blockers' }); - for (const check of blockingChecks) { - list.createEl('li', { text: check }); + if (currentLevel < 6 && blockingChecks) { + const blockers = typeof blockingChecks === 'string' ? [blockingChecks] : blockingChecks; + if (blockers.length > 0) { + const list = gauge.createEl('ul', { cls: 'gauge-blockers' }); + for (const check of blockers) { + list.createEl('li', { text: check }); + } } } } @@ -1049,6 +1052,8 @@ class PaperForgeStatusView extends ItemView { this._contentEl.addClass('switching'); this._invalidateIndex(); // force fresh data load + this._renderModeHeader(this._currentMode); + switch (this._currentMode) { case 'global': this._renderGlobalMode(); @@ -1207,6 +1212,7 @@ class PaperForgeStatusView extends ItemView { case 'paper': badge.addClass('paper'); badge.setText('Paper'); + this._headerTitle.setText('Paper'); if (this._currentPaperEntry && this._currentPaperEntry.title) { modeName = this._currentPaperEntry.title; } else if (this._currentPaperKey) { @@ -1219,14 +1225,13 @@ class PaperForgeStatusView extends ItemView { } else { modeName = 'Unknown paper'; } - this._headerTitle.setText(modeName); break; case 'collection': badge.addClass('collection'); badge.setText('Collection'); + this._headerTitle.setText('Collection'); modeName = this._currentDomain || 'Unknown Domain'; - this._headerTitle.setText(modeName); break; } diff --git a/paperforge/setup_wizard.py b/paperforge/setup_wizard.py index 8b60cd17..2c6ebd50 100644 --- a/paperforge/setup_wizard.py +++ b/paperforge/setup_wizard.py @@ -1792,7 +1792,6 @@ def headless_setup( pf_path / "config", pf_path / "worker/scripts", vault / resources_dir / literature_dir, - vault / resources_dir / control_dir / "library-records", vault / base_dir, vault / ".obsidian" / "plugins" / "paperforge", ] @@ -2057,13 +2056,12 @@ PADDLEOCR_MODEL=PaddleOCR-VL-1.5 checks = { "Worker scripts": worker_dst.exists(), "Skill files": len(imported_skills) > 0, - "Library records dir": (vault / resources_dir / control_dir).exists(), "Base dir": (vault / base_dir).exists(), "Exports dir": (pf_path / "exports").exists(), "OCR dir": (pf_path / "ocr").exists(), "paperforge.json": pf_json.exists(), "Obsidian plugin": (vault / ".obsidian" / "plugins" / "paperforge" / "main.js").exists(), - "AGENTS.md": agents_dst.exists(), + "AGENTS.md": True if not agents_src.exists() else agents_dst.exists(), } failed = [k for k, v in checks.items() if not v] if failed: