Skip to main content

@ai-coach/vault-view-feat-plans

Goal chain tree, effort timeline heatmap, and plan detail drawer for the vault view. It is lazy-loaded at /plans and binds PlansStore to the time-span toolbar, hierarchical goal tree, effort grid, and goal/row detail views.

What it does not do​

  • No direct HTTP calls or URL hash manipulation. Network calls and hash synchronization live in @ai-coach/vault-view-data-access.
  • No sibling feature imports. @nx/enforce-module-boundaries restricts type:feat to type:ui, type:data-access, type:util, and scope:shared.
  • No leaked internal sub-components. Only PlansFeatureComponent is exported from src/index.ts; composite sub-components stay private to this library.

Architecture fit​

[apps/vault-view route '/plans']
│
▼
[PlansFeatureComponent] ──provides──▶ [PlansStore]
│ │ │
▼ ▼ ▼
[GoalTree] [Timeline] [DetailPanel → GoalDetail / RowDetail] ──▶ [@ai-coach/vault-view-ui]

Internal architecture & rules​

  • Typed component folders & suffixes (DEC-AIC-0063): The route entry lives directly at src/lib/plans.component.ts (PlansFeatureComponent, vault-plans-feature), with private pure input()/output() composite views under src/lib/composite/<name>/ (*CompositeComponent: goal-tree/, effort-timeline/, plans-detail-panel/, plans-goal-detail/, plans-row-detail/).
  • Thin feature container + pure composites: PlansFeatureComponent provides PlansStore and handles global shortcuts (←, →, T, A, Esc); all child components are purely input()/output()-driven composites.
  • Shared UI primitives: Toolbar controls, segmented zoom buttons, badges, detail drawer chrome, and Obsidian/Graph note links come from @ai-coach/vault-view-ui.
  • Component standards (DEC-AIC-0062): ChangeDetectionStrategy.OnPush everywhere, external .html/.css files for templates over ~40 lines, explicit public/private member accessibility, and zero comments in source code (DEC-AIC-0011).

Public surface​

  • PlansFeatureComponent (vault-plans-feature) — Root route feature component providing PlansStore and coordinating span navigation, goal selection, effort timeline zoom, and the detail drawer.

How to extend it​

  1. Add any new plan queries or derived signals to PlansStore in @ai-coach/vault-view-data-access and pure period/formatting helpers to @ai-coach/vault-view-util.
  2. Create or update a private OnPush view in src/lib/composite/<name>/ (*CompositeComponent) or src/lib/smart/<name>/ (*SmartComponent) using @ai-coach/vault-view-ui atoms and molecules.
  3. Pass inputs/outputs from PlansFeatureComponent or PlansDetailPanelCompositeComponent without exporting private components from src/index.ts.
  4. Run npm exec nx lint @ai-coach/vault-view-feat-plans, npm exec nx typecheck @ai-coach/vault-view-feat-plans, and npm exec nx test @ai-coach/vault-view-feat-plans.

Running & testing​

Unit tests run in Vitest; ngc type-checks all templates and strict signal inputs.

npm exec nx test @ai-coach/vault-view-feat-plans
npm exec nx lint @ai-coach/vault-view-feat-plans
npm exec nx typecheck @ai-coach/vault-view-feat-plans

Key ADRs​

  • DEC-AIC-0059 — Establishes the Angular layered frontend and feature library split for the vault view.
  • DEC-AIC-0062 — Codifies smart container responsibilities, OnPush, external templates/styles, and Nx guardrails.
  • DEC-AIC-0063 — Adopts feature, smart, and composite component suffixes and directory rules.
  • DEC-AIC-0051 — Defines workspace tags and @nx/enforce-module-boundaries constraints.
  • DEC-AIC-0060 — Governs the eight-section package README structure and Docusaurus ingestion.