@ai-coach/vault-view-ui
Reusable, accessible, presentational Angular UI atoms, molecules, and layout shells for the vault view. It centralizes shared visual patterns—buttons, cards, detail drawers, tags, eyebrows, pagers, steppers, metric tiles, segmented groups, result panels, note action links, and the top shell header—so feature libraries stay focused on state wiring.
What it does not do
- No
data-access, stores, or HTTP calls.@nx/enforce-module-boundariesrestrictstype:uiinsidescope:vault-viewtotype:ui,type:util, andscope:shared. Every component receives data throughinput()signals and reports user intent throughoutput()signals. - No feature or domain business rules. Graph filtering, planning calculations, and climb scoring belong in
libs/vault-view/util,libs/vault-view/data-access, orlibs/vault-view/feat-*. - No inline styles. Component styles live in dedicated
.cssfiles styled exclusively with design tokens fromapps/vault-view/src/styles.css.
Architecture fit
- Scope:
scope:vault-view - Style:
architecture:layered(type:ui) - Depends on:
@ai-coach/vault-view-util - Used by:
@ai-coach/vault-view,@ai-coach/vault-view-feat-graph,@ai-coach/vault-view-feat-plans,@ai-coach/vault-view-feat-climb
[app shell / feat-graph / feat-plans / feat-climb]
│
input() / output() bindings
▼
[@ai-coach/vault-view-ui: atoms / molecules / shell]
│
▼
[@ai-coach/vault-view-util]
Internal architecture & rules
- Three UI folders with explicit class suffixes (DEC-AIC-0063):
- Atoms (
src/lib/atoms/,*AtomComponent):ButtonAtomComponent,EyebrowAtomComponent,GlassCardAtomComponent,ResultPanelAtomComponent,SectionCardAtomComponent,StatusPillAtomComponent,TagAtomComponent. - Molecules (
src/lib/molecules/,*MoleculeComponent):DetailDrawerMoleculeComponent,MetricTilesMoleculeComponent,NoteLinksMoleculeComponent,PagerMoleculeComponent,SegmentedGroupMoleculeComponent,StepperMoleculeComponent. - Shell (
src/lib/shell/,*ShellComponent):HeaderShellComponent.
- Atoms (
- Zoneless &
OnPusheverywhere: Every component setsChangeDetectionStrategy.OnPush, uses standaloneimports, and usesvault-*kebab-case element selectors. - Separate CSS and external templates: Every component uses standard
*.component.{ts,html,css}filenames withstyleUrl(never inlinestyles:or staticstyle="..."), and templates longer than ~40 lines live in a sibling.htmlfile (header.component.html). - Shared surface primitives:
src/styles/primitives.css(imported byapps/vault-view/src/styles.css) provides.glassand.icon-btnfor floating chrome and canvas overlays. - Code hygiene: Explicit
public/privatemember accessibility on every class member and zero comments in source code (DEC-AIC-0011).
Public surface
- Atoms:
ButtonAtomComponent(vault-button),EyebrowAtomComponent(vault-eyebrow),GlassCardAtomComponent(vault-glass-card),ResultPanelAtomComponent(vault-result-panel),SectionCardAtomComponent(vault-section-card),StatusPillAtomComponent(vault-status-pill),TagAtomComponent(vault-tag). - Molecules:
DetailDrawerMoleculeComponent(vault-detail-drawer),MetricTilesMoleculeComponent(vault-metric-tiles,MetricTileItem),NoteLinksMoleculeComponent(vault-note-links),PagerMoleculeComponent(vault-pager),SegmentedGroupMoleculeComponent(vault-segmented-group,SegmentedOption),StepperMoleculeComponent(vault-stepper,StepperItem). - Shell:
HeaderShellComponent(vault-shell-header,ShellNavItem).
How to extend it
- Choose the tier (
src/lib/atoms/<name>/,src/lib/molecules/<name>/, orsrc/lib/shell/<name>/) and create<name>.component.tsand<name>.component.css(plus<name>.component.htmlif the template exceeds ~40 lines) withChangeDetectionStrategy.OnPush, avault-*selector, matching*AtomComponent/*MoleculeComponent/*ShellComponentclass suffix, and signalinput()/output()APIs only. - Style using CSS custom properties from
apps/vault-view/src/styles.cssso dark and light themes work automatically. - Re-export the component and its public option/item interfaces from
src/index.ts. - Add Vitest unit tests in
src/lib/ui-primitives.spec.ts, then runnpm exec nx lint @ai-coach/vault-view-ui,npm exec nx typecheck @ai-coach/vault-view-ui, andnpm exec nx test @ai-coach/vault-view-ui.
Running & testing
Unit tests run in Vitest with Angular's zoneless TestBed and component resource resolution—no real browser or backend server is required.
npm exec nx test @ai-coach/vault-view-ui
npm exec nx lint @ai-coach/vault-view-ui
npm exec nx typecheck @ai-coach/vault-view-ui
Key ADRs
- DEC-AIC-0059 — Establishes the Angular layered frontend architecture for the vault view.
- DEC-AIC-0062 — Codifies
OnPush, separate CSS/HTML standards, and Nx lint/typecheck/test guardrails. - DEC-AIC-0063 — Splits UI into
atoms/,molecules/, andshell/with explicit component type suffixes. - DEC-AIC-0051 — Defines workspace tags and
@nx/enforce-module-boundariesrules. - DEC-AIC-0060 — Governs the eight-section package README structure and Docusaurus ingestion.