Repository navigation
v0.2.48.0 fix: Cycle 0056 pt2: the LLM Wiki view and the reader say what is true while a run starts, fails, hides or cannot reveal its folder - #137
Conversation
…hile a question waits (task 15)
…den views do no background work, reveal says why it opens nothing, fact reads run together (tasks 16, 18-22)
…ames, the welcome names the default folder, a row 5 click changes the location, names and sentences are single-sourced (tasks 24, 25)
…I 1) - OCR-M1: Copy Recovery Request in Title Case (package.json shortTitle, LLM_WIKI_ROW_ACTIONS); manifest test covers it. - OCR-L1: Reveal Wiki Folder sentences move to constants.ts (wording unchanged). - OCR-L2: manage-trust notices sit beside LLM_WIKI_ROW_ACTIONS; link resolves to resolveManageTrustCommand. - OCR-L3: test harness whenIdle throws when the view was never created. - OCR-L4: showing a hidden view reads at once instead of through the 1 s debounce. - OCR-L5: read-loop test renamed to observable behaviour. - CR2-1: README names inline actions in Title Case (welcome link stays sentence case).
…row, reveal reason precedence, real folder check)
- SM2-1..SM2-7: read-loop tests for debounce x dispose, reading x requestRefresh/refresh/show, error-after-run-row x hide/show, cleared message x getChildren - RT2-A: a read failure that persists across poll ticks is recorded once in Output while the error row stands; a different failure or one after a good read is recorded again - RT2-B (1): a WSL window reveals the Wiki folder like a local one - RT2-B (2): a file at the output path gets its own Reveal Wiki Folder sentence (new isExistingFile helper) - D2: the missing and remote Reveal Wiki Folder notices add the next step after task 21's sentence - D3: README lists Copy Recovery Request among the Title Case inline actions - RT2-C: the view's tree provider tolerates a root read inside createTreeView
- SM3: recordedFailureCause is cleared only once a non-error model is shown (after show, and after the freshness result is shown), so a persistent row-step or freshness failure is recorded once across poll ticks. - RT3-b: the dedupe key is name|code|message for Errors and util.inspect text otherwise (failureKeyOf). - RT3-c: one stat (wikiFolderKindOf) replaces isExistingFolder/isExistingFile; an unreadable path gets its own sentence with the error code; README updated. - D4: the remote Reveal notice's next step is "Open it from a terminal in this window, which runs on that remote."; task 21's first sentence unchanged. - M4: the show docstring no longer says it sets the message.
… review) - F1: a freshness check queued before the view is hidden no longer starts while it is hidden; a show reads again and queues a current one. - F2: Reveal Wiki Folder gives up on a path look that never answers (3 s, ETIMEDOUT) and tells a link whose target is missing in its own sentence. - F3: the unreadable sentence reads "Check the path and its permissions, or change the location." - F4: a cause that cannot be read (throwing message getter) still shows the error row; failureKeyOf falls back to the type tag. - F5: the failure key is bounded (500 characters), includes the cause one level down and ignores digit runs of the message. - F6: a good read ends the read failure; the freshness check records its own failure once and a successful check clears it. - F7: Reveal Wiki Folder tells and records a Wiki location that cannot be worked out. - F8: the tree view writes no message after dispose and applies the current message once after creation. - F9: systemErrorCode returns a code only when it is a string or a number. - F10/F11: failureKeyOf tests; the UNKNOWN fallback of wikiFolderKindOf is tested through a look seam. - F12: the show docstring no longer links getChildren. - F13: the remote notice's next step: "...which runs in that remote environment, not on this computer." - F14: the README says the poll runs while the view is shown and a run row shows, and a hidden view reads once when shown again.
Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
質問案内とリリース表示 extension/src/deepWikiReader.ts, extension/src/constants.ts, extension/package.json, extension/src/tests/llmWikiManifest.test.ts, extension/src/tests/wikiQuestionPage.test.ts, extension/README.md, CHANGELOG.md, README.md, VERSION, extension/scripts/tests/package.test.mjs |
質問中にエディターがモデル利用の許可を求める場合があることを案内します。コマンド名・アイコン、既定の出力先の説明、バージョン表示を更新しました。 |
ビュー更新と失敗記録 extension/src/utils/llmWikiView.ts, extension/src/utils/failureKeyOf.ts, extension/src/utils/readLlmWikiViewFacts.ts, extension/src/utils/systemErrorCode.ts, extension/src/extension.ts, extension/src/tests/llmWikiViewReadLoop.test.ts, extension/src/tests/readLlmWikiViewFacts.test.ts, extension/src/tests/utils/* |
ビューの表示中にポーリングと鮮度確認を行い、非表示中は停止します。再表示時には読み込みます。読み取り・鮮度確認の失敗記録をキー別に重複抑制し、読み取り処理の並行化と状態遷移のテストを追加しました。 |
出力先の判定と表示操作 extension/src/utils/wikiFolderKindOf.ts, extension/src/utils/describeUnrevealableWikiFolder.ts, extension/src/utils/registerLlmWikiCommands.ts, extension/src/utils/readLlmWikiViewState.ts, extension/src/constants.ts, extension/src/tests/wikiFolderKindOf.test.ts, extension/src/tests/describeUnrevealableWikiFolder.test.ts, extension/src/tests/llmWikiView.test.ts |
出力先をフォルダー、ファイル、不在、リンク切れ、読み取り不能に分類します。表示できない理由を通知し、表示可能な場合にフォルダーを開きます。出力先行から設定変更を実行できるようにしました。 |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant Editor as エディター
participant View as LLM Wikiビュー
participant Facts as readLlmWikiViewFacts
participant Tree as TreeDataProvider
participant Output as Output
Editor->>View: 表示状態の変更を通知
View->>Facts: 表示中にビュー情報を読み込む
Facts-->>View: 読み取り結果または失敗
View->>Tree: ルート行を要求
Tree-->>View: 行を返し、メッセージを更新
opt 失敗キーが未記録
View->>Output: 失敗を記録
end
Possibly related issues
- Issue 135: このPRは、Wikiビュー、reader、フォルダー表示、鮮度確認、非表示時のポーリング停止に関する項目を扱います。
- Issue 132: Wikiビューとreaderの持ち越し項目が記載されており、このPRの変更内容と関連します。
Possibly related PRs
- laststance/codebook#134: PR
#134で追加されたLLMWikiビューに対し、このPRは更新、失敗記録、フォルダー表示処理を変更します。 - laststance/codebook#133: PR
#133の生成状態と実行マーカーを、このPRのビューが読み取って表示します。 - laststance/codebook#136: PR
#136の実行状態とマーカーを、このPRのビューが再読み込みして表示します。
Merge Risk: 
Minimal · up to 7ccdf
-
No actionable merge-blocking issue is established. Complete the pending CI and native acceptance checks before release.
Security architecture risk: 
Low · up to 7ccdf
-
The inspected changes retain existing trust and location checks and add restrictions before opening a folder. No new privilege or cross-service exposure was identified. Risk is concentrated in local refresh and diagnostic behavior, with some security coverage remaining incomplete.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- observed — The traced filesystem scope is the configured Wiki destination in the current editor environment. Relative parent traversal is rejected by the unchanged resolver; explicit absolute destinations outside the project remain intentionally permitted, as they were before this PR.
Trust Boundaries and Controls
- observed — Freshness checks receive the project and output directory captured by the displayed facts. Their results are discarded after disposal or when the current publication-and-folder identity differs, preserving the existing stale-result boundary.
Resilience and Maintainability Implications
- observed — Read and freshness failures have separate deduplication keys and recovery resets. A rejected freshness check can emit a local Output diagnostic before its target is checked for staleness; the subsequent identity guard still prevents applying that obsolete result to a different Wiki.
-
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 26 files. (5 skipped: 5 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Summary
Bug-fix Cycle 0056, part 2 of 3 (Issue #135, tasks 15, 16, 18–22, 24, 25): the LLM Wiki view and the browser reader say what is true in the states the tasks list. Every defect found while fixing them is closed too.
Asking the editor model… The editor may first ask you to allow Codebook to use it; answer there.in both editors (O4).whenIdle) instead of fixed sleeps (task 18).ETIMEDOUTon a dead mount) and a remote window. A WSL window reveals like a local one. The settings lookup failing is shown and recorded.wikiHostvalue,shortRevision, and the sentences moved toconstants.ts.$(eye-closed), Try Again$(debug-restart), Cancel keeps$(debug-stop), and Copy Recovery Request.Changes to existing tests and their reasons (AC 4):
wikiQuestionPage.test.ts: the waiting status follows the task-15 sentence.llmWikiManifest.test.ts: the welcome text and the manifest type follow task 25.llmWikiView.test.ts:await whenIdle(), which is deterministic and stricter (task 18);llmWikiViewReadLoop.test.ts:deferhelper moved totests/utils/defer.ts;openViewalso collects the cause passed torecordFailure;readLlmWikiViewState.test.ts: row 5 now pins itscommand.describeUnrevealableWikiFolder.test.ts: the input becamefolderKind, and the expectations gained the next-step and unreadable wording.fakeLlmWikiEditor.tsgainedrenderLog,message, a realonDidChangeVisibilityandreadsRootInsideCreateTreeView;wikiUpdateWindow.tsgainedwhenIdle(it throws if the view was never created) andfindWikiLocation.isExistingFolderandisExistingFilewith their tests were replaced bywikiFolderKindOfand its test (a single stat).Local reviews before
/ship(AGENTS.md Delivery), run on this diff on top of part 1's head and fixed ind0052c4f:open-code-review-delegate: 14 of 14 files reviewed; 1 medium and 4 low.Test Coverage
faea27df).c82e4be8: 7304 pass, 0 fail, 6 skipped).Pre-Landing Review
/shipran three fixing cycles and did not converge (converged:false, ship review limit).386449b1:abd06854:c82e4be8:systemErrorCode;These were not changed, with evidence:
Promise.withResolversneeds a lib bump.No Critical or Major defect is still open, so no Issue is recorded.
Found by this PR's full lane and recorded in Issue #135 as task 30, to be fixed in part 3 (Study-workspace area, like task 28):
studyWorkspace.test.js:75timed out once at 12.3 s under load. It passed 5 of 5 alone, and part 2 changes no Study-workspace code.Gate edits: 43 listed, 20 read, 2 findings: 2 kept, 0 restored, 0 open.
extension/src/utils/llmWikiView.ts/extension/src/extension.ts: the try/catch around writing a failure to Output. A recorder or a disposed channel that throws must not hide the error row; it has nowhere to report.extension/src/tests/wikiFolderKindOf.test.ts: the dangling-link case skips where the OS refuses to create a symbolic link, through the sharedcreateLinkIfAllowedhelper.Outside review:
FINDINGS: P2, fixed.unverified).Exploratory QA
In each of passes 1–3, two probes ran (functional), and both passed every time:
check-package.mjs.The view's rendering on screen is N56 on part 3's candidate (AC 2b).
Design Review
There are no frontend files by diff scope, so design-lite was skipped. The design specialist was force-included in every pass for the view's learner-facing copy, and its findings are fixed above.
Eval Results
No prompt-related files changed, so evals were skipped.
Scope Drift
Scope Check: CLEAN.
Plan Completion
Issue #135, part 2 scope: 6 DONE (15, 18, 19, 21, 22, 24), 1 CHANGED (20: proven by read-loop tests, with the same observable), 2 PARTIAL (16, 25).
Linked Spec
Linked to #135 (partial delivery: part 2 of 3, not auto-closing). Part 3 follows with tasks 17, 23, 29, 30 and N56. Issue #135 closes after part 3.
Verification Results
Step 8.1 obligations are AC 5's 15-check exact-HEAD gate, shown below.
TODOS
No TODOS.md (AGENTS.md).
Documentation
Scope: the committed, staged and unstaged diff against origin/main (086211d). Changed files are CHANGELOG.md, README.md, VERSION, extension/package.json, extension/scripts/tests/package.test.mjs and extension/src/constants.ts. I checked the 0.2.48.0 CHANGELOG entry against the packaged
extension/README.md, as the project rule requires.Result: every user-visible behaviour the 0.2.48.0 entry names already has a sentence in
extension/README.md. That README was updated in earlier pre-landing review commits on this branch. The mapped behaviours:Asking the editor model…wait, in the LLM Wiki reader section.The root README status line matches 0.2.48.0. The README says the MCP API stays 1.8, the bundled skill stays 1.0.50 and stored data is unchanged. No files were edited. Debt: none found.
Test plan
The 15-check exact-HEAD gate (Issue #135 AC 5), run in order on
7ccdfdd9; all 15 pass:gstack-pregate --stage preflight --allow-repo-commands): exit 0,PREGATE: pass, 6 checks (secrets: 2110 added lines clean).pnpm format:check,typecheck,lint,health:static,dupesanddead-code: each exit 0.pnpm test: exit 0. 7310 tests: 7304 pass, 0 fail, 6 skipped.study-bootstrap,wiki-reader-dom,study-reading-pose,understanding-focusandrepository-return.pnpm test:package: exit 0. 1080 tests: 1070 pass, 0 fail.pnpm health: exit 0.node --test .codex/restore-product-context.test.mjs: 9 of 9 pass.Still pending:
Native acceptance of tasks 15, 16 and 25 is N56, run on part 3's candidate (Issue #135 AC 2b, AC 3).
🤖 Generated with Claude Code
Summary by CodeRabbit