@terreno/mcp 57.8.0 → 57.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/docs/upgrades/57.9.0.md +28 -0
  2. package/dist/docs/versioned/next/explanation/charts.md +12 -0
  3. package/dist/docs/versioned/next/explanation/example-coverage.md +1 -1
  4. package/dist/docs/versioned/next/explanation/roadmap-seed-issues.md +20 -0
  5. package/dist/docs/versioned/next/how-to/README.md +1 -1
  6. package/dist/docs/versioned/next/how-to/admin-import-prebuilt.md +1 -1
  7. package/dist/docs/versioned/next/how-to/charts-and-dashboards.md +5 -0
  8. package/dist/docs/versioned/next/how-to/circleci.md +4 -3
  9. package/dist/docs/versioned/next/how-to/compare-chart-rendered-snapshots.md +8 -0
  10. package/dist/docs/versioned/next/how-to/install-agent-skills.md +1 -1
  11. package/dist/docs/versioned/next/implementationPlans/ai-observability.md +1 -1
  12. package/dist/docs/versioned/next/implementationPlans/b2b-platform-program.md +1 -1
  13. package/dist/docs/versioned/next/implementationPlans/charts-and-dashboards.md +3 -2
  14. package/dist/docs/versioned/next/implementationPlans/dashboard-chart-parity.md +275 -0
  15. package/dist/docs/versioned/next/reference/ai.md +39 -10
  16. package/dist/docs/versioned/next/reference/environment-variables.md +1 -1
  17. package/dist/docs/versioned/next/reference/feature-flags.md +1 -1
  18. package/dist/docs/versioned/next/reference/ui.md +94 -11
  19. package/dist/docs/versioned/next/tasks/dashboard-chart-parity.md +145 -0
  20. package/package.json +2 -2
  21. package/src/docs/upgrades/57.9.0.md +28 -0
  22. package/src/docs/versioned/next/explanation/charts.md +12 -0
  23. package/src/docs/versioned/next/explanation/example-coverage.md +1 -1
  24. package/src/docs/versioned/next/explanation/roadmap-seed-issues.md +20 -0
  25. package/src/docs/versioned/next/how-to/README.md +1 -1
  26. package/src/docs/versioned/next/how-to/admin-import-prebuilt.md +1 -1
  27. package/src/docs/versioned/next/how-to/charts-and-dashboards.md +5 -0
  28. package/src/docs/versioned/next/how-to/circleci.md +4 -3
  29. package/src/docs/versioned/next/how-to/compare-chart-rendered-snapshots.md +8 -0
  30. package/src/docs/versioned/next/how-to/install-agent-skills.md +1 -1
  31. package/src/docs/versioned/next/implementationPlans/ai-observability.md +1 -1
  32. package/src/docs/versioned/next/implementationPlans/b2b-platform-program.md +1 -1
  33. package/src/docs/versioned/next/implementationPlans/charts-and-dashboards.md +3 -2
  34. package/src/docs/versioned/next/implementationPlans/dashboard-chart-parity.md +275 -0
  35. package/src/docs/versioned/next/reference/ai.md +39 -10
  36. package/src/docs/versioned/next/reference/environment-variables.md +1 -1
  37. package/src/docs/versioned/next/reference/feature-flags.md +1 -1
  38. package/src/docs/versioned/next/reference/ui.md +94 -11
  39. package/src/docs/versioned/next/tasks/dashboard-chart-parity.md +145 -0
@@ -4,9 +4,9 @@ React Native UI component library (a large component library). Layout (Box, Page
4
4
 
5
5
  ## Key exports
6
6
 
7
- - Layout: `Box`, `Page`, `SplitPage`, `Card`, `DashboardGrid`
7
+ - Layout: `Box`, `Page`, `SplitPage`, `Card`, `ChartCard`, `DashboardGrid`, `DashboardGridItem`
8
8
  - Forms: `TextField`, `SelectField`, `DateTimeField`, `CheckBox`
9
- - Display: `Text`, `Heading`, `Badge`, `DataTable`, `LineChart`, `BarChart`, `AreaChart`, `DonutChart`
9
+ - Display: `Text`, `Heading`, `Badge`, `DataTable`, `Scorecard`, `SparklineChart`, `LineChart`, `BarChart`, `AreaChart`, `DonutChart`
10
10
  - Actions: `Button`, `IconButton`, `Link`
11
11
  - Feedback: `Spinner`, `Modal`, `Toast`
12
12
  - Notifications: `NotificationBell`, `NotificationInbox`, `NotificationPreferences`
@@ -32,11 +32,11 @@ supported and is convenient when startup cost is not material:
32
32
  import {Box, DataTable, Icon} from "@terreno/ui";
33
33
  ```
34
34
 
35
- Heavy optional widgets (`GPTChat`, `EmojiSelector`, `MarkdownEditor`, consent flows, `LineChart`, `BarChart`, `AreaChart`, `DonutChart`, and related admin tools) are
35
+ Heavy optional widgets (`GPTChat`, `EmojiSelector`, `MarkdownEditor`, consent flows, `ChartCard`, `Scorecard`, `SparklineChart`, `LineChart`, `BarChart`, `AreaChart`, `DonutChart`, and related admin tools) are
36
36
  re-exported from the root entry through lazy boundaries. Importing them from `@terreno/ui` stays type-compatible, but
37
37
  their implementation modules load on first render instead of during the initial root import. `DashboardGrid` stays eager.
38
- their implementation modules load on first render instead of during the initial root import. `MarkdownView` and
39
- `DataTable` header info defer `react-native-markdown-display`; `EmojiSelector` defers `emoji-datasource` until open.
38
+ `MarkdownView` and `DataTable` header info defer `react-native-markdown-display`;
39
+ `EmojiSelector` defers `emoji-datasource` until open.
40
40
 
41
41
  For the smallest cold-start graph, keep using subpaths for screens that only need a few primitives (for example
42
42
  `import {Button} from "@terreno/ui/Button"`).
@@ -60,21 +60,72 @@ const customStyle: StyleProp<ViewStyle> = {
60
60
  - Ensures type compatibility when passing styles to @terreno/ui components
61
61
  - Simplifies imports (one package instead of two)
62
62
 
63
- ### DashboardGrid
63
+ ### DashboardGrid and DashboardGridItem
64
64
 
65
65
  Eager layout-only wrapping grid. Default columns `{sm: 1, md: 2, lg: 3}`. Children stay caller-supplied `Card`s. Cell width is `(rowWidth - gap × (columns - 1)) / columns` so flex `gap` does not wrap extra columns.
66
+ Wrap a child in `DashboardGridItem` when it must span more than one responsive column.
67
+ Plain children remain one column.
66
68
 
67
69
  ```tsx
68
- <DashboardGrid>
70
+ <DashboardGrid columns={{sm: 1, md: 2, lg: 4}}>
71
+ <DashboardGridItem span={{sm: 1, md: 2, lg: 2}}>
72
+ <Card>
73
+ <LineChart data={points} legendLabel="Signups" />
74
+ </Card>
75
+ </DashboardGridItem>
69
76
  <Card>
70
77
  <LineChart data={points} legendLabel="Signups" />
71
78
  </Card>
72
79
  </DashboardGrid>
73
80
  ```
74
81
 
82
+ ### ChartCard
83
+
84
+ Card chrome for a chart or table: title, optional filter summary, and an optional period
85
+ badge. Pass `onPeriodPress` to make the badge a button; omit it for display-only copy.
86
+
87
+ ```tsx
88
+ <ChartCard title="Cost by Device" periodLabel="Last 30 days">
89
+ <DonutChart data={points} />
90
+ </ChartCard>
91
+ ```
92
+
93
+ ### Scorecard
94
+
95
+ Compact KPI tile with a title, formatted value, and optional current/comparison
96
+ sparkline. Numeric values use `formatValue`; string values render unchanged.
97
+
98
+ ```tsx
99
+ <Scorecard
100
+ title="Cost"
101
+ value={569}
102
+ formatValue={(value) => `$${value}`}
103
+ sparklineData={current}
104
+ comparisonData={previous}
105
+ />
106
+ ```
107
+
108
+ ### SparklineChart
109
+
110
+ Plot-only line chart for compact metrics. `data` draws the current solid line;
111
+ `comparisonData` draws a dotted previous-period line on the same scale. It has no axes,
112
+ grid, legend, tooltip row, or empty-state copy.
113
+
114
+ ```tsx
115
+ <SparklineChart
116
+ data={[{label: "Mon", value: 3}, {label: "Tue", value: 5}]}
117
+ comparisonData={[{label: "Mon", value: 4}, {label: "Tue", value: 4}]}
118
+ />
119
+ ```
120
+
75
121
  ### LineChart
76
122
 
77
- Single-series line chart drawn with `react-native-svg`. Empty data shows `emptyText` (default `"No data"`). `loading` shows a `Spinner`. Press or hover a point for `{label}: {value}`.
123
+ Line chart drawn with `react-native-svg`. Keep the simple `data` + `legendLabel` path for
124
+ one series, or pass named `series` for multiple lines and legend items.
125
+ `comparisonData` adds a dotted previous-period overlay on the shared scale. Empty data
126
+ shows `emptyText` (default `"No data"`). `loading` shows a `Spinner`.
127
+ Set `xTickPolicy` to `auto` (default), `rotate`, or `truncate`. `title`,
128
+ `periodLabel`, and `onPeriodPress` use the same header chrome as `ChartCard`.
78
129
 
79
130
  ```tsx
80
131
  <LineChart
@@ -88,7 +139,10 @@ Hit targets use `Box` `onClick`, so testIDs are `{testID}.point.{index}-clickabl
88
139
 
89
140
  ### BarChart
90
141
 
91
- Single-series bar chart on the same owned-SVG contract as `LineChart` (empty, loading, legend, tooltip).
142
+ Bar chart on the same owned-SVG contract as `LineChart` (empty, loading, legend,
143
+ tooltip, tick policy, and header shortcuts). `comparisonData` paints lighter bars behind
144
+ the current period. When `series` is passed in this facade, its first entry supplies the
145
+ bars and legend; grouped bars remain future work.
92
146
 
93
147
  ```tsx
94
148
  <BarChart
@@ -101,6 +155,8 @@ Single-series bar chart on the same owned-SVG contract as `LineChart` (empty, lo
101
155
  ### AreaChart
102
156
 
103
157
  Filled area plus line on the same owned-SVG contract as `LineChart`.
158
+ Named `series` render one fill/line pair and legend item each; `comparisonData` stays a
159
+ dotted line rather than a filled area.
104
160
 
105
161
  ```tsx
106
162
  <AreaChart
@@ -112,11 +168,16 @@ Filled area plus line on the same owned-SVG contract as `LineChart`.
112
168
 
113
169
  ### DonutChart
114
170
 
115
- One slice per `{label, value}` point. Per-slice `color` overrides the theme paint. Legend is one row per slice (`legendLabel` is ignored).
171
+ One slice per `{label, value}` point. Per-slice `color` overrides the theme paint.
172
+ Legend rows show label + percent by default; customize with `formatShare`.
173
+ `centerValue` and `centerTitle` put an aggregate in the donut hole. `title` /
174
+ `periodLabel` use `ChartCard` chrome (`legendLabel` remains ignored).
116
175
 
117
176
  ```tsx
118
177
  <DonutChart
119
178
  data={[{label: "Open", value: 3}, {color: "#112233", label: "Closed", value: 5}]}
179
+ centerValue="8"
180
+ centerTitle="Total"
120
181
  testID="status-donut"
121
182
  />
122
183
  ```
@@ -189,6 +250,14 @@ Buttons automatically size to their content unless `fullWidth` is specified:
189
250
 
190
251
  Internally, Button sets `alignSelf: 'flex-start'` when `fullWidth={false}` to prevent stretching in column layouts.
191
252
 
253
+ ### TextField grow and maxHeight
254
+
255
+ `grow` makes a multiline field expand with its content. Pair it with `maxHeight` (pixels) to cap the expansion; past the cap the content scrolls.
256
+
257
+ ```tsx
258
+ <TextArea grow maxHeight={200} onChange={setNotes} value={notes} />
259
+ ```
260
+
192
261
  ### TextField password visibility
193
262
 
194
263
  `type="password"` masks the value and renders a show/hide eye control at the end of the field.
@@ -295,7 +364,15 @@ Streaming chat surface for `@terreno/ai`. Histories, messages, submit, and optio
295
364
 
296
365
  Pass `mascot` when the app owns a character. Terreno ships none. The node renders only while `currentMessages` is empty, centered in the chat panel above the suggested prompts. The empty hero uses the message viewport height as a minimum so short content stays centered, while taller mascots still scroll. Streaming feedback shares that centered hero instead of creating a second pane. Omit the prop for the default empty chat.
297
366
 
298
- The composer row (attachment picker, tools, input, Send) is vertically centered, so controls stay aligned with the input as it grows. The attachment cell is omitted when `onAttachFiles` is not provided.
367
+ The composer row (attachment picker, tools, input, Send) is vertically centered, so controls stay aligned with the input as it grows. The composer input grows with its text up to 200px, then scrolls. The attachment cell is omitted when `onAttachFiles` is not provided.
368
+
369
+ Each history row keeps rename and delete in a three-dot overflow menu (`gpt-history-menu-{id}`), anchored with `DropdownPanel`. Rename uses an outlined pencil in the dark secondary text color. Titles truncate before the menu trigger, so the trigger stays aligned at any sidebar width.
370
+
371
+ "Scroll to bottom" appears only when content sits more than 100px below the viewport. It never shows in an empty chat.
372
+
373
+ Image content parts render copy-image and (web) download actions. The message copy button on an image-only reply copies the image, not text. On web the image is written to the clipboard as PNG; on native it uses `expo-clipboard` `setImageAsync` for `data:` URLs.
374
+
375
+ The attach control (`FilePickerButton`) opens an anchored dropdown with **Photo Library** and **Document**. On web both open a browser file input from the press itself and return `data:` URLs, so attachments survive a reload; on native they use `expo-image-picker` and `expo-document-picker`.
299
376
 
300
377
  ```tsx
301
378
  <GPTChat
@@ -362,6 +439,12 @@ Buttons use a scale animation by default. Set `pressAnimation="opacity"` for an
362
439
 
363
440
  Disabled and loading buttons use a non-interactive pressable regardless of the selected animation.
364
441
 
442
+ ### Toast
443
+
444
+ `TerrenoProvider` mounts the toast container. Call `useToast()` for `success`, `info`, `warn`, `error`, `show`, `hide`, and `catch`.
445
+
446
+ On web, that container is portaled to `document.body` (`position: fixed`, `z-index: 999999`, `pointerEvents: "box-none"`), so a toast stays above an open `Modal` and its backdrop. The web container is sized with `100%` rather than the measured window, so statically exported pages (where `Dimensions` reports 0×0 at build time) still center the toast on screen. Native iOS and Android keep the in-tree absolute container sized to the window.
447
+
365
448
  ## Authentication Components
366
449
 
367
450
  ### SocialLoginButton
@@ -0,0 +1,145 @@
1
+ # Tasks: Dashboard chart parity
2
+
3
+ IP: [dashboard-chart-parity.md](../implementationPlans/dashboard-chart-parity.md)
4
+ **Follows:** https://github.com/TerrenoLabs/terreno/issues/1175
5
+ **Roadmap issue:** set after IP approval
6
+
7
+ **Feature profile:** false (full IP)
8
+
9
+ ## Phase 1 — Tracer (scorecard)
10
+
11
+ - [x] **Task 1.1**: `SparklineChart` + dotted `comparisonData`
12
+ - Delivers: public plot-only sparkline; solid current series; dotted comparison aligned on `label`; no axes/grid/legend/tooltip row; empty input does not throw
13
+ - Files: `ui/src/SparklineChart.tsx`, `ui/src/SparklineChart.test.tsx`, `ui/src/charts/paths.ts` (reuse line path), `ui/src/Common.ts` (TypeDoc props), `ui/src/index.tsx` / `heavyOptionalExports.tsx`
14
+ - Blocked by: none
15
+ - Skills: `terreno-ui`, `update-docs`
16
+ - Docs: stub `SparklineChart` on `docs/reference/ui.md` Display list
17
+ - Acceptance: bun tests — N points → path present; comparison path present when `comparisonData` set; empty data shows nothing / emptyText if provided; `ui` compile green
18
+
19
+ - [x] **Task 1.2**: `Scorecard` + `ChartCard`
20
+ - Delivers: KPI tile with title, formatted value, optional sparkline; `ChartCard` with title, period badge, optional `onPeriodPress`, optional `filterSummary`
21
+ - Files: `ui/src/Scorecard.tsx`, `ui/src/Scorecard.test.tsx`, `ui/src/ChartCard.tsx`, `ui/src/ChartCard.test.tsx`, lazy exports
22
+ - Blocked by: 1.1
23
+ - Skills: `terreno-ui`, `verify-ui-changes`, `update-docs`
24
+ - Docs: stub both on `docs/reference/ui.md`
25
+ - Acceptance: bun tests — value + title render; sparkline mounts when `sparklineData` set; badge press fires; period badge has no press handler when `onPeriodPress` omitted
26
+
27
+ - [x] **Task 1.3**: Scorecard demo + first golden
28
+ - Delivers: demo story; gallery fixture `scorecard-sparkline-comparison` (five KPI tiles, static data); PNG golden
29
+ - Files: `demo/stories/Scorecard.stories.tsx`, `demo/stories/ChartCard.stories.tsx`, `demo/demoConfig.tsx`, `demo/chartVisual/fixtureCatalog.ts`, `demo/chartVisual/fixtures.tsx`, `demo/rendered-snapshots/scorecard-sparkline-comparison.png`
30
+ - Blocked by: 1.2
31
+ - Skills: `terreno-ui`, `review-chart-visuals`, `verify-ui-changes`
32
+ - Docs: `docs/how-to/compare-chart-rendered-snapshots.md` lists the new id
33
+ - Acceptance: fixture catalog test includes the id; `bun run ui:charts:compare` green for it; story registered
34
+
35
+ ## Phase 2 — Cartesian additive facades
36
+
37
+ - [x] **Task 2.1**: `series` + `comparisonData` on `LineChart` / `AreaChart`
38
+ - Delivers: multi-series lines from `series`; single `data` still works; dotted comparison overlay; per-series legend; markers stay
39
+ - Files: `ui/src/LineChart.tsx`, `ui/src/AreaChart.tsx`, matching tests, `ui/src/charts/scales.ts` (shared x domain across series)
40
+ - Blocked by: 1.2
41
+ - Skills: `terreno-ui`, `update-docs`
42
+ - Docs: `docs/reference/ui.md` Line/Area props
43
+ - Acceptance: bun tests — three `series` → three paths + three legend labels; `{label,value}[]` only still draws one series; comparison path exists when set
44
+
45
+ - [x] **Task 2.2**: `xTickPolicy` + bar comparison + header shortcuts
46
+ - Delivers: `"auto"` rotates when labels would truncate, stays horizontal for ≤7 categories; `BarChart` accepts `series` (grouped later if >1 — this slice: first series only unless a second is comparison) and `comparisonData`; `title` / `periodLabel` / `onPeriodPress` on cartesian facades
47
+ - Files: `ui/src/BarChart.tsx`, `ui/src/LineChart.tsx`, `ui/src/charts/layout.ts`, `ui/src/BarChart.test.tsx`, `ui/src/LineChart.test.tsx`
48
+ - Blocked by: 2.1
49
+ - Skills: `terreno-ui`
50
+ - Docs: tick policy in `docs/explanation/charts.md`
51
+ - Acceptance: bun tests — 14 long date labels with `auto` → rotated tick style; 7 weekday labels stay horizontal; facade title renders when set and `ChartCard` is not wrapping (documented exclusive use)
52
+
53
+ - [x] **Task 2.3**: Cartesian goldens
54
+ - Delivers: fixtures `bar-time-rotated-ticks`, `line-three-series`, `bar-day-of-week`
55
+ - Files: `demo/chartVisual/**`, `demo/rendered-snapshots/*.png`
56
+ - Blocked by: 2.2
57
+ - Skills: `review-chart-visuals`, `verify-ui-changes`
58
+ - Docs: compare-how-to fixture table
59
+ - Acceptance: `bun run ui:charts:compare` green for the three ids
60
+
61
+ ## Phase 3 — Donut center and share legend
62
+
63
+ - [x] **Task 3.1**: Donut hole + percent legend
64
+ - Delivers: `centerTitle`, `centerValue`; legend `swatch + label + formatShare` (default percent of total); 100% single-slice still draws a ring + center
65
+ - Files: `ui/src/DonutChart.tsx`, `ui/src/DonutChart.test.tsx`
66
+ - Blocked by: 1.2
67
+ - Skills: `terreno-ui`, `update-docs`
68
+ - Docs: `docs/reference/ui.md` Donut props
69
+ - Acceptance: bun tests — center copy present; legend includes `%`; one-slice data still has one path; existing slice color override still works
70
+
71
+ - [x] **Task 3.2**: Donut goldens
72
+ - Delivers: `donut-center-and-share`, `donut-single-slice`
73
+ - Files: `demo/chartVisual/**`, goldens
74
+ - Blocked by: 3.1
75
+ - Skills: `review-chart-visuals`
76
+ - Docs: compare-how-to
77
+ - Acceptance: compare green for both ids
78
+
79
+ ## Phase 4 — Spanning grid
80
+
81
+ - [x] **Task 4.1**: `DashboardGridItem` spans
82
+ - Delivers: eager `DashboardGridItem` with `span` per breakpoint; default span 1; children without a wrapper keep current equal-column behavior
83
+ - Files: `ui/src/DashboardGrid.tsx` and/or `ui/src/DashboardGridItem.tsx`, `ui/src/DashboardGrid.test.tsx`, `ui/src/index.tsx` (eager)
84
+ - Blocked by: 1.2
85
+ - Skills: `terreno-ui`, `update-docs`
86
+ - Docs: `docs/reference/ui.md` Layout
87
+ - Acceptance: bun tests — span 2 in a 4-column row yields ~2× cell width minus gap; unwrapped children still fill 1 column
88
+
89
+ - [ ] **Task 4.2**: `hows-it-going-dashboard` chart composition
90
+ - Delivers: hard fixture matching the reference layout (5 scorecards, cost/conv bar, 3-line imp share, DOW bar, two donuts). Table slot may be a `ChartCard` placeholder until 5.2
91
+ - Files: `demo/chartVisual/fixtures.tsx`, `fixtureCatalog.ts`, golden
92
+ - Blocked by: 2.3, 3.2, 4.1
93
+ - Skills: `review-chart-visuals`, `verify-ui-changes`
94
+ - Docs: how-to example rewritten to this composition
95
+ - Acceptance: compare green; fixture uses `Scorecard` / `ChartCard` / `DashboardGridItem`, not ad-hoc `Box` widths only
96
+
97
+ ## Phase 5 — Table chrome
98
+
99
+ - [ ] **Task 5.1**: Header groups, footer rows, range status, wrapLines
100
+ - Delivers: `headerGroups` second header row; `footerRows` sticky totals; range copy `start–end of total` with existing pagination; `wrapLines={2}` wraps cell text inside `rowHeight` (virtualization unchanged)
101
+ - Files: `ui/src/DataTable.tsx`, `ui/src/DataTable.test.tsx`, `ui/src/Pagination.tsx` (if range lives there), `ui/src/Common.ts`
102
+ - Blocked by: 4.1
103
+ - Skills: `terreno-ui`, `update-docs`
104
+ - Docs: `docs/reference/ui.md` DataTable; pointer from charts how-to
105
+ - Acceptance: bun tests — grouped header text visible; footer row present; range text `1–50 of 452` with page 1 size 50 total 452; pinned column scroll still syncs with groups/footer; wrapLines 2 does not change `rowHeight`
106
+
107
+ - [ ] **Task 5.2**: Table card in the hard fixture
108
+ - Delivers: one `ChartCard` + `DataTable` in `hows-it-going-dashboard` (Search Terms or Ad Group Check-in static rows, totals, period headers)
109
+ - Files: `demo/chartVisual/fixtures.tsx`, update golden
110
+ - Blocked by: 5.1, 4.2
111
+ - Skills: `review-chart-visuals`, `verify-ui-changes`
112
+ - Docs: how-to shows table in the same grid
113
+ - Acceptance: compare green after intentional golden update; wrapped first-column names visible in the PNG
114
+
115
+ ## Phase 6 — Packaging and docs
116
+
117
+ - [ ] **Task 6.1**: Lazy root + import regression
118
+ - Delivers: `Scorecard`, `SparklineChart`, `ChartCard`, chart facades stay on `heavyOptionalExports`; `DashboardGrid` / `DashboardGridItem` eager; root import does not evaluate chart files
119
+ - Files: `ui/src/lazyBoundaries/heavyOptionalExports.tsx`, `ui/src/index.tsx`, `ui/src/RootImportRegression.test.tsx`, `docs/reference/ui-performance.md`
120
+ - Blocked by: 4.1, 5.1, 2.1, 3.1
121
+ - Skills: `terreno-ui`, `update-docs`
122
+ - Docs: performance page lists new lazy exports
123
+ - Acceptance: `RootImportRegression` fails if new chart files load with the root import; subpath imports work
124
+
125
+ - [ ] **Task 6.2**: Diátaxis + changelog + rules
126
+ - Delivers: how-to rewritten for easy-build composition; explanation covers scorecard, comparison stroke, additive facades vs grammar; reference complete; changelog fragment; ui rule export list; TypeDoc
127
+ - Files: `docs/how-to/charts-and-dashboards.md`, `docs/explanation/charts.md`, `docs/reference/ui.md`, `docs/how-to/README.md`, `.rulesync/rules/ui/00-ui.mdc`, `changelog/unreleased/dashboard-chart-parity.md`; `bun run website:generate` if needed
128
+ - Blocked by: 6.1, 5.2
129
+ - Skills: `update-docs`, `docs-audit`, `terreno-ui`
130
+ - Docs: the files listed above
131
+ - Acceptance: a stranger can copy the how-to into a screen that resembles the reference; explanation states grammar is not required; changelog `category: Added`; existing single-series how-to steps still valid as a subset
132
+
133
+ ## Verification mapping
134
+
135
+ | Criterion | Method |
136
+ |-----------|--------|
137
+ | Scorecard + sparkline + comparison | bun tests + `scorecard-sparkline-comparison` PNG |
138
+ | Multi-series line | bun tests + `line-three-series` PNG |
139
+ | Rotated vs horizontal ticks | bun tests + `bar-time-rotated-ticks` / `bar-day-of-week` |
140
+ | Donut center + share | bun tests + donut goldens |
141
+ | Grid spans + reference layout | `hows-it-going-dashboard` PNG + grid unit tests |
142
+ | Table chrome | bun tests + table region of hard golden |
143
+ | Facade compatibility | existing `*Chart.test.tsx` stay green |
144
+ | Lazy charts | `RootImportRegression` |
145
+ | Frontend proof | `verify-ui-changes` on demo gallery; artifacts on the implementation PR |
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "@modelcontextprotocol/node": "^2.0.0",
12
12
  "@modelcontextprotocol/server": "^2.0.0",
13
13
  "@sentry/bun": "^10.39.0",
14
- "@terreno/api": "57.8.0",
14
+ "@terreno/api": "57.9.0",
15
15
  "express": "^5.2.1",
16
16
  "luxon": "^3.7.2",
17
17
  "minisearch": "^7.2.0",
@@ -104,5 +104,5 @@
104
104
  "test:coverage": "bun run ../scripts/check-coverage.ts"
105
105
  },
106
106
  "type": "module",
107
- "version": "57.8.0"
107
+ "version": "57.9.0"
108
108
  }
@@ -0,0 +1,28 @@
1
+ # Upgrading to 57.9.0
2
+
3
+ **Action required:** No
4
+ **Affected packages:** @terreno/ai, @terreno/ui
5
+
6
+ ## Summary
7
+
8
+ This release adds durable and resumable GPT chat streams, safer attachment handling, operations-dashboard components, and improved web toast and file-picker behavior. Existing applications continue to work without migration.
9
+
10
+ ## Breaking changes
11
+
12
+ None
13
+
14
+ ## Deprecations
15
+
16
+ None
17
+
18
+ ## New capabilities
19
+
20
+ - Configure `fileStorageService` to persist chat attachments and resume in-flight replies through `GET /gpt/histories/:id/stream`.
21
+ - Compose operations dashboards with scorecards, comparison series, spanning items, and richer chart presentation.
22
+ - Set `maxHeight` on growing `TextField` and `TextArea` components.
23
+
24
+ ## Verification
25
+
26
+ - Run `bun run compile` and `bun run lint` at the app root.
27
+ - Exercise GPT chat attachment upload, reload during a response, and stream resumption when adopting the new AI capabilities.
28
+ - Check web toasts above an open modal and file selection through `FilePickerButton`.
@@ -20,6 +20,14 @@ Height works the same way: `height` is the whole chart, and the tick row, toolti
20
20
  row come out of that budget. A chart therefore fits a fixed-height slot, and reserving the tooltip
21
21
  row even when no tooltip is showing keeps hovering from reflowing the page.
22
22
 
23
+ Cartesian facades use `xTickPolicy="auto"` by default: up to seven categorical labels
24
+ stay horizontal, while denser sets rotate 45 degrees and reserve a taller axis row.
25
+ That taller row comes out of `height`; the plot shrinks so the chart still fits the
26
+ requested slot. `SparklineChart` scales to the data range so a small period-over-period
27
+ change stays visible.
28
+ Callers may force `"truncate"` or `"rotate"`. `title` and `periodLabel` are convenience
29
+ props backed by the same `ChartCard` used for explicit chart/table composition.
30
+
23
31
  `DashboardGrid` is layout only, so it stays on the eager root export. Chart implementations sit behind the same lazy root boundary as `GPTChat`. Cell width subtracts flex `gap` so `md`/`lg` column counts actually fit.
24
32
 
25
33
  Chart paint is proven with **rendered PNG goldens**, not React test-renderer JSON.
@@ -27,3 +35,7 @@ Chart paint is proven with **rendered PNG goldens**, not React test-renderer JSO
27
35
  (`/demo/chart-visual-gallery`), screenshots each fixture from easy to hard, and
28
36
  pixel-diffs against `demo/rendered-snapshots/`. Agents use the `review-chart-visuals`
29
37
  skill to read golden / actual / diff images when a compare fails.
38
+
39
+ The example app admin home (`/admin`) mounts `AdminCharts` so scorecards, a multi-series line,
40
+ bars, an area, and a donut with a center label render together. See
41
+ [Compose charts in a dashboard grid](../how-to/charts-and-dashboards.md).
@@ -21,7 +21,7 @@ that file (and its imports) to a working example. Gaps stay explicit.
21
21
  | Websockets / realtime | yes — `RealtimeApp` in `example-backend/src/server.ts`, `example-backend/src/websockets.ts` | yes — `useSocketConnection` in `example-frontend/app/_layout.tsx` | Sync deltas also use the socket (`SyncApp` + `@terreno/syncdb`). |
22
22
  | Consent forms | yes — `example-backend/src/consentDefinitions.ts`, seed scripts | yes — `example-frontend/app/(tabs)/consents.tsx`, admin `example-frontend/app/admin/consent-forms/` | First-login flow is covered by e2e (`example-frontend/e2e/consents.spec.ts`). |
23
23
  | Product announcements | yes — `AnnouncementsApp` in `example-backend/src/server.ts`, release upload token via `ANNOUNCEMENTS_UPLOAD_TOKEN`, seed `example-backend/src/scripts/seed-announcements.ts`, sample release pack `example-backend/announcements/releases/1.14.0/` with `bun run announcements:pack` | yes — `AnnouncementNavigator` in `example-frontend/app/_layout.tsx` and admin announcement routes | Release packs support multiple Markdown surfaces and idempotent draft or explicit live API import. |
24
- | File upload / GCS | yes — `example-backend/src/api/settings.ts`, AI file routes in `example-backend/src/api/ai.ts` | yes — `example-frontend/app/(tabs)/files.tsx`, `example-frontend/app/gcs-settings.tsx` | |
24
+ | File upload / GCS | yes — `example-backend/src/api/settings.ts`, AI file routes in `example-backend/src/api/ai.ts`, `file-uploads` flag in `example-backend/src/api/fileUploads.ts` | yes — `example-frontend/app/(tabs)/files.tsx`, `example-frontend/app/(tabs)/ai.tsx`, `example-frontend/app/gcs-settings.tsx` | The `file-uploads` feature flag hides upload controls and rejects uploads when off. A missing flag leaves uploads enabled. |
25
25
  | Better Auth | yes — `example-backend/src/utils/betterAuthConfig.ts`, `BetterAuthApp` in `example-backend/src/server.ts` | yes — `example-frontend/app/login.tsx`, `example-frontend/lib/betterAuth.ts` | Default `AUTH_PROVIDER` is `better-auth`. |
26
26
  | syncdb local-first | yes — `SyncApp` in `example-backend/src/server.ts` | yes — `example-frontend/store/syncdb.ts`, `example-frontend/app/(tabs)/index.tsx` | PR #869 closed without merge; `@terreno/syncdb` shipped on the launch line and is the example todos path. |
27
27
  | SyncDB diagnostics | n/a | yes — `debug` registration in `example-frontend/store/syncdb.ts`, debugger UI at `example-frontend/app/syncdb-debug.tsx` | `terreno-mcp-local` can inspect, snapshot/compare/merge, mutate, flush, reconcile/resync, and exercise offline/conflict paths against the running development client. |
@@ -639,6 +639,26 @@ docs are the proof; comms admin stats consume these primitives later.
639
639
 
640
640
  ---
641
641
 
642
+ ## dashboard-chart-parity
643
+
644
+ **Title:** `Ops dashboard chart parity`
645
+
646
+ **Labels:** `area:ui`, `type:feature`
647
+ **Project fields:** Area=`ui`, Target=`Next`, Impact=`Feature`, IP=`dashboard-chart-parity`, Status=`Planned`
648
+
649
+ Follow-up to charts-and-dashboards: scorecards with comparison sparklines, `ChartCard`
650
+ period badges, additive multi-series facades, donut hole labels, spanning `DashboardGrid`
651
+ items, and DataTable period headers / totals / range status so apps can compose a
652
+ “How’s it going?”-class ops dashboard. Terreno theme defaults; no Looker preset. Grammar
653
+ not required.
654
+
655
+ - **Implementation plan:** [dashboard-chart-parity.md](https://github.com/TerrenoLabs/terreno/blob/master/docs/implementationPlans/dashboard-chart-parity.md)
656
+ - **Tasks:** [dashboard-chart-parity.md](https://github.com/TerrenoLabs/terreno/blob/master/docs/tasks/dashboard-chart-parity.md)
657
+ - **RTK flag:** None
658
+ - **Depends on:** charts-and-dashboards
659
+
660
+ ---
661
+
642
662
  ## dark-mode-theme
643
663
 
644
664
  **Title:** `First-class dark mode`
@@ -39,7 +39,7 @@ Problem-oriented, practical steps. Use these when you know what you want to do.
39
39
  - [Upgrade banner](upgrade-banner.md) — Soft warning and hard-block app update UX
40
40
  - [Upgrade Terreno](upgrade-terreno.md) — Lockstep `@terreno/*` bumps, note range, order, rollback
41
41
  - [Track upstream Expo](track-upstream-expo.md) — Morning probe for SDK betas; `release-X.Y.Z` loop log + native fingerprint deps
42
- - [Compose charts in a dashboard grid](charts-and-dashboards.md) — `LineChart` / `BarChart` / `AreaChart` / `DonutChart` inside `Card`s in `DashboardGrid`
42
+ - [Compose charts in a dashboard grid](charts-and-dashboards.md) — `LineChart` / `BarChart` / `AreaChart` / `DonutChart` inside `Card`s in `DashboardGrid` (ops-dashboard scorecards and spans: [dashboard-chart-parity](../implementationPlans/dashboard-chart-parity.md))
43
43
  - [Compare rendered chart snapshots](compare-chart-rendered-snapshots.md) — PNG goldens for the chart visual gallery, not JSON snapshots
44
44
  - [Migrate from @terreno/rtk to @terreno/syncdb](migrate-rtk-to-syncdb.md) — Move data sync to the local-first layer
45
45
  - [Generate a REST CLI from OpenAPI](generate-a-rest-cli.md) — Scaffold `terreno generate rest-cli` for an app API
@@ -18,7 +18,7 @@ const app = new TerrenoApp({userModel: User})
18
18
 
19
19
  - `FeatureFlagsApp`: FeatureFlag model and `feature-flags-overrides` home widget.
20
20
  - `ConsentApp`: ConsentForm and ConsentResponse models plus consent field-widget IDs.
21
- - `DocumentStorageApp`: `documents` custom screen.
21
+ - `DocumentStorageApp`: `documents` custom screen. Pass `fileUploadsEnabled: false` (or a function that returns `false`) to reject uploads while listing and download stay available. The example app wires this to the `file-uploads` feature flag.
22
22
  - `AIAdminApp`: `ai-requests` custom screen and explorer API.
23
23
  - `JobsApp`: `jobs` custom screen and home widget (`dead` / `running` counts). With
24
24
  `accessControl`, requires **both** `admin:access` and `admin:jobs`; without it, legacy
@@ -35,3 +35,8 @@ export const OpsDashboard: FC = () => {
35
35
  Charts have no width prop: each one fills the container you put it in and redraws when that width changes, so size the `Card` or `Box` around it. `height` is the chart's whole height, tick row and tooltip row included, so `height={140}` fits a 140px slot; the tooltip row is always reserved so hovering never reflows the page. Long x labels truncate inside their band rather than widening the chart.
36
36
 
37
37
  Prove paint with `bun run ui:charts:compare` against `demo/rendered-snapshots/`, not with JSON snapshots. See [Compare rendered chart snapshots](compare-chart-rendered-snapshots.md).
38
+
39
+ The example app admin home (`example-frontend/components/AdminCharts.tsx`, mounted
40
+ below the admin dashboard at `/admin`) shows the same pieces together: scorecards with comparison
41
+ sparklines, a multi-series line, a donut with a center label, a bar chart, and an
42
+ area chart inside a spanning `DashboardGrid`.
@@ -242,9 +242,10 @@ restrict `terreno-release` and `terreno-npm` to tag/manual release pipelines.
242
242
  Until contexts exist, e2e jobs may use **project env vars for `E2E_*` secrets only**
243
243
  (or the in-job `ci-e2e-*-secret` fallbacks). **Do not** put `GITHUB_TOKEN` (or any
244
244
  GitHub PAT) in project env vars — those are injected into every job, including
245
- `bun` scripts from the PR. Create `terreno-github-api`, restrict it to this
246
- project, leave fork-PR secret passing off, and attach that context **only** to
247
- `dco` and `architectural-pr-review`. DCO skips if `GITHUB_TOKEN` is unset.
245
+ `bun` scripts from the PR. `terreno-github-api` must hold the PAT as
246
+ `GITHUB_TOKEN`; restrict it to this project and leave fork-PR secret passing off.
247
+ The `always` workflow attaches it **only** to `dco` and `architectural-pr-review`
248
+ (the latter also gets `terreno-agentic`). DCO skips if `GITHUB_TOKEN` is unset.
248
249
  `architectural-pr-review` also skips if `GITHUB_TOKEN` or `CURSOR_API_KEY` is
249
250
  unset, and it skips fork PRs. The job checks out `origin/master` before running
250
251
  the review script so a PR cannot rewrite the reviewer.
@@ -33,4 +33,12 @@ easy-through-hard charts in the demo app and diffs those PNGs against goldens.
33
33
  Agents reviewing a fail should follow the `review-chart-visuals` skill and look at the
34
34
  PNGs, not only the code diff.
35
35
 
36
+ Hard fixture `scorecard-sparkline-comparison` renders five KPI tiles with solid current
37
+ and dotted previous-period sparklines.
38
+ Cartesian parity fixtures are `bar-time-rotated-ticks`, `bar-day-of-week`, and
39
+ `line-three-series`.
40
+ Donut parity fixtures are `donut-center-and-share` and `donut-single-slice`.
41
+ Hard fixture `hows-it-going-dashboard` composes KPI scorecards, time-series charts, donuts,
42
+ and table placeholders in a spanning `DashboardGrid`.
43
+
36
44
  `CHART_VISUAL_BASE_URL` overrides the demo origin when the gallery is already hosted.
@@ -70,7 +70,7 @@ scan stages come from
70
70
  | Docs | `update-docs`, `update-agent-docs`, architecture skills |
71
71
  | GitHub | issues, review, UI verification, release, dependency updates |
72
72
  | Code scans | `terreno-scan-1-aim` … `terreno-scan-5-track`, `terreno-scan-campaign`, `terreno-scan-loop` |
73
- | Expo and native | `track-upstream-expo`, `upgrading-expo`, deployment / EAS skills |
73
+ | Expo and native | `track-upstream-expo`, `upgrading-expo`, `store-assets`, deployment / EAS skills |
74
74
  | Plugin agents | `pre-commit`, `ui-verifier` |
75
75
 
76
76
  `skills.sh.json` at the repo root groups those names on [skills.sh](https://skills.sh).
@@ -274,7 +274,7 @@ Env (example-backend):
274
274
  | `AI_OBS_DATASETS_PRIMARY` | default `local` |
275
275
  | `AI_OBS_EXPERIMENTS_PRIMARY` | must equal datasets |
276
276
  | `AI_OBS_SAMPLE_RATE` | `0`–`1`, default `0` |
277
- | `AI_OBS_PRICE_MAP_JSON` | `{ "gemini-2.5-flash": { "inputPerMTok": 0.1, "outputPerMTok": 0.4 } }` |
277
+ | `AI_OBS_PRICE_MAP_JSON` | `{ "gemini-3.8-flash": { "inputPerMTok": 0.1, "outputPerMTok": 0.4 } }` |
278
278
  | existing Langfuse keys | unchanged |
279
279
  | `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | optional OTLP |
280
280
 
@@ -36,7 +36,7 @@ org switcher, dark mode).
36
36
  | C | Communications (pluggable) | `comms-abstraction`, one item **per adapter**: `comms-adapter-expo-push` (first push adapter, per D4), `comms-adapter-twilio-sms`, `comms-adapter-twilio-verify`, `comms-adapter-sendgrid` (first mail adapter, per D2); operations: `comms-admin-dashboard`; consumers: `password-reset-and-email-verification`, `notification-center` |
37
37
  | B | Billing | `inbound-webhooks`, `billing-stripe` (web-first, per D1), `mobile-iap-revenuecat` (Future) |
38
38
  | D | Zero-to-deployed DX | `create-terreno-app`, `mongo-migrations` (deploy items already exist in the OSS launch program) |
39
- | E | B2B UI surfaces | `data-grid-server-filters`, `charts-and-dashboards`, `dark-mode-theme`, `command-palette`, `wizard-stepper`, `wysiwyg-editor` (markdown stays for now, per D3), `global-search` |
39
+ | E | B2B UI surfaces | `data-grid-server-filters`, `charts-and-dashboards`, `dashboard-chart-parity`, `dark-mode-theme`, `command-palette`, `wizard-stepper`, `wysiwyg-editor` (markdown stays for now, per D3), `global-search` |
40
40
  | F | Enterprise & scale | `framework-audit-log` (Next), `rate-limiting` (Next), `job-queues` (Next), `enterprise-sso`, `mfa-step-up-auth` |
41
41
  | — | Native baseline | `native-module-baseline` — all new native modules land in one major release |
42
42
 
@@ -194,8 +194,9 @@ None.
194
194
 
195
195
  ## Not Included / Future Work
196
196
 
197
- - Composition grammar (Phase 6) — recorded Grow decisions; implement on a follow-up Pick.
198
- - Multi-series cartesian beyond `dataKey` / `stackId` once the grammar ships.
197
+ - Ops-dashboard parity (scorecards, comparison sparklines, additive multi-series, donut centers, spanning grid, table chrome) — [`dashboard-chart-parity.md`](dashboard-chart-parity.md).
198
+ - Composition grammar (Phase 6) — recorded Grow decisions; implement on a follow-up Pick. Not required for the How’s it going dashboard.
199
+ - Multi-series cartesian via additive `series` lands in `dashboard-chart-parity`; grammar `dataKey` / `stackId` remains later.
199
200
  - Wiring `CommsDashboardScreen` charts to the stats endpoint.
200
201
  - Example-frontend dashboard.
201
202
  - Zoom/pan.