@mastra/playground-ui 29.0.0-alpha.1 → 29.0.0-alpha.11

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 (29) hide show
  1. package/CHANGELOG.md +239 -0
  2. package/dist/index.cjs.js +752 -346
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.css +296 -112
  5. package/dist/index.es.js +753 -342
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/domains/traces/components/traces-list-view.d.ts +5 -1
  8. package/dist/src/domains/traces/hooks/use-traces.d.ts +108 -8
  9. package/dist/src/ds/components/AlertDialog/alert-dialog.d.ts +27 -9
  10. package/dist/src/ds/components/Button/Button.d.ts +1 -1
  11. package/dist/src/ds/components/Button/index.d.ts +0 -1
  12. package/dist/src/ds/components/Collapsible/collapsible.d.ts +11 -4
  13. package/dist/src/ds/components/Command/command.d.ts +2 -1
  14. package/dist/src/ds/components/ContextMenu/context-menu.d.ts +43 -0
  15. package/dist/src/ds/components/ContextMenu/context-menu.stories.d.ts +11 -0
  16. package/dist/src/ds/components/ContextMenu/index.d.ts +1 -0
  17. package/dist/src/ds/components/DashboardCard/dashboard-card.stories.d.ts +1 -0
  18. package/dist/src/ds/components/Dialog/dialog.d.ts +27 -9
  19. package/dist/src/ds/components/DropdownMenu/dropdown-menu.d.ts +33 -20
  20. package/dist/src/ds/components/MainSidebar/main-sidebar-nav-link.d.ts +0 -1
  21. package/dist/src/ds/components/Popover/popover.d.ts +11 -5
  22. package/dist/src/ds/components/SectionCard/section-card.stories.d.ts +1 -0
  23. package/dist/src/ds/components/Slider/slider.d.ts +6 -3
  24. package/dist/src/ds/components/Slider/slider.stories.d.ts +4 -0
  25. package/dist/src/ds/components/Table/Table.d.ts +12 -11
  26. package/dist/src/ds/components/Txt/Txt.d.ts +4 -3
  27. package/dist/src/ds/icons/Icon.d.ts +4 -3
  28. package/package.json +8 -10
  29. package/dist/src/ds/components/Button/ButtonWithTooltip.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,244 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 29.0.0-alpha.11
4
+
5
+ ### Minor Changes
6
+
7
+ - Added a custom date range option to the Metrics page date picker. You can now filter metrics by an arbitrary start and end date and time, matching the Traces page, alongside the existing relative presets (last 24 hours, 3, 7, 14, and 30 days). ([#16832](https://github.com/mastra-ai/mastra/pull/16832))
8
+
9
+ The selected range is reflected in the URL so it can be bookmarked or shared:
10
+
11
+ ```txt
12
+ /metrics?period=custom&dateFrom=2026-05-01T00:00:00.000Z&dateTo=2026-05-07T23:59:59.999Z
13
+ ```
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`27fd1b7`](https://github.com/mastra-ai/mastra/commit/27fd1b79ac62eb7694f92587eb7d1be05b59be01), [`a702009`](https://github.com/mastra-ai/mastra/commit/a702009d3cfaa745120f501e21c783ed4d6a3072), [`8534d79`](https://github.com/mastra-ai/mastra/commit/8534d791fa1cb70fe1c19e2604c4b63cc10dd051), [`c78f8cd`](https://github.com/mastra-ai/mastra/commit/c78f8cd6222a86e6c60ae5210b6929ad5221b6fb), [`e146aad`](https://github.com/mastra-ai/mastra/commit/e146aadbba66c410ba0e74bac4c50135495cb8dd), [`1a0ec78`](https://github.com/mastra-ai/mastra/commit/1a0ec789a26cae443744e9abbd62ed6ee676af39), [`d52b6fe`](https://github.com/mastra-ai/mastra/commit/d52b6fe1c56853eb38864baae0bbfa75cc739ccb)]:
18
+ - @mastra/core@1.36.0-alpha.10
19
+ - @mastra/client-js@1.20.0-alpha.10
20
+ - @mastra/react@0.4.0-alpha.10
21
+
22
+ ## 29.0.0-alpha.10
23
+
24
+ ### Patch Changes
25
+
26
+ - Fixed a crash in filter menus with nested submenus (such as the Filter on the Agent review page) that showed "`MenuPortal` must be used within `Menu`". The submenu content now uses the design system's `DropdownMenu.SubContent` instead of the underlying library's portal directly. ([#16829](https://github.com/mastra-ai/mastra/pull/16829))
27
+
28
+ - Fixed type definitions and shared UI component types for `@mastra/playground-ui`. ([#16213](https://github.com/mastra-ai/mastra/pull/16213))
29
+
30
+ - `AlertDialog`'s API and behavior are unchanged — `asChild` on `AlertDialog.Trigger`, and `AlertDialog.Action` and `AlertDialog.Cancel`, all work exactly as before. (Internally it now builds on Base UI primitives.) ([#16824](https://github.com/mastra-ai/mastra/pull/16824))
31
+
32
+ - Moved the `Collapsible` component to Base UI, with a smoother height-based expand and collapse animation. The public API is unchanged — `asChild` on `CollapsibleTrigger` still works. ([#16825](https://github.com/mastra-ai/mastra/pull/16825))
33
+
34
+ - Upgraded `@base-ui/react` to 1.5, making popups noticeably faster — components built on Base UI such as `Tooltip`, `Popover`, `DropdownMenu` and `ContextMenu` now open and close more quickly. ([#16819](https://github.com/mastra-ai/mastra/pull/16819))
35
+
36
+ - Fixed the playground memory configuration display for agents using observationalMemory: true. ([#16213](https://github.com/mastra-ai/mastra/pull/16213))
37
+
38
+ - Updated dependencies [[`bd92c15`](https://github.com/mastra-ai/mastra/commit/bd92c154238ce5d05e12d5477da07c7b7292c5e3), [`bd92c15`](https://github.com/mastra-ai/mastra/commit/bd92c154238ce5d05e12d5477da07c7b7292c5e3), [`1698f5e`](https://github.com/mastra-ai/mastra/commit/1698f5ec141d34f22a873efdb145ce3cdf848a5e)]:
39
+ - @mastra/client-js@1.20.0-alpha.9
40
+ - @mastra/core@1.36.0-alpha.9
41
+ - @mastra/react@0.4.0-alpha.9
42
+
43
+ ## 29.0.0-alpha.9
44
+
45
+ ### Patch Changes
46
+
47
+ - Moved the `Dialog` component to Base UI. The public API is unchanged — `asChild` on `DialogTrigger` and `DialogClose` still works the same way, and open/close animations behave as before. ([#16821](https://github.com/mastra-ai/mastra/pull/16821))
48
+
49
+ ## 29.0.0-alpha.8
50
+
51
+ ### Minor Changes
52
+
53
+ - Added `ContextMenu` for right-click interactions. Supports submenus, checkbox and radio items, keyboard shortcuts, and a `destructive` variant for dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
54
+
55
+ ```tsx
56
+ import { ContextMenu } from '@mastra/playground-ui';
57
+
58
+ <ContextMenu>
59
+ <ContextMenu.Trigger className="…">Right click here</ContextMenu.Trigger>
60
+ <ContextMenu.Content>
61
+ <ContextMenu.Item>Rename</ContextMenu.Item>
62
+ <ContextMenu.Item variant="destructive">Delete</ContextMenu.Item>
63
+ </ContextMenu.Content>
64
+ </ContextMenu>;
65
+ ```
66
+
67
+ ### Patch Changes
68
+
69
+ - Added a `destructive` variant on `DropdownMenu.Item` to highlight dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
70
+
71
+ ```tsx
72
+ <DropdownMenu.Item variant="destructive">Delete project</DropdownMenu.Item>
73
+ ```
74
+
75
+ - `PopoverContent` no longer forwards the underlying library's auto-focus event handlers (`onOpenAutoFocus`, `onCloseAutoFocus`). To control focus when the popover opens or closes, use `initialFocus` and `finalFocus`. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
76
+
77
+ ```tsx
78
+ // Before
79
+ <PopoverContent onOpenAutoFocus={(e) => e.preventDefault()} />
80
+
81
+ // After
82
+ <PopoverContent initialFocus={false} />
83
+ ```
84
+
85
+ - Migrated the Slider component to base-ui with a refined neutral visual design. ([#16788](https://github.com/mastra-ai/mastra/pull/16788))
86
+
87
+ **What changed**
88
+ - Replaced `@radix-ui/react-slider` with `@base-ui/react/slider` as the underlying primitive
89
+ - Refreshed visuals: thin rounded thumb with white border and neutral inside, opacity-based track that adapts to any surface, neutral filled indicator (no green/accent color)
90
+ - Larger click target via padded `Slider.Control` and an invisible hit area on the thumb so it is easier to grab
91
+ - Added `cursor-pointer` on the control and `cursor-not-allowed` when disabled
92
+ - Removed the now unused `@radix-ui/react-slider` and `@radix-ui/react-tabs` dependencies
93
+
94
+ **API compatibility**
95
+
96
+ The public API is preserved. `onValueChange` and `onValueCommitted` are wrapped so consumers always receive `number[]`, even though base-ui returns `number | number[]` internally. Existing call sites like `<Slider value={[temperature]} onValueChange={value => setTemperature(value[0])} />` continue to work without changes.
97
+
98
+ - Updated dependencies [[`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
99
+ - @mastra/core@1.36.0-alpha.8
100
+ - @mastra/client-js@1.20.0-alpha.8
101
+ - @mastra/react@0.4.0-alpha.8
102
+
103
+ ## 29.0.0-alpha.7
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0)]:
108
+ - @mastra/core@1.36.0-alpha.7
109
+ - @mastra/react@0.4.0-alpha.7
110
+ - @mastra/client-js@1.20.0-alpha.7
111
+
112
+ ## 29.0.0-alpha.6
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [[`71a820b`](https://github.com/mastra-ai/mastra/commit/71a820b2353fa1406772c50760a3732058a8b337)]:
117
+ - @mastra/core@1.36.0-alpha.6
118
+ - @mastra/client-js@1.20.0-alpha.6
119
+ - @mastra/react@0.4.0-alpha.6
120
+
121
+ ## 29.0.0-alpha.5
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies [[`ac79462`](https://github.com/mastra-ai/mastra/commit/ac79462b98f1062394c45093aa515b0766f27ee2), [`19281c7`](https://github.com/mastra-ai/mastra/commit/19281c70424f757219782de16c2699743c5e04d0)]:
126
+ - @mastra/core@1.36.0-alpha.5
127
+ - @mastra/client-js@1.20.0-alpha.5
128
+ - @mastra/react@0.4.0-alpha.5
129
+
130
+ ## 29.0.0-alpha.4
131
+
132
+ ### Minor Changes
133
+
134
+ - Refreshed Button + Card design system tokens. ([#16769](https://github.com/mastra-ai/mastra/pull/16769))
135
+
136
+ **Button variants (breaking)**: consolidated to `default`, `primary`, `outline`, `ghost`. The `cta`, `contrast`, and unused `link` variants have been removed. `primary` now uses a high-contrast `neutral6` fill instead of `surface4`, so it reads clearly as the form submit action in both themes.
137
+
138
+ ```tsx
139
+ // Before
140
+ <Button variant="cta">Save</Button>
141
+ <Button variant="contrast">Done</Button>
142
+ <Button variant="link">Open</Button>
143
+
144
+ // After
145
+ <Button variant="primary">Save</Button> // cta → primary (no brand green; theme-aware high contrast)
146
+ <Button variant="primary">Done</Button> // contrast → primary (same recipe, renamed)
147
+ <Button as="a" href="…" variant="ghost">Open</Button> // link → ghost (or plain <a> for inline text links)
148
+ ```
149
+
150
+ **New tokens**: `--surface-overlay-soft` and `--surface-overlay-strong` — alpha overlays of the opposite-theme color, used by `SectionCard` header strip and `DashboardCard` fill so cards read consistently on any surface.
151
+
152
+ **Other**:
153
+ - DashboardCard radius reduced to `rounded-xl` and padding tightened to `px-4 py-3` for better grid density.
154
+ - SectionCard wrapper no longer fills its background — header strip + border carry definition.
155
+ - Dark `surface2` / `surface3` darkened slightly (16.84% → 16%, 19.13% → 18%) so the main frame reads as a distinct surface.
156
+ - Dark `border1` / `border2` alphas bumped (6% → 7%, 10% → 11%) for closer dark/light parity.
157
+ - Removed deprecated `--section-card-*` tokens and their `@utility` blocks.
158
+
159
+ ### Patch Changes
160
+
161
+ - Updated dependencies [[`c272d50`](https://github.com/mastra-ai/mastra/commit/c272d50610a54496b6b6d92ccd4d37b333a2613a), [`d8692af`](https://github.com/mastra-ai/mastra/commit/d8692afa253028e39cdce2aafa0ac414071a762e), [`841a222`](https://github.com/mastra-ai/mastra/commit/841a222560d8c19238f8213713f30535cdd82284)]:
162
+ - @mastra/core@1.36.0-alpha.4
163
+ - @mastra/client-js@1.20.0-alpha.4
164
+ - @mastra/react@0.4.0-alpha.4
165
+
166
+ ## 29.0.0-alpha.3
167
+
168
+ ### Minor Changes
169
+
170
+ - Removed `ButtonWithTooltip` from `@mastra/playground-ui`. Use `Button` with the `tooltip` prop instead. ([#16719](https://github.com/mastra-ai/mastra/pull/16719))
171
+
172
+ **Migration**
173
+
174
+ ```tsx
175
+ // before
176
+ import { ButtonWithTooltip } from '@mastra/playground-ui';
177
+
178
+ <ButtonWithTooltip tooltipContent="Search">
179
+ <Search />
180
+ </ButtonWithTooltip>;
181
+
182
+ // after
183
+ import { Button } from '@mastra/playground-ui';
184
+
185
+ <Button tooltip="Search">
186
+ <Search />
187
+ </Button>;
188
+ ```
189
+
190
+ `tooltip` supports the same values as `tooltipContent`. Icon-only buttons that pass a string `tooltip` now also get it as their `aria-label` automatically, matching how labelled controls have always behaved. Pass an explicit `aria-label` to override.
191
+
192
+ ### Patch Changes
193
+
194
+ - The Traces list now updates live via delta polling. Previously the list was refetched every 10 seconds, replacing the whole page with no signal about what changed; now new traces appear within a few seconds of being created, with a brief highlight to draw attention. Status changes on already-visible rows (running → success / error) also propagate without intervention, and returning to the tab after being idle re-syncs from a fresh cursor. ([#16727](https://github.com/mastra-ai/mastra/pull/16727))
195
+
196
+ **New `useTraces` return fields**
197
+ - `isRefetching` — true while any meaningful refetch is in flight. Use it to drive a heartbeat indicator.
198
+ - `autoRefetch` / `setAutoRefetch` — pause / resume all automatic polling so the consumer can render an opt-out toggle.
199
+ - `recentlyAddedKeys` — `Set<string>` of `traceId:spanId` for rows that just arrived via delta polling. Drives the temporary highlight in `TracesListView`.
200
+
201
+ **New polling config**
202
+
203
+ Every timing in the hook is tunable per-instance via a new `polling` option:
204
+
205
+ ```ts
206
+ import { useTraces, type TracesPollingConfig } from '@mastra/playground-ui';
207
+
208
+ useTraces({
209
+ filters,
210
+ listMode,
211
+ polling: {
212
+ deltaPollIntervalMs: 10_000,
213
+ idleGuardThresholdMs: 5 * 60_000,
214
+ },
215
+ });
216
+ ```
217
+
218
+ Omitted fields fall through to the defaults (delta poll every 5s, idle reset after 15 min, status refresh every 60s, etc).
219
+
220
+ **TracesListView**
221
+
222
+ New optional `recentlyAddedKeys?: Set<string>` prop. Rows whose `traceId:spanId` is in the set get the `animate-row-highlight` class — a brief fade-out to transparent, added to `index.css`.
223
+
224
+ **Compatibility**
225
+
226
+ Requires `@mastra/server` and `@mastra/client-js` at the versions that ship the observability delta-polling endpoints, and a store that opts into delta polling (`@mastra/clickhouse`, `@mastra/duckdb`, and the in-memory store today). When unavailable — older server or a store without delta capability — the hook silently falls back to page-mode interval refetching. No consumer changes required.
227
+
228
+ - Updated dependencies [[`5556cc1`](https://github.com/mastra-ai/mastra/commit/5556cc1befec71518d84f826b3bfe3a079a9daf7), [`5499303`](https://github.com/mastra-ai/mastra/commit/54993032c1ebc09642625b78d2014e0cf84a3cae), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`e47bca7`](https://github.com/mastra-ai/mastra/commit/e47bca7b72866d3abd173b9f530ac4318113a8ff), [`0031d0f`](https://github.com/mastra-ai/mastra/commit/0031d0f13831d7843ac5d498734a7d92862e2ce3), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`359439b`](https://github.com/mastra-ai/mastra/commit/359439bb8c635e048176306828195f8297f50021)]:
229
+ - @mastra/core@1.36.0-alpha.3
230
+ - @mastra/client-js@1.20.0-alpha.3
231
+ - @mastra/react@0.4.0-alpha.3
232
+
233
+ ## 29.0.0-alpha.2
234
+
235
+ ### Patch Changes
236
+
237
+ - Updated dependencies [[`5ba7253`](https://github.com/mastra-ai/mastra/commit/5ba7253745c85e8df8012a76d954c640ffa336f7), [`6b25032`](https://github.com/mastra-ai/mastra/commit/6b250329fa4795b4d085cba4077c7998893c1d59), [`f73980d`](https://github.com/mastra-ai/mastra/commit/f73980d651eb5f7f1ab20582de4615a1b6f10fce), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`4e88dc6`](https://github.com/mastra-ai/mastra/commit/4e88dc6b89f154c0eae37221c8126be0c23c569f), [`19018f0`](https://github.com/mastra-ai/mastra/commit/19018f05722af74a5978781a7731a654b26f7f2a)]:
238
+ - @mastra/core@1.36.0-alpha.2
239
+ - @mastra/client-js@1.20.0-alpha.2
240
+ - @mastra/react@0.4.0-alpha.2
241
+
3
242
  ## 29.0.0-alpha.1
4
243
 
5
244
  ### Patch Changes