refactor: package-by-feature layout + events bus (Phase 4, #234) - #238
Merged
Conversation
Phase 4 of #234. Physical reorg from package-by-layer to package-by-feature: src/shared/ kernel — model, config, fs, logging, dates, strings, templates, paths, events, lang (no feature deps) src/features/ entries, notes, weekly, tasks, navigation, smart-input, tools (commands/ + domain + ui per feature) src/app/ composition root (unchanged) Add shared/events/JournalEvents (typed vscode.EventEmitter). The inline weekly daily-link sync in show-entry-for-date now fires an 'entryOpened' event; the weekly sync subscriber is wired in the Container — removing the entries->weekly import edge. Behavior unchanged (Container owns the subscription, so direct-Container tests keep it). Remaining cross-feature edges (documented for follow-up): entries->notes (LoadNotes dispatch), navigation->entries (shared base command), smart-input->entries (Dialogues uses ScanEntries). Refs #234. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 tasks
Owner
Author
Brooks-Lint PR Review: ApprovedHealth Score: 95/100 Phase 4 of #234 is successfully implemented. This PR completes the physical reorganization to a Package-by-Feature layout and introduces a typed event bus for cross-feature communication. Key Findings:
Recommendation: Merge immediately to stabilize the new architecture and unblock final documentation updates. |
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of #234 — physical reorg from package-by-layer to package-by-feature, plus the cross-feature event bus.
Depends on #237 (Phase 3) being merged.
New layout
~51 files moved (git detects renames). Old top-level dirs (
commands/,journal/,model/,ui/,util/,vscode/) are gone.Events
shared/events/JournalEvents— typedvscode.EventEmitterbus implementingIJournalEvents.show-entry-for-datenow fires anentryOpenedevent instead of importing the weekly feature. The weekly-sync subscriber is wired in the Container (composition root), so direct-Container tests keep the behavior unchanged.entries → weeklyimport edge is removed.Cross-feature edges (acceptance #5)
Down to 3, each documented for a focused follow-up (they need placement calls heavier than a file move):
entries → notes—LoadNotesdispatch insideloadPageForInput.navigation → entries— prev/next commands extend the sharedAbstractLoadEntryForDateCommand.smart-input → entries—DialoguesusesScanEntriesfor the quick-pick.Verification
npm run compile-tests(tsc) ✔npm run compile(esbuild) ✔npm run lint✔Follow-ups (not in this PR)
AGENTS.md"Architecture" section +docs/PLAN.mdstill describe the old layout — needs a docs pass.Dialogues+ base command toshared/, registry-based note dispatch).Refs #234.
🤖 Generated with Claude Code