@mastra/playground-ui 27.0.0-alpha.10 → 27.0.0-alpha.14

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 (44) hide show
  1. package/CHANGELOG.md +246 -0
  2. package/dist/index.cjs.js +875 -444
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.css +279 -88
  5. package/dist/index.es.js +861 -439
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/domains/traces/components/format-hierarchical-spans.d.ts +7 -1
  8. package/dist/src/domains/traces/components/index.d.ts +1 -0
  9. package/dist/src/domains/traces/components/span-data-panel-view.d.ts +7 -1
  10. package/dist/src/domains/traces/components/trace-data-panel-view.d.ts +7 -1
  11. package/dist/src/domains/traces/components/traces-list-mode-toggle.d.ts +12 -0
  12. package/dist/src/domains/traces/components/traces-list-view.d.ts +8 -1
  13. package/dist/src/domains/traces/components/traces-toolbar.d.ts +5 -1
  14. package/dist/src/domains/traces/hooks/index.d.ts +2 -0
  15. package/dist/src/domains/traces/hooks/use-branch.d.ts +52 -0
  16. package/dist/src/domains/traces/hooks/use-trace-list-navigation.d.ts +7 -2
  17. package/dist/src/domains/traces/hooks/use-trace-or-branch-spans.d.ts +25 -0
  18. package/dist/src/domains/traces/hooks/use-trace-url-state.d.ts +12 -1
  19. package/dist/src/domains/traces/trace-filters.d.ts +3 -0
  20. package/dist/src/ds/components/Button/Button.d.ts +1 -1
  21. package/dist/src/ds/components/ButtonsGroup/buttons-group.d.ts +30 -5
  22. package/dist/src/ds/components/ButtonsGroup/buttons-group.stories.d.ts +5 -0
  23. package/dist/src/ds/components/Combobox/combobox-styles.d.ts +19 -11
  24. package/dist/src/ds/components/Combobox/combobox.d.ts +3 -3
  25. package/dist/src/ds/components/Combobox/combobox.stories.d.ts +1 -0
  26. package/dist/src/ds/components/Combobox/index.d.ts +1 -0
  27. package/dist/src/ds/components/Command/command.d.ts +1 -1
  28. package/dist/src/ds/components/Input/input.d.ts +2 -2
  29. package/dist/src/ds/components/InputGroup/index.d.ts +1 -0
  30. package/dist/src/ds/components/InputGroup/input-group.d.ts +44 -0
  31. package/dist/src/ds/components/InputGroup/input-group.stories.d.ts +17 -0
  32. package/dist/src/ds/components/PropertyFilter/property-filter-applied.d.ts +11 -1
  33. package/dist/src/ds/components/PropertyFilter/property-filter-creator.d.ts +7 -1
  34. package/dist/src/ds/components/ScrollArea/scroll-area.d.ts +28 -7
  35. package/dist/src/ds/components/ScrollArea/scroll-area.stories.d.ts +4 -0
  36. package/dist/src/ds/components/StatusBadge/StatusBadge.d.ts +1 -1
  37. package/dist/src/ds/components/Tabs/tabs-list.d.ts +8 -2
  38. package/dist/src/ds/components/Tabs/tabs.stories.d.ts +2 -0
  39. package/dist/src/ds/components/Textarea/textarea.d.ts +2 -2
  40. package/dist/src/index.d.ts +1 -1
  41. package/package.json +6 -7
  42. package/dist/src/ds/components/Threads/index.d.ts +0 -1
  43. package/dist/src/ds/components/Threads/threads.d.ts +0 -28
  44. package/dist/src/ds/components/Threads/threads.stories.d.ts +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,251 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 27.0.0-alpha.14
4
+
5
+ ### Minor Changes
6
+
7
+ - Added an "All traces, nested too" mode to the Observability → Traces page. ([#16479](https://github.com/mastra-ai/mastra/pull/16479))
8
+
9
+ The traces list now has a switcher in the toolbar to toggle between two views:
10
+ - **Top-level traces only** (default) — one row per top-level run, the existing behavior.
11
+ - **All traces, nested too** — one row per invocation, including every agent, workflow, tool, processor, scorer, and RAG ingestion that ran nested inside another run.
12
+
13
+ This makes it possible to find every invocation of a given entity (e.g. "every run of `recipe-maker` workflow") regardless of how it was triggered. Selecting a row in the new mode opens a detail panel showing just that branch's subtree.
14
+
15
+ **New hooks** for consumers building their own observability UIs:
16
+ - `useBranch({ traceId, spanId, depth? })` — fetches the span subtree rooted at an anchor span.
17
+ - `useTraceOrBranchSpans({ traceId, spanId, listMode })` — returns trace spans or a branch subtree depending on the active mode.
18
+
19
+ - **Added** new `pill-ghost` variant on `Tabs` and `sticky` prop on `TabList` for sticky tab headers. ([#16433](https://github.com/mastra-ai/mastra/pull/16433))
20
+
21
+ ```tsx
22
+ <Tabs defaultTab="overview">
23
+ <TabList variant="pill-ghost" sticky>
24
+ <Tab value="overview">Overview</Tab>
25
+ <Tab value="settings">Settings</Tab>
26
+ </TabList>
27
+ </Tabs>
28
+ ```
29
+
30
+ **Added** `variant` prop on `Combobox` (`default`, `ghost`, `link`) for flexible trigger styling. Note: this prop existed previously but was a no-op; it now actually drives the trigger appearance, so callers passing `variant` will see updated styles.
31
+
32
+ ```tsx
33
+ // Bordered form input (default)
34
+ <Combobox options={options} value={value} onValueChange={setValue} />
35
+
36
+ // Borderless, hover-only surface
37
+ <Combobox options={options} value={value} onValueChange={setValue} variant="ghost" />
38
+
39
+ // Text-only trigger
40
+ <Combobox options={options} value={value} onValueChange={setValue} variant="link" />
41
+ ```
42
+
43
+ **Improved** `EntityHeader` layout — title and children now share a single row with wrapping, and padding is tighter for denser headers.
44
+
45
+ **Improved** `ScrollArea` to handle vertical/horizontal orientation correctly, preventing forced horizontal scroll when only vertical is needed.
46
+
47
+ **Improved** `PanelSeparator` with a pill-shaped handle that grows on hover/active for a clearer affordance.
48
+
49
+ **Removed** `Threads`, `ThreadList`, `ThreadItem`, `ThreadLink`, `ThreadDeleteButton` exports. These had no consumers outside this repository. Downstream users relying on these exports should compose an equivalent list locally using the underlying DS primitives (`Button`, `Icon`, `Txt`) — the `playground` package now contains a reference implementation under `src/components/thread-list`.
50
+
51
+ ```diff
52
+ - import { Threads, ThreadList, ThreadItem, ThreadLink, ThreadDeleteButton } from '@mastra/playground-ui';
53
+ + // Compose locally with @mastra/playground-ui primitives (Button, Icon, Txt)
54
+ + // or copy the reference implementation from the playground package.
55
+ ```
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies [[`f984b4d`](https://github.com/mastra-ai/mastra/commit/f984b4d6c60bf2ae2a9b156f0e8c35a66fe96c91), [`ce01024`](https://github.com/mastra-ai/mastra/commit/ce010242eee9bdfc09e4c26725b9d37998679a8d), [`f984b4d`](https://github.com/mastra-ai/mastra/commit/f984b4d6c60bf2ae2a9b156f0e8c35a66fe96c91), [`8373ff4`](https://github.com/mastra-ai/mastra/commit/8373ff46745d77af79f183c4470f80fa2727a6b2), [`11c1528`](https://github.com/mastra-ai/mastra/commit/11c152848c5d0ef227184853b5040f5b41ee7b1e)]:
60
+ - @mastra/core@1.33.0-alpha.13
61
+ - @mastra/client-js@1.18.0-alpha.14
62
+ - @mastra/react@0.2.36-alpha.14
63
+
64
+ ## 27.0.0-alpha.13
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [[`b59316f`](https://github.com/mastra-ai/mastra/commit/b59316ffa0f7688165b0f9c81ccdf85da461e5b2), [`55f1e2d`](https://github.com/mastra-ai/mastra/commit/55f1e2d65425b95a49ae788053b266f256e38c96), [`19a2b5e`](https://github.com/mastra-ai/mastra/commit/19a2b5eda9d93f6e1026e0c84f3c1f1c85700a9f), [`d48a705`](https://github.com/mastra-ai/mastra/commit/d48a705ff3dfbdc7a996e07ecd8293b5effd9a2a)]:
69
+ - @mastra/core@1.33.0-alpha.12
70
+ - @mastra/client-js@1.18.0-alpha.13
71
+ - @mastra/react@0.2.36-alpha.13
72
+
73
+ ## 27.0.0-alpha.12
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [[`37c0dc5`](https://github.com/mastra-ai/mastra/commit/37c0dc5697d343db98628bf867bf71ce6deec6d7), [`ef6b584`](https://github.com/mastra-ai/mastra/commit/ef6b5847ac33c0a7e80af3a86e8801e2933dd3ee), [`4dd900d`](https://github.com/mastra-ai/mastra/commit/4dd900d75dfe9be89f8c15188b368a8622aa1e18), [`4ff5bdf`](https://github.com/mastra-ai/mastra/commit/4ff5bdfe170cba6dfb5260c6af0f4ba668430772), [`bbcd93c`](https://github.com/mastra-ai/mastra/commit/bbcd93cf7d8aa1007d6d84bfd033b8015c912087), [`308bd07`](https://github.com/mastra-ai/mastra/commit/308bd074f35cef0c75d82fc1eb19382fe04ecf6f)]:
78
+ - @mastra/core@1.33.0-alpha.11
79
+ - @mastra/client-js@1.18.0-alpha.12
80
+ - @mastra/react@0.2.36-alpha.12
81
+
82
+ ## 27.0.0-alpha.11
83
+
84
+ ### Minor Changes
85
+
86
+ - **Updated agent traces tab to use the rich observability traces UI** ([#16405](https://github.com/mastra-ai/mastra/pull/16405))
87
+
88
+ The agent traces tab now shows the dense 7-column trace list with a side-panel detail view featuring colored timeline spans (Agent/Workflow/Model/Scorer), expandable nested spans, Evaluate Trace, and Save as Dataset Item.
89
+
90
+ **Locked scope filter pills**
91
+
92
+ When viewing agent-scoped traces, the Primitive Type and Primitive ID filter pills are now read-only — they display the agent context, show a lock icon and tooltip, and cannot be edited or removed. The Add Filter dropdown no longer lists scope-controlled fields so users cannot accidentally override the active scope.
93
+
94
+ `PropertyFilterApplied` accepts a new `lockedFieldIds` (and optional `lockedTooltipContent`) prop. `PropertyFilterCreator` accepts a new `hiddenFieldIds` prop. Both are opt-in and unset by default, so existing usages are unaffected.
95
+
96
+ ```tsx
97
+ // Before
98
+ <PropertyFilterApplied fields={fields} tokens={tokens} onTokensChange={setTokens} />
99
+
100
+ // After — pills for the listed fields render locked with a tooltip
101
+ <PropertyFilterApplied
102
+ fields={fields}
103
+ tokens={tokens}
104
+ onTokensChange={setTokens}
105
+ lockedFieldIds={['rootEntityType', 'entityId']}
106
+ lockedTooltipContent="This filter is set by the current context."
107
+ />
108
+ ```
109
+
110
+ - Improved `ScrollArea` to use Base UI internally and added a richer mask API. Edges now fade by default based on `orientation` (top/bottom for vertical, left/right for horizontal, all four for both), so most scrollers get the polished fade-out automatically. ([#16415](https://github.com/mastra-ai/mastra/pull/16415))
111
+
112
+ **Heads up — default behavior change:** `ScrollArea` previously rendered without any edge fade unless `showMask` was passed. It now fades the edges that match `orientation` by default. Pass `mask={false}` on the callsites where you want to keep the old hard edges.
113
+
114
+ **New `mask` prop.** Accepts a boolean (`false` disables the fade entirely) or an object to override individual sides. The `x` and `y` keys are shorthands for the matching axis.
115
+
116
+ ```tsx
117
+ // Default — fades follow `orientation`
118
+ <ScrollArea>...</ScrollArea>
119
+
120
+ // Opt out entirely
121
+ <ScrollArea mask={false}>...</ScrollArea>
122
+
123
+ // Keep only the top fade
124
+ <ScrollArea mask={{ bottom: false }}>...</ScrollArea>
125
+
126
+ // Vertical fades only on a two-axis scroller
127
+ <ScrollArea orientation="both" mask={{ x: false }}>...</ScrollArea>
128
+ ```
129
+
130
+ **Migrating from `showMask`.** The `showMask` boolean is now deprecated but still works — `mask` wins when both are set.
131
+
132
+ ```tsx
133
+ // Before
134
+ <ScrollArea showMask>...</ScrollArea>
135
+ <ScrollArea showMask={false}>...</ScrollArea>
136
+
137
+ // After
138
+ <ScrollArea>...</ScrollArea> // default fade matches orientation
139
+ <ScrollArea mask={false}>...</ScrollArea> // explicitly disable
140
+ ```
141
+
142
+ - Added a new `pill` variant on `TabList` with an animated background indicator that slides behind the active trigger. The default `line` variant now animates its underline smoothly between tabs as well. Implemented by migrating the underlying Tabs component from Radix UI to Base UI. ([#16414](https://github.com/mastra-ai/mastra/pull/16414))
143
+
144
+ ```tsx
145
+ // Before — only the line (underline) style was available
146
+ <Tabs defaultTab="overview">
147
+ <TabList>
148
+ <Tab value="overview">Overview</Tab>
149
+ <Tab value="projects">Projects</Tab>
150
+ </TabList>
151
+ </Tabs>
152
+
153
+ // After — opt into the new pill style via the `variant` prop on TabList
154
+ <Tabs defaultTab="overview">
155
+ <TabList variant="pill">
156
+ <Tab value="overview">Overview</Tab>
157
+ <Tab value="projects">Projects</Tab>
158
+ </TabList>
159
+ </Tabs>
160
+ ```
161
+
162
+ The public API (`Tabs`, `TabList`, `Tab`, `TabContent`) is unchanged; existing call-sites keep the default `line` variant.
163
+
164
+ - Added `InputGroup` and extended `ButtonsGroup` in playground-ui design system. ([#16417](https://github.com/mastra-ai/mastra/pull/16417))
165
+
166
+ **New `InputGroup` component**
167
+
168
+ Compose inputs with leading or trailing icons, buttons, text labels, and keyboard hints. Supports inline (left/right) and block (top/bottom) addon alignment, and works with both inputs and textareas.
169
+
170
+ ```tsx
171
+ import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupButton } from '@mastra/playground-ui';
172
+ import { SearchIcon, XIcon } from 'lucide-react';
173
+
174
+ <InputGroup>
175
+ <InputGroupAddon>
176
+ <SearchIcon />
177
+ </InputGroupAddon>
178
+ <InputGroupInput placeholder="Search..." />
179
+ <InputGroupAddon align="inline-end">
180
+ <InputGroupButton aria-label="Clear">
181
+ <XIcon />
182
+ </InputGroupButton>
183
+ </InputGroupAddon>
184
+ </InputGroup>;
185
+ ```
186
+
187
+ **Extended `ButtonsGroup`**
188
+
189
+ Added `orientation` (`horizontal` | `vertical`), and new `ButtonsGroupSeparator` and `ButtonsGroupText` slots. Existing API unchanged.
190
+
191
+ ```tsx
192
+ <ButtonsGroup spacing="close">
193
+ <Button variant="outline">−</Button>
194
+ <ButtonsGroupText>42</ButtonsGroupText>
195
+ <Button variant="outline">+</Button>
196
+ </ButtonsGroup>
197
+
198
+ <ButtonsGroup orientation="vertical">
199
+ <Button variant="ghost">Copy</Button>
200
+ <ButtonsGroupSeparator />
201
+ <Button variant="ghost">Cut</Button>
202
+ </ButtonsGroup>
203
+ ```
204
+
205
+ **Tweaked `Button` ghost variant**
206
+
207
+ Aligned hover/active progression with the outline variant (`surface3` → `surface4`) so click feedback is perceptible on transparent backgrounds. Existing ghost buttons throughout the playground will appear one shade lighter on hover and active.
208
+
209
+ ### Patch Changes
210
+
211
+ - Filter pills (`PropertyFilterApplied`) now match the rest of the design system — single 1px border, consistent rounded segments, no custom styling. Labels stay on one line and no longer compress when long values are present. ([#16426](https://github.com/mastra-ai/mastra/pull/16426))
212
+
213
+ `ButtonsGroupText` segments also no longer wrap to multiple lines or shrink under flex pressure, which makes them safer to drop into any tight layout.
214
+
215
+ - **Polished Combobox dropdown items** ([#16411](https://github.com/mastra-ai/mastra/pull/16411))
216
+ - Moved the selection check to the right of each item so unselected rows no longer carry an awkward left padding gap and the whole list aligns consistently.
217
+ - Tightened popup search/empty padding and softened the trigger hover for a calmer command-palette feel.
218
+
219
+ **Added `ComboboxPrimitive` export for advanced compositions**
220
+
221
+ Re-exports the raw `@base-ui/react/combobox` parts (Root, Trigger, Input, List, Item, Chips, etc.) so callers needing virtualization, async status, chips, or creatable patterns can compose them directly with the shared `comboboxStyles` tokens — without growing the monolithic `<Combobox>` prop surface.
222
+
223
+ ```tsx
224
+ import { ComboboxPrimitive, comboboxStyles } from '@mastra/playground-ui';
225
+
226
+ <ComboboxPrimitive.Root items={items}>
227
+ <ComboboxPrimitive.Input className={comboboxStyles.searchInput} />
228
+ <ComboboxPrimitive.Portal>
229
+ <ComboboxPrimitive.Positioner>
230
+ <ComboboxPrimitive.Popup className={comboboxStyles.popup}>
231
+ <ComboboxPrimitive.List className={comboboxStyles.list}>
232
+ {item => (
233
+ <ComboboxPrimitive.Item value={item} className={comboboxStyles.item}>
234
+ {item.label}
235
+ </ComboboxPrimitive.Item>
236
+ )}
237
+ </ComboboxPrimitive.List>
238
+ </ComboboxPrimitive.Popup>
239
+ </ComboboxPrimitive.Positioner>
240
+ </ComboboxPrimitive.Portal>
241
+ </ComboboxPrimitive.Root>;
242
+ ```
243
+
244
+ - Updated dependencies [[`7ad5585`](https://github.com/mastra-ai/mastra/commit/7ad55856406f1de398dc713f6a9eaa78b2784bb6), [`210ea7a`](https://github.com/mastra-ai/mastra/commit/210ea7af559791b73a44fc9c12179908aaa3183f), [`83218c8`](https://github.com/mastra-ai/mastra/commit/83218c88b37773c9424fbe733b37be556e55e94d), [`265ec9f`](https://github.com/mastra-ai/mastra/commit/265ec9f887b5c81255c873a76ff7796f16e4f99b), [`6ce80bf`](https://github.com/mastra-ai/mastra/commit/6ce80bf4872a891e0bddf8b80561a80584efb14b), [`9268531`](https://github.com/mastra-ai/mastra/commit/9268531e7ec4be98beeba3b3ae8be0a7ea380662), [`13ead79`](https://github.com/mastra-ai/mastra/commit/13ead79149486b88144db7e11e6ff551caef5be1), [`bd36d8e`](https://github.com/mastra-ai/mastra/commit/bd36d8eb6de8c9a0310352649dbd4b06703c2299), [`8ac9141`](https://github.com/mastra-ai/mastra/commit/8ac9141439caa8fdd674944c4d84f29b3c730296)]:
245
+ - @mastra/core@1.33.0-alpha.10
246
+ - @mastra/client-js@1.18.0-alpha.11
247
+ - @mastra/react@0.2.36-alpha.11
248
+
3
249
  ## 27.0.0-alpha.10
4
250
 
5
251
  ### Patch Changes