You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command-layer NoteInput dispatch (no noteLoader callback), plain-data
edit structs for IEditor.applyEdit (no vscode.TextEdit leak), and a
vscode-excluded src/test/unit env. Per maintainer review on #239.
Refs #239.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/plans/2026-06-02-239-vscode-free-domain.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,12 @@ Five staged steps, each test-green and independently shippable. Edges first (che
14
14
### Step 1 — Remove cross-feature edges
15
15
-**smart-input → entries:** move `Dialogues` to `shared/` (it is a generic UI service, already used broadly) OR move `ScanEntries` to `shared/`. Prefer moving `Dialogues` → `shared/dialogues/` since it implements `IDialogues` (a shared interface). Re-point `Container`.
16
16
-**navigation → entries:** move `AbstractLoadEntryForDateCommand` to `shared/commands/` (or `features/entries` export consumed only via a shared base). Navigation extends the shared base.
17
-
-**entries → notes:**in `loadPageForInput`, replace the direct `new LoadNotes(...)` branch with a note-input handler resolved from the `JournalController` (register a `noteLoader` in the container, or move the `NoteInput`branch up into the command-registration layer). Entries no longer imports `notes`.
17
+
-**entries → notes:**push the `NoteInput` branch up into the command layer (`ShowEntryForInputCommand`) — the command is the right place to orchestrate between features by `Input` type. Entries' `loadPageForInput` handles only entry/week/selected inputs; the command dispatches `NoteInput`to `notes`. No generic `noteLoader` callback (maintainer rec, #239 review). Entries no longer imports `notes`.
18
18
- Verify: cross-feature grep (the #234 Phase-4 script) returns zero edges; suite green.
-`applyEdit` takes **plain-data** edits — `{ range: { start: { line, character }, end: { line, character } }, text }` — never `vscode.TextEdit`/`vscode.Range`/`vscode.Position`, so no editor types leak into the pure domain (maintainer rec, #239 review). The adapter converts plain data → `vscode.WorkspaceEdit` internally. Position computation in Step 4 returns the same `{ line, character }` shape.
22
23
- Implement `EditorAdapter` in `shared/editor/`, moving the bodies from `Dialogues.openDocument/showDocument/saveDocument`, `Writer.createSaveLoadTextDocument`, and `Inject.injectString/injectInlineString`.
23
24
- Add `editor: IEditor` to `JournalController` + `Container`.
24
25
- Verify: suite green (behavior identical; just relocated).
@@ -37,6 +38,7 @@ Five staged steps, each test-green and independently shippable. Edges first (che
37
38
38
39
### Step 5 — Node-only unit tests
39
40
- Add `src/test/unit/` (plain node, not Extension Host) covering: path resolution (`PathResolver`), `buildInlineString`, position computation, `inferType`.
41
+
- The `src/test/unit/` env must **exclude `vscode`** (no `vscode` import in unit specs or their imports) so a future accidental re-coupling fails the node run instead of silently pulling the host shim (maintainer rec, #239 review). Add a guard (lint override or a smoke check that `require('vscode')` is never reached).
40
42
- Wire into the test pipeline (separate `node --test` or extend compile-tests + a node runner). Document the command in AGENTS.md.
41
43
- Verify: node-only tests pass without a display; full Extension-Host suite still green.
0 commit comments