mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
2,745 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d60ba71be0 | chore: version - exit prerelease mode | ||
|
|
5c87442ed7 |
chore: version packages (alpha) (#30203)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/auth-auth0@1.3.0-alpha.0 ## @mastra/auth-clerk@1.4.0-alpha.0 ## @mastra/auth-okta@0.3.0-alpha.0 ## @mastra/auth-supabase@1.2.0-alpha.0 ## @mastra/client-js@1.60.0-alpha.13 ## @mastra/auth@1.2.0-alpha.0 ## @mastra/core@1.83.0-alpha.13 ## @mastra/playground-ui@69.0.0-alpha.15 ## @mastra/rag@2.8.0-alpha.3 ## @mastra/server@1.83.0-alpha.13 ## @mastra/server-adapters-test-suite@0.3.0-alpha.5 ## @mastra/auth-better-auth@1.1.11-alpha.2 ## @mastra/auth-cloud@1.2.9-alpha.0 ## @mastra/auth-neon@0.3.6-alpha.1 ## @mastra/auth-workos@1.6.9-alpha.0 ## @mastra/discord@1.3.4-alpha.0 ## @mastra/react@1.15.0-alpha.13 ## @mastra/deployer-cloud@1.83.0-alpha.13 ## @mastra/deployer-cloudflare@1.2.42-alpha.3 ## @mastra/deployer-netlify@1.2.42-alpha.1 ## @mastra/deployer-sandbox@0.3.27-alpha.1 ## @mastra/deployer-vercel@1.2.42-alpha.1 ## @mastra/longmemeval@1.1.42-alpha.13 ## @mastra/opencode@0.1.42-alpha.13 ## @mastra/factory@0.28.0-alpha.15 ## create-factory@0.4.3-alpha.15 ## @mastra/code-sdk@1.19.0-alpha.15 ## mastracode@0.50.0-alpha.14 ## @mastra/agent-builder@1.2.1-alpha.5 ## mastra@1.39.0-alpha.15 ## @mastra/connect@1.4.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.13 ## @mastra/editor@0.17.1-alpha.7 ## @mastra/mcp@2.9.0-alpha.5 ## @mastra/mcp-docs-server@1.3.13-alpha.17 ## @mastra/memory@1.41.1-alpha.5 ## @mastra/schema-compat@1.4.0-alpha.2 ## @mastra/elysia@0.1.23-alpha.13 ## @mastra/express@1.5.27-alpha.13 ## @mastra/fastify@1.5.27-alpha.13 ## @mastra/hono@1.7.25-alpha.13 ## @mastra/koa@1.7.27-alpha.13 ## @mastra/nestjs@0.3.0-alpha.13 ## @mastra/next@0.2.41-alpha.13 ## @mastra/tanstack-start@0.2.41-alpha.13 ## @mastra/voice-google-gemini-live@0.14.19-alpha.2 ## @mastra/voice-openai-realtime@0.14.9-alpha.3 ## @mastra/voice-xai-realtime@0.2.18-alpha.2 ## @mastra/inngest@1.11.2-alpha.9 ## @mastra/temporal@0.6.0-alpha.13 ## create-mastra@1.39.0-alpha.15 ## @internal/playground@1.39.0-alpha.15 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
6ad8e7eb9d |
feat(ui): one settings layout across Studio, Factory and Platform (#29400)
## Description Settings pages in Studio, Factory and Platform each had their own layout: different widths, section headers with buttons, add rows at the bottom of lists, fields starting at different x positions. This gives all three one layout, built from reusable Playground UI components: - A 640px page column with the title above the sections. - Each section is a dimmed title above one borderless card. The card owns all row spacing (14px padding, inset hairlines), so rows carry no padding of their own. - Settings rows: label and description on the left, control on the right. Text fields share one width, selects hug their value up to that width, switches and buttons keep their size. - Lists: a count and the list's action in a header row at the top of the card, one empty row (text plus the same action) when there's nothing in it, and `SettingsItem` rows with one icon tile size, so every list lines up. - Input, InputGroup and select values use the regular-weight `text-body-sm`, like Textarea. This is the Playground UI, Studio and Factory half. The Platform half, mastra-ai/platform#4174, pins a snapshot of this branch. ## Before / After Every settings page in Studio and Factory, `origin/main` on the left and this branch on the right (1440×1800, dark). Platform's pages are in mastra-ai/platform#4174. | Before | After | | --- | --- | | <br>Studio · Settings | <br>Studio · Settings | | <br>Factory · My account | <br>Factory · My account | | <br>Factory · Preferences | <br>Factory · Preferences | | <br>Factory · Connections | <br>Factory · Connections | | <br>Factory · Models | <br>Factory · Models | | <br>Factory · Memory | <br>Factory · Memory | | <br>Factory · Skills | <br>Factory · Skills | | <br>Factory · Tools | <br>Factory · Tools | | <br>Factory · Behavior | <br>Factory · Behavior | | <br>Factory · Repositories | <br>Factory · Repositories | | <br>Factory · Work Intake | <br>Factory · Work Intake | | <br>Factory · Work board | <br>Factory · Work board | | <br>Factory · Manage Factory | <br>Factory · Manage Factory | One loading state everywhere (`SettingsSkeleton`, New/Settings Loading story), built from the real rows and list items:  ## What changed Playground UI (`@mastra/playground-ui/new/settings`): - `SettingsLayout`: the page column and title (`header` for an app's own header). - `SettingsTitle`: dimmed, inset to the card; `info` keeps a section description as a tooltip. - `SettingsContainer`: the card, owning row spacing. Rows with nothing in them take no space, so a list can always render its notice row. - `SettingsRow` / `SettingsFieldsetRow`: control column with shared field width; selects hug (`fieldTriggerWidthStyle` reads `--field-max-width`). With `controlPlacement="below"` the control fills the row. - New `SettingsListHeader`, `SettingsEmptyRow` (now takes an `action`), `SettingsItem`, `SettingsItemIcon`. `SettingsNoticeRow` stays. - New `SettingsSkeleton`: the one loading state for settings, placeholder rows (`variant="row"`) or list items (`variant="item"`) inside the same card. - Removed `SettingsAddRow` and `SettingsContainer`'s `variant`. `Section`'s deprecated rows keep their old look on their own code. Studio: the settings page uses `SettingsLayout` with its title in the column. URL, API prefix and request headers are one "Mastra connection" card. They only work as a set, so edits stay a draft: an "Unsaved changes · Discard · Save changes" row shows up once something changed, and saving applies all of it at once. This replaces "Save configuration", which sat under the headers and read as saving only them. The first-run connect screen keeps its own form. `@mastra/react`: `useAuthCapabilities` and `usePermissionPatterns` keep their last result while a new client loads (`keepPreviousData`). Before, every connection change gave them a new query key, and the auth and permission guards showed a full-page spinner until it answered, so the page went blank on each save. Factory: every settings page is on the shared components. Section stacks are fragments under `SettingsLayout`, lists with an action use the header or empty row (repositories, custom providers, speech-to-text keys, Connect, intake pickers), and logo and icon rows are `SettingsItem`s. Factory's own `SettingsAddRow`, `SettingsActionRow`, `SettingsSectionHeader` and `SettingsRowsSkeleton` are gone. Every settings loading state is `SettingsSkeleton` (Skills used to show plain "Loading skills…" text). Models keeps its routing diagram; its lane and defaults cards use the borderless settings surface. Work board keeps its form layout. Memory is split into Personal memory and Factory memory, and Build history is its own section. ## Testing 1. `mdev up storybook`: New/Settings, Page, Controls and Loading stories. 2. `mdev up studio`, open Settings: change the URL, prefix or a header and the unsaved row appears; Discard restores; Save applies everything without the page going blank. Change the theme. 3. Factory settings: every section, especially Models. Playground UI, Studio and Factory typecheck clean; the settings, Studio connection, Factory settings and Models tests pass, and CI is green. Not seen locally: a loading state on screen (they resolve too fast), Models with providers connected, and Factory's Memory form (no models in the local org). ## Related issue(s) Fixes PLTFRM-3135 ## Type of change - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [x] I have linked the related issue(s) in the description above - [ ] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes settings pages in Playground UI, Studio, and Factory use a more consistent layout. It adds shared building blocks so settings and lists are easier to organize and read. ## Summary - Add shared settings components in Playground UI, including a centered 640px layout, consistent containers and rows, list headers, empty and notice rows, and settings items. - Update the Playground settings page and Studio connection form to use the shared layout. Add `CopyInput` for read-only values with a copy action. - Update Factory settings, workspace, and connection views to use the shared components. Separate Personal memory and Factory memory, and give Build history its own section. - Remove older layout helpers, including `SettingsAddRow`, `SettingsSectionHeader`, and the settings container variant. - Add or update component tests and Storybook examples for the new settings patterns. **Checks:** not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
05a6931471 |
chore: version packages (alpha) (#30172)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases ## @mastra/client-js@1.60.0-alpha.12 ### Minor Changes - Allow `querySpans()` to sort by `model` or `provider`. ([#30096](https://github.com/mastra-ai/mastra/pull/30096)) ```ts orderBy: [{ field: 'model', direction: 'asc' }]; ``` ### Patch Changes - The generated route types for scores now include the `SCORER` and `PROCESSOR` entity types, matching the entity types experiments can emit. ([#30145](https://github.com/mastra-ai/mastra/pull/30145)) - Add span-local error counts. ([#30088](https://github.com/mastra-ai/mastra/pull/30088)) - Updated dependencies [[`56f654f`]( |
||
|
|
43d1e9c16d |
fix(ui): fix hover highlight not covering the corner (#30047)
Hovering a card (the credits card in Platform's sidebar, project cards, any clickable `Card`) tinted a second rounded shape 1-2px inside the card, so a thin untinted ring showed along the edge, widest at the corners. Now the hover tint is the surface's own background, so it covers the whole surface and follows any corner radius exactly. The fix is in the shared `state-layer` utility, so every surface that uses it changes. ## Before / After Hovered, dark, zoomed 4x on the bottom-left corner. Look for the darker crescent at the corner in "Before". | | Before | After | | --- | --- | --- | | Platform project card | <img src="https://github.com/user-attachments/assets/7ed1f23b-c0f0-45b0-8313-f1b3ff39058c" width="300" alt="Before project"> | <img src="https://github.com/user-attachments/assets/bb3a627a-668a-4002-9392-57dc8f5f3520" width="300" alt="After project"> | | Platform credits card | <img src="https://github.com/user-attachments/assets/88896a43-4a0f-451f-950f-865d8917b2cf" width="300" alt="Before credits"> | <img src="https://github.com/user-attachments/assets/04700558-04ee-4ece-a240-428964035c48" width="300" alt="After credits"> | | `CardLink` | <img src="https://github.com/user-attachments/assets/00675559-99de-4ccf-ac54-d87c53ac74b9" width="300" alt="Before card"> | <img src="https://github.com/user-attachments/assets/bbe15805-fd38-4282-88da-3ca12efc94fd" width="300" alt="After card"> | | Composer attachment | <img src="https://github.com/user-attachments/assets/6bdf4093-2dad-4a83-85be-003dcdc93a7d" width="300" alt="Before attachment"> | <img src="https://github.com/user-attachments/assets/d325d318-7eea-4554-b489-12b7f7c011b7" width="300" alt="After attachment"> | | Workflow edge Data button | <img src="https://github.com/user-attachments/assets/580d836d-6cc0-4f78-87bb-f559d9c614d7" width="300" alt="Before edge"> | <img src="https://github.com/user-attachments/assets/a0c68b78-0e34-43e4-b102-eb1d81dd8c15" width="300" alt="After edge"> | | Ask-user option | <img src="https://github.com/user-attachments/assets/7611683d-9b2c-453a-a674-a3f9b5950272" width="300" alt="Before ask"> | <img src="https://github.com/user-attachments/assets/105ad584-4a9c-4f18-b10b-f3cf553ef00b" width="300" alt="After ask"> | ## What changed - `state-layer` paints its hover/press tint as a flat `background-image` over the element's fill, instead of a `::before` overlay inset by 1px. The browser clips it to the element's own shape, borders and inset-shadow rims draw over it, and `position`, `isolation` and the negative z-index are gone. `surfaceGroupStateLayerStyle` does the same. - Two consumers painted on the old layer and move to the new one: the composer attachment's dark fill goes to `--surface-tint`, and the edge Data button's selected fill becomes the same `--fill` image the utility uses for press. - 14 files only re-sort the `state-layer` class (the formatter orders it with the background utilities now). ## Why The overlay existed to keep the tint layered over an opaque fill (swapping `background-color` for a translucent rung makes the surface see-through) and to let it fade. It was shrunk 1px so it wouldn't cover the inset rim, which is what made the second shape. A background image keeps the layering and needs no shrinking. It can't fade, so these hovers are now instant, in line with the other instant-hover changes. ## Testing 1. Platform home: hover a project card. The tint reaches the edge, no darker crescent at the corner. Same for the sidebar Credits card. 2. Storybook, Layout/Card "Interactive links", AI/Composer attachments, Workflows/Edge data, AI/Ask user: hover each. Same result. 3. Workflows/Edge data "External inspector": click Data, move the pointer away. It keeps the selected fill. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes hover and press highlights cover the full shape of cards and buttons. Highlights now follow rounded corners, remain below borders and inner shadows, and switch instantly. ## Summary - Replaced the inset `::before` state layer with clipped `background-image` fills. - Updated grouped surfaces to use the same highlight approach. - Moved composer attachment fills to `--surface-tint`. - Preserved the selected fill for the workflow edge Data button. - Updated state-layer documentation and the theme export test. - Reordered `state-layer` classes in affected consumers. - Added a patch changeset for `@mastra/playground-ui`. **Scope:** 21 files changed; 48 insertions and 63 deletions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f9088d8510 |
feat(mcp-apps-components): accept the editor's widget shapes in chat-authored dashboards (#30192)
Dashboards authored in chat rejected several widgets the dashboard
editor can build, so a model couldn't recreate what a user had in the
editor. This widens the shared option schemas in `@mastra/playground-ui`
and the renderers behind them, and the chat authoring schema in
`@mastra/mcp-apps-components` picks the changes up.
KPIs can now combine values (`ratio`, `minus`, `max`, `coalesce`), read
score, trace and span aggregates, and use the `duration`, `percent` and
`score` formats. Percentiles come through trace/span measures, which
give one whole-range value (metric percentiles are always bucketed, so
they can't make a single KPI figure). KPIs now also request the previous
window, so combined values show a change:
```ts
{
label: 'Error rate',
format: 'percent',
value: {
ratio: {
of: { traceAggregate: { measure: 'errorCount', compare: 'previousWindow' } },
over: { traceAggregate: { measure: 'count', compare: 'previousWindow' } },
},
},
}
// p95 latency
{ label: 'p95 latency', format: 'duration', value: { traceAggregate: { measure: 'duration.p95', compare: 'previousWindow' } } }
```
Line charts can plot `scoreTimeSeries`, and charts accept `blue`,
`orange`, `pink`, `yellow`, `red` and `purple`, all mapped to existing
data-viz tokens. KPI `icon` and `detail`, series `color` and table
`emptyMessage` are now optional: series without a color take one from a
palette by position, and tables without a message show "No data". Metric
types in the discovery API (counter vs. histogram) are not part of this
PR.
Tested with new widget tests that open dashboards through the real tool:
p95 latency and error-rate KPIs compared with the previous window, plus
a score line chart and a table that set no colors or empty message. The
KPI test fails against the old KPI request plan. Typecheck, lint and the
existing suites pass in both packages.
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
a4258a989c |
chore: version packages (alpha) (#30127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
055a8c3b82 | chore: version packages | ||
|
|
9e82af0237 |
chore: version packages (alpha) (#30074)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
3a6ca42696 |
chore: version packages (alpha) (#30026)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
c2952f1b81 |
test(playground-ui): correct trace list fade expectations (#30068)
The Traces list test expects a 2rem edge fade, but the shared DataList uses 1.25rem. Update the two stale assertions without changing UI behavior. This fixes the unrelated unit-test failure seen on #30059. Reproduced the failure on latest main; all 26 TracesListView and DataList tests pass after the correction. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR updates two test values to match the fade size used by the list. It fixes stale test expectations without changing the UI. ## Changes - Changed both fade assertions in `traces-list-view.test.tsx` from `2rem` to `1.25rem`. - No production code changed. - Diff: 1 file, 2 additions, 2 deletions. - Test results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ac79ee7af6 |
fix(playground-ui): keep expandable dashboard card titles renameable (#30064)
When a host passes `expand` to `DashboardRenderer`, the card title
turned into the expand link. `ChartCard` renders a link in preference to
the edit input, so `onTitleChange` was silently ignored and those cards
(e.g. Token usage) couldn't be renamed.
This moves the expand link into the card's actions as an "Expand
<title>" `MetricsCard.Action`, shown on hover/focus like the other card
actions. The title stays plain, so it stays editable. `ChartCard`'s own
`href` prop is untouched, and cards with nowhere to expand to look the
same as before.
```tsx
// before: the title is the expand link, so renaming does nothing
// after: the title is editable, and the expand link is a card action
<DashboardRenderer expand={{ href: w => `/query?metric=${w.id}`, LinkComponent }} ... />
```
Tested with the dashboard and chart-card suites, plus a new regression
test in `stateless-widget.test.tsx` that renames a card that expands (it
fails on the old code).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
Expandable dashboard cards now keep their titles editable. The expand
link appears as an “Expand <title>” action on hover or focus.
## Changes
- Added `ExpandAction` with a maximize icon.
- Updated timeseries and scores cards to use the expand action.
- Kept the views menu when no expand destination exists.
- Updated dashboard types and documentation.
- Added regression tests for expandable-card renaming and action links.
- Updated changesets for `@mastra/playground-ui`.
## Verification
- 11 files changed: 102 additions and 46 deletions.
- Test results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
90e7abd99a |
feat(playground-ui): support host-selected trace root sources (#30060)
Adds an optional `rootSource` prop to `TracesExplorer` so a host can opt into aggregated trace roots. Omitted/legacy keeps existing behavior. Switching sources resets the list observer and cursor chain so previous-source rows are not shown during loading. Aggregated requests use page refresh instead of delta polling and never fall back to `listTracesLight`. The histogram is hidden for aggregated roots because `aggregateTraces` still uses legacy roots. Discovery and filters remain unchanged; unsupported predicates continue to receive server errors. Hosts own the source control and must gate it on server availability. This adds no OSS storage implementation or default UI control. Follow-up to [OBS-891](https://linear.app/kepler-crm/issue/OBS-891) and mastra-ai/platform#4642. After merge: publish a snapshot from main, then add the capability-gated Platform selector. No snapshot has been published for this change yet. Validated with 115 component/MSW tests, package typecheck, declaration emit, package lint, formatting and a production build. Tests and production build pass on Node 24; the local Node 23 runtime is unsupported. The new cases fail against unchanged main. No visual control was added in this prerequisite PR; viewport screenshots belong with the Platform selector. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR lets the host choose where the trace explorer gets its data. When the source changes, the explorer clears old results and loads the new source correctly. ## Changes - Add an optional `rootSource` prop to `TracesExplorer`. - Reset the list provider when `rootSource` changes. - Use aggregated trace queries without legacy fallback or delta polling. - Hide the legacy histogram for aggregated roots. - Preserve existing behavior when `rootSource` is omitted. - Add coverage for source switching, refresh behavior, errors, and histogram visibility. - Add a minor release changeset for `@mastra/playground-ui`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d546b6c5f2 |
fix(ui): polish DataList and fix scrollbar, fades, pinned column, and header overlap issues (#30055)
DataList now scrolls like one surface inside a fixed card. Rows fade into the dark row background at every edge (the top too, just below the header, which no longer fades). Scrollbars sit beside the rows instead of being clipped by the card's corners. The list no longer bounces. A pinned first column gets a divider once cells scroll under it. And the header row stops cutting into the card's border at the top corners. ## Before / After | | Before | After | | --- | --- | --- | | Scrolled down: the top cut off hard, rows faded into the lighter card | <img src="https://github.com/user-attachments/assets/9087dd93-9951-4f7f-b341-d4eeed098a04" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/748339a1-cc07-40fd-8911-8a9dc87132ea" width="360" alt="After"> | | Scrolled sideways: header titles showed through the pinned column | <img src="https://github.com/user-attachments/assets/d41eceae-fdd0-44e4-b632-ed160c340e87" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/b86a1c3d-1a22-4495-a1db-66c2f66f2e08" width="360" alt="After"> | | Scrollbars ran beside the header and into the corners | <img src="https://github.com/user-attachments/assets/7e30127b-d609-44fb-84e2-eaaab3ecb142" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/c45591ac-3c78-408a-bff0-f99e75ff5b01" width="360" alt="After"> | | Top-left corner, zoomed: the header cut the border | <img src="https://github.com/user-attachments/assets/845af382-1c94-4f81-8cd2-c4d24b41a42f" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/7252de96-9eb9-4863-ac0c-26d0702d31ce" width="360" alt="After"> | <details> <summary>Light mode</summary> | | Before | After | | --- | --- | --- | | Scrolled down | <img src="https://github.com/user-attachments/assets/05efac5f-43d8-44aa-867d-926427d2b2d6" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/55dcfe5b-eef9-40a1-843f-15a7439c8cce" width="360" alt="After"> | | Scrolled sideways | <img src="https://github.com/user-attachments/assets/40319134-3c39-47ca-83ed-60a0053c867e" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/c3facfc8-621f-4316-aca6-8e1842856031" width="360" alt="After"> | | Scrollbars | <img src="https://github.com/user-attachments/assets/674c1110-2b71-4918-bea3-d725343df6a3" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/b17fb87a-53e7-4fee-a433-d7331dc24b61" width="360" alt="After"> | | Top-left corner, zoomed | <img src="https://github.com/user-attachments/assets/eb435671-58cb-48d1-b818-f000077b521d" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/15d0a1ef-7f38-4184-ba54-811471df687f" width="360" alt="After"> | </details> ## What changed - `DataList` root: a dark row "well" is painted behind the rows, so edge fades reveal it instead of the card. The top fade is a gradient under the sticky header, so the header never fades. Fade depth is 1.25rem (was 2rem). Overscroll is off, and the scrolling area is clipped to a concentric 8px radius, which fixes the corner. - Pinned column: the header's pinned cell is filled, pinned cells stop at their own column edge, and a 1px divider shows once cells are scrolled under them. With a pinned column, the left edge doesn't fade. - The `mask` prop keeps its per-side API; `top` now controls the fade below the header. ## Scope - Scroll bounce is off on purpose: with one scroller, a bounce drags the sticky header along. The cost is that the wheel doesn't carry on into the page when a list reaches its end. - The row header text now sits centered with the other cells (it was a few pixels high before); a side effect of ending pinned cells at their column edge. ## Testing 1. `mdev up storybook`, open DataDisplay/DataList → StickyOverflow. 2. Scroll down: rows fade just below the header and at the bottom; the header stays solid. 3. Scroll sideways: a divider appears on the pinned column's edge, and no header title shows through it. 4. Hover the list: the vertical scrollbar starts below the header and stays clear of the corners. 5. Overscroll at either end: nothing bounces. 6. Repeat in light mode (toolbar theme switch). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes `DataList` tables easier to read and scroll. It adds cleaner fades, better pinned-column behavior, rounded clipping, and improved scrollbar placement. ## Changes - Added a top fade below the sticky header without fading the header. - Changed the default fade depth from `2rem` to `1.25rem`. - Preserved per-side `mask` behavior. - Positioned scrollbars beside the rows and below the header. - Disabled overscroll bounce. - Added rounded clipping to the scroll area. - Improved pinned first-column behavior: - Added opaque header and cell backgrounds. - Added a divider when content scrolls beneath the column. - Disabled the left fade when the column is pinned. - Prevented header content from overlapping the card’s top corners. - Adjusted row-header and sticky top-cell spacing. - Updated tests for top-mask behavior and fade defaults. - Added a patch changeset for `@mastra/playground-ui`. ## Scope - 5 files changed. - 125 lines added. - 32 lines removed. ## Testing Not available. The PR description provides manual testing instructions only. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7947e18c2c |
feat(playground-ui): let hosts add their own buttons to dashboard widgets (#30043)
Dashboard widgets only knew how to show a pin button:
`DashboardRenderer` took `onPin`/`isPinned` and `StatelessWidget` took
`pin`, so any other host button meant changing the renderer. This
replaces them with a host `actions` slot, so apps embedding widgets (the
Metrics page, the MCP observability widget, other projects) can compose
whatever buttons they need without rebuilding the grid.
Buttons are built with the new `MetricsCard.Action`. The card is a
`group/metrics-card`, so each button picks its own visibility with
classes: hidden until hover/focus, or always shown (e.g. a pinned card's
unpin). Host buttons sit after the card's drilldown and alert buttons.
```tsx
<DashboardRenderer
definition={definition}
scope="project"
widgetActions={widget => {
const isPinned = pinnedIds.includes(widget.id);
return (
<MetricsCard.Action
label={`${isPinned ? 'Unpin' : 'Pin'} ${widget.title ?? 'widget'}`}
onClick={() => savePin(widget, !isPinned)}
className={isPinned ? undefined : 'hidden group-hover/metrics-card:inline-flex group-focus-within/metrics-card:inline-flex'}
>
{isPinned ? <PinOffIcon /> : <PinIcon />}
</MetricsCard.Action>
);
}}
/>
```
This is breaking for `@mastra/playground-ui` consumers:
`ChartCard.persistentActions`, the `reveal` prop on
`MetricsCard.Actions`, `PinAction` and `WidgetPin` are gone (see the
changeset).
`@mastra/mcp-apps-components` moves its pin button to the new API and
adds an optional `onConfigure` to `observabilityWidgetHost`. It works
like `onPin`: when passed, each widget shows a settings button that
gives the host the widget plus the date preset, range and filters it is
drawn with, so the host can open its own dialog.
```tsx
observabilityWidgetHost({
resourceUri: 'ui://mastra/observability-widget',
onConfigure: ({ widget, datePreset, filters }) => openWidgetSettings(widget, datePreset, filters),
});
```
Tested with the playground-ui dashboard/metrics suites, the
mcp-apps-components suite (including new `onConfigure` host and app
tests), typecheck of playground-ui, playground and mcp-apps-components,
and a manual check in Storybook (`Dashboards/DashboardRenderer/Host
actions`) of hover, keyboard focus and pinned states.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
Dashboard hosts can now choose which buttons appear on each widget.
Observability widgets can also open host-controlled settings.
## Changes
- Added `DashboardRenderer.widgetActions` for host-provided actions.
- Added `MetricsCard.Action` and `onCardHover` for hover, focus, pinned,
and touch behavior.
- Placed host actions after drilldown and alert actions.
- Preserved host actions when a widget later renders an error.
- Added `observabilityWidgetHost.onConfigure`, which receives the
widget, date preset, custom range, and filters.
- Added request validation, documentation, tests, and Storybook
coverage.
- Kept hover-only actions keyboard-focusable and reachable on touch
devices.
## Breaking changes
Removed `onPin`, `isPinned`, `pin`, `persistentActions`, `reveal`,
`PinAction`, and `WidgetPin`. Consumers must use `widgetActions` with
`MetricsCard.Action`.
## Scope
36 files changed, with 717 additions and 290 deletions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
695599b8ab |
chore: version packages (alpha) (#30013)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
d1352388a6 |
feat(playground-ui): show page counts on pinned Knowledge listing toggles (#29987) | ||
|
|
8bce7717eb |
chore: version packages (alpha) (#29986)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
aa21624804 |
feat(factory-ui): edit intake routes and card moves inline, as readable rules (#29978)
**─────── TLDR ───────** > Admins edit intake routes and card moves in place, as rules that read like sentences, and every change saves on its own with an Undo. Routes in Work Intake were one mixed list: new-card routes and card moves together, each behind an Edit button and a form with a Save. New-card routes now read as an If / Else if / Otherwise chain in Work Intake, and card moves live on each board under a new Card moves page. ### Behavior changed an admin changes a route's name, conditions, destination or switch ├─ **was** — Edit opens a form, nothing saves until Save └─ **now** — edited in place, saved on each change, Undo in a toast an admin deletes a route ├─ **was** — a confirm dialog first └─ **now** — gone at once, Undo puts it back where it was an admin adds a route, or changes where leftover cards go ├─ **was** — saved from a form, no way back └─ **now** — saved at once, Undo removes the route or restores the old board and drops the copied moves an admin reorders routes ├─ **was** — up and down buttons on every row └─ **now** — drag by the grip, <kbd>Alt</kbd>+<kbd>↑</kbd>/<kbd>↓</kbd>, or the ⋯ menu a route that fires on close, reopen or a pull request event ├─ **was** — listed in Work Intake with the new-card routes └─ **now** — on its board's Card moves page, as When › Only if › Move to a board's General page └─ **new** — one line counting the routes that send new cards there, not counting pull requests that join their issue's card a phase's start or approve rule has a condition that isn't filled in yet ├─ **was** — no such state, the rule was edited as JSON or a flat list └─ **now** — the board's Save holds with "Fix ‹phase› to save." until it's finished or removed an admin with unsaved board edits opens Card moves └─ **new** — asked to keep or discard first, since that page has no save bar a session's pull request is closed without merging ├─ **was** — the sidebar row kept saying open until the work item caught up └─ **now** — the live check's state (open, merged or closed) wins Conditions use a grouped builder (Where field / operator / value, And or Or, nested groups) that goes as deep as the server's three levels, so a rule like the prod Self-review start rule stays editable. Unfinished route conditions stay local and say so until they're complete; when another admin's edit or an Undo changes them, the rows reload. The sidebar also folds a card's sessions back into one row when collapsed to icons, and a listed session keeps its own pin. ### Decisions - **autosave with Undo, no Save button or delete dialog** — every write is one click to reverse; Save buttons are one component away - **new routes stay a draft until named with one condition** — an empty new route would swallow every card from then on - **undoing a delete recreates the route** — the server has no restore; a recreated default counts as user-made - **new `RuleLines`/`RuleCard` instead of reusing `RuleBuilder`** — `RuleBuilder` is schema-driven with raw field paths and can't show grouped, labelled, yes/no fields; moving it onto `RuleLines` is a follow-up ### Watch > [!WARNING] > A route aimed at a phase on a pull request review board: the server <mark>skips it for cards that phase refuses</mark> and tries the next route, then the default board, while the list reads as if the route took them. Unchanged from main. ### Shape changed new in `@mastra/playground-ui`, minor changesets for each `RuleCard` · `RuleLines` · `CodeEditor variant="inline"` ### Not verified - [ ] in a real browser at mobile, tablet and desktop widths — only exercised through MSW tests - [ ] two admins editing the same list at once against the real API — the conflict toast is tested against MSW only --- > ██████████████████ **source** `+2505 −784` > ███████ **tests** `+913 −89` > ██ **playground-ui** `+310 −1` > ██ **stories** `+244 −1` > █ **changeset** `+32` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Work Intake now lets people set clear rules for where new cards go and where existing cards move. People can edit these rules on the relevant settings pages, and the interface explains what each rule does. ## Summary - Replaced the mixed intake-route editor with separate ordered rules for new cards and card moves. Rules support inline editing, reordering, enabling, deletion, and Undo. - Added a condition editor with nested groups, readable rule descriptions, and incomplete-condition tracking. Incomplete conditions block saving where required. - Added a Card moves page for each board and a General-page summary of routes that send new cards to that board. - Updated empty states to distinguish between a missing intake source and a board with no route for new cards. - Added reusable `RuleCard` and `RuleLines` components, plus an `inline` variant for `CodeEditor`. - Updated pull-request status display and session sidebar behavior, including pin handling for individual sessions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
23cc34a9c5 |
chore: version packages (alpha) (#29938)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/factory@0.28.0-alpha.6 ## @mastra/code-sdk@1.19.0-alpha.6 ## @mastra/playground-ui@69.0.0-alpha.7 ## @mastra/client-js@1.60.0-alpha.6 ## @mastra/react@1.15.0-alpha.6 ## @mastra/deployer-cloud@1.83.0-alpha.6 ## @mastra/longmemeval@1.1.42-alpha.6 ## @mastra/opencode@0.1.42-alpha.6 ## create-factory@0.4.3-alpha.6 ## mastracode@0.50.0-alpha.6 ## @mastra/agent-builder@1.2.1-alpha.3 ## mastra@1.39.0-alpha.6 ## @mastra/core@1.83.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.6 ## @mastra/editor@0.17.1-alpha.4 ## @mastra/mcp@2.9.0-alpha.3 ## @mastra/mcp-docs-server@1.3.13-alpha.9 ## @mastra/memory@1.41.1-alpha.3 ## @mastra/rag@2.7.3-alpha.2 ## @mastra/schema-compat@1.3.18-alpha.0 ## @mastra/server@1.83.0-alpha.6 ## @mastra/elysia@0.1.23-alpha.6 ## @mastra/express@1.5.27-alpha.6 ## @mastra/fastify@1.5.27-alpha.6 ## @mastra/hono@1.7.25-alpha.6 ## @mastra/koa@1.7.27-alpha.6 ## @mastra/nestjs@0.3.0-alpha.6 ## @mastra/next@0.2.41-alpha.6 ## @mastra/server-adapters-test-suite@0.3.0-alpha.3 ## @mastra/tanstack-start@0.2.41-alpha.6 ## @mastra/upstash@1.6.1-alpha.0 ## @mastra/vectorize@1.1.5-alpha.0 ## @mastra/voice-google-gemini-live@0.14.19-alpha.0 ## @mastra/voice-openai-realtime@0.14.9-alpha.0 ## @mastra/voice-xai-realtime@0.2.18-alpha.0 ## @mastra/inngest@1.11.2-alpha.4 ## @mastra/temporal@0.6.0-alpha.6 ## create-mastra@1.39.0-alpha.6 ## @internal/playground@1.39.0-alpha.6 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
8d4f090107 |
Factory: replace work-item comments with a card description (#29062)
> Opened by @DSchau ## What This removes comments from Factory work items across the API, storage, agent tools, integrations and UI. In their place, each card gets a single **description**. **Removed** - Comments storage: `work_item_comments`, `work_item_comment_mentions` and `work_item_activity` are no longer registered. - The comment CRUD routes, `/mention-roster` and the `/feed-events` SSE stream. The stream only ever refreshed comment queries. - The `mention` and `activity` attention kinds and their providers. - Work-item fields `commentCount` and `feedActivityAt`. - Slack integration: `aside` messages are no longer saved as card comments (the agent still ignores them), and card comments are no longer published back to Slack. The Slack emoji table, which existed only to support that, is gone too. - Integration hooks: `IntegrationContext.feed` and the integration `feedPublisher` hook. - Rules dispatcher: kickoffs no longer get the comment feed injected. - UI: the feed panel, composer, comment counts on cards, the workspace Comments button, `?comment=` deep links and the feed-events provider. - Audit actions `comment_*`, and `commentId` on `factoryWorkItemUrl()`. **Added** - A nullable `description` column on work items. Pg adds it on boot with `ADD COLUMN IF NOT EXISTS`. - Create and update routes accept `description`; a blank value clears it. - Agent tools: - `factory_create_work_item` takes `description` instead of `brief`. - `factory_update_work_item` can edit the description. - `factory_inspect_work_item` returns it. - Kickoffs append a `<work-item-description>` block, with an escaped boundary and a "data, not instructions" preamble. The playground-ui transcript renderer and the TUI now handle that tag instead of `<work-item-feed>`. - The card tray shows title, then an editable description, then the activity timeline. Dragging a candidate with a custom prompt saves that prompt as the card description. Docs PR: mastra-ai/softwarefactory-docs, branch `slack/1793395240-241709`. ## Proof - `mastracode/factory`: `tsc --noEmit` and `oxlint --type-aware` are clean, and the full vitest suite passes (226 files). - `factory-ui`: typecheck and lint are clean. Full suite: 2,227 tests pass. Two failures remain, and both also fail on unmodified `HEAD`: - `BoardPageProposedRun` "leads with the suggested run…" - `SessionsSectionGroups` "says so when every group…hidden" - `playground-ui` (`skill-activation`, `span-payload-signal`), `tui` (`render-messages`) and `core` (`signals`) tests pass, and those packages typecheck clean. - New and changed tests cover: - the description in dispatcher kickoffs, including tag escaping and the replay guard - setting and clearing the description through the tools - the attention inbox across the remaining kinds - the description editor in the board virtualization and grouped-list tests ## Unverified - Not run against a real Postgres. The new column relies on the existing boot-time `ADD COLUMN IF NOT EXISTS`. - The Playwright e2e specs were not run. Only their feed-events stubs changed. ## Risk: medium - **Existing data stays in the database.** Factory storage has no drop-table operation, so the old comment tables and the `comment_count`/`feed_activity_at` columns remain unused. Old `mention`/`activity` receipt rows are inert, because reads are filtered by kind. A follow-up migration could drop them. - **Breaking API change.** Callers sending `brief` to `factory_create_work_item`, or calling the removed routes or attention kinds, will break. See the changeset. - **Old transcripts.** Messages that contain the old `<work-item-feed>` trailer now show as raw text instead of a folded row. - **Session owner names.** The session hover card now names people only from the audit trail. An earlier owner who never appears there shows as a raw id. Previously the mention roster could fill in their name from comment authors or Slack links. - **New card composer.** It still takes only a title; the description is added from the card tray. --------- Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> |
||
|
|
c1205b357f |
revert(ui): restore the original Switch thumb (#29954) | ||
|
|
4a16d06bb7 |
fix(factory-ui): one consistent sidebar row per session, and keep filters across reloads (#29937)
**─────── TLDR ───────** > Sidebar sessions are back to one consistent row each, and the sidebar's view settings and filters now survive a reload. #29650 nested a card's sessions under a caption with a phase label, then #29838 collapsed each card to one row, so a card showed as a caption over a lone "Review" row next to one-line user sessions. Every session is a single row named after the session again, and the two-line and nested views are now opt-in settings in the Properties menu. ### Behavior changed a card's session in the sidebar ├─ **was** — card title caption above a nested phase row └─ **now** — one row named after the session, like user sessions Compact view, default on └─ **new** — off adds a second line: last update and the PR number Reveal child sessions, default off └─ **new** — a card's other sessions nest inside its row's list item, named by phase the owner, status and updated filters after a reload ├─ **was** — reset to all └─ **now** — kept in localStorage, like sort and grouping the icon on a pull request card's row ├─ **was** — the green pull request mark, whatever its state └─ **now** — the pull request's status, merged and closed included a row's pull request state for screen readers ├─ **was** — a merged badge only, no number └─ **now** — the link is described by state and number, e.g. "Open pull request #202", with merge request wording on GitLab ### Decisions - **filters in localStorage, not the database** — Caleb's ask for now; per-user storage stays on FACT-557 - **row action buttons 24px, corners inset from the row** — equal 3px top and right gaps at both row heights; shipped as `Sidebar.NavAction` rather than restyling every button in the slot, still worth a design system sign-off - **a description grows the row on its own** — no paired size prop to forget; it keys off the description with `:has()`, so the collapsed sidebar, which drops the description, stays one line - **compact on by default** — keeps today's one-line look; one default in `useSessionListView` to flip ### Shape changed new in `@mastra/playground-ui` `Sidebar.NavLabel description` · `Sidebar.NavAction` · `group/nav-row` on rows with actions removed: `nestCardSessions`, `SessionListEntry`, the row `contextLabel`, `isSessionSort`, `isSessionGroupBy` ### Not verified - [ ] the rows in a real browser — tests run in jsdom, so two-line height, icon alignment and button gaps are unchecked by eye --- > ██████████████████ **source** `+440 −203` > ████████ **tests** `+201 −115` > █ **changeset** `+24` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The sidebar now shows each session as one row named after the session. You can turn on extra details or show child sessions under their parent. Your filters and view settings stay saved when you reload. ## Summary - Compact view is on by default. Reveal child sessions is off by default. Both settings are available in the sessions properties menu and persist across reloads. - Expanded rows show the last update and pull-request reference when available. Pull-request status appears in the source icon, the second line, or a merged badge, depending on the row. Accessible descriptions identify the status and reference, using GitLab-specific wording where applicable. - Owner, status, and update filters persist in local storage. Invalid stored values fall back to defaults for the affected fields. - When child sessions are shown, filters retain a card if its parent or any child matches, and keep only matching child rows. Grouping uses each row’s card status when available. - `Sidebar.NavLabel` supports a description line, and `Sidebar.NavAction` provides an action button for sidebar rows. ## Verification - The author reports that the rows were not visually checked in a real browser. Two-line height, icon alignment, and button spacing remain unverified. - CI, build, and test results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
779d2875b1 |
chore: version packages (alpha) (#29912)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/auth-studio@1.4.0-alpha.1 ## @mastra/factory@0.28.0-alpha.5 ## @mastra/mcp-apps-components@0.1.0-alpha.5 ## @mastra/playground-ui@69.0.0-alpha.6 ## @mastra/client-js@1.60.0-alpha.5 ## @mastra/react@1.15.0-alpha.5 ## @mastra/deployer-cloud@1.83.0-alpha.5 ## @mastra/longmemeval@1.1.42-alpha.5 ## @mastra/opencode@0.1.42-alpha.5 ## create-factory@0.4.3-alpha.5 ## @mastra/code-sdk@1.19.0-alpha.5 ## mastracode@0.50.0-alpha.5 ## @mastra/agent-builder@1.2.1-alpha.2 ## mastra@1.39.0-alpha.5 ## @mastra/core@1.83.0-alpha.5 ## @mastra/deployer@1.83.0-alpha.5 ## @mastra/editor@0.17.1-alpha.3 ## @mastra/mcp@2.9.0-alpha.2 ## @mastra/mcp-docs-server@1.3.13-alpha.8 ## @mastra/memory@1.41.1-alpha.2 ## @mastra/rag@2.7.3-alpha.1 ## @mastra/server@1.83.0-alpha.5 ## @mastra/elysia@0.1.23-alpha.5 ## @mastra/express@1.5.27-alpha.5 ## @mastra/fastify@1.5.27-alpha.5 ## @mastra/hono@1.7.25-alpha.5 ## @mastra/koa@1.7.27-alpha.5 ## @mastra/nestjs@0.3.0-alpha.5 ## @mastra/next@0.2.41-alpha.5 ## @mastra/server-adapters-test-suite@0.3.0-alpha.2 ## @mastra/tanstack-start@0.2.41-alpha.5 ## @mastra/libsql@1.30.0-alpha.2 ## @mastra/turso@0.1.21-alpha.2 ## @mastra/inngest@1.11.2-alpha.3 ## @mastra/temporal@0.6.0-alpha.5 ## create-mastra@1.39.0-alpha.5 ## @internal/playground@1.39.0-alpha.5 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
4a0418dc41 |
fix(ui): give sidebar rows one highlight for hover and the current page (#29919)
Sidebar rows now use one highlight, so hover and the current page fill the same box, and a click goes straight from hover to selected. Before, hover and the pressed state were drawn on a separate layer inset by 1px, and the selected fill sat on the row itself. Clicking a row made it go hover → darker press → back to hover → selected, with the box changing size along the way. This matches how Linear's sidebar behaves: one fill per row, no pressed state. ## Before / After Production builds of Studio at 1x, the same 12 sidebar clicks. Before is main from before [fix(playground): swap Studio pages instantly instead of crossfading them](https://github.com/mastra-ai/mastra/pull/29918) (crossfade and the old row states), after is this branch on current main. In the production build the clicked row turns current 12–43 ms after the click, 1–3 frames, measured in headless Chrome. Before: https://github.com/user-attachments/assets/4d0babcf-ecb0-4ddd-9be3-0bdd33bc89c5 After: https://github.com/user-attachments/assets/a3ba1960-e413-426f-86b3-5666d2e69d24 Hover next to the current row, zoomed: | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/f77dae3a-11c0-4356-81aa-636cf78ee626" width="480" alt="Hover before"> | <img src="https://github.com/user-attachments/assets/3287b86f-b103-4706-9e41-74b472c7b5b9" width="480" alt="Hover after"> | ## What changed - A nav row now has exactly one surface: quiet, current or featured, painted on the row's own box. It used `state-layer`, a 1px-inset pseudo-element meant for surfaces that already have a fill, plus a separate fill for the current row. The two stacked (about 10% instead of 6% when hovering the current row) and differed in size. - No pressed state and no focus fill on nav rows. Keyboard focus keeps the outline every row already has, the same on rows with a trailing action, where the old focus fill never showed. - Studio, Platform and Factory all pick this up. None of them override the row surface, so there is nothing to change at the call sites. Net −19 lines. ## Testing 1. Open Studio, hover a sidebar row next to the current one: both highlights are the same size. 2. Click it: it goes from the hover fill to the selected fill, with no darker flash in between. 3. Hover the current row: its fill doesn't change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Sidebar rows now use one background for each state, so hovering over a row and selecting it do not stack different highlights. Clicking a row no longer adds a darker pressed flash. ## Changes - Replaced layered row styling with one surface class, chosen in this order: featured, active, then idle. - Idle rows show a subtle background on hover. Active rows keep the `bg-fill` background, and featured rows keep their green background with a brightness hover effect. - Kept the existing keyboard focus outline; the new surfaces do not add a focus fill. - Removed the test for immediate hover-fill transitions. - Added a patch changeset for `@mastra/playground-ui`. - CI, build, and test results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a3c0884445 |
feat(ui): refresh Switch design, simplify code (#29902)
The Switch thumb is now a real circle instead of an oval cut off by the track. The track is a bit more compact. Clicking slides the circle, and hovering stretches it 2px toward where it would go, like Linear's switch (sizes sit between Linear's and shadcn's). ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/8100fbf4-f91b-407f-95a0-3fdca82e20b9" width="420" alt="Before"> | <img src="https://github.com/user-attachments/assets/2a8a3ac8-142a-4cca-801c-469d424519d7" width="420" alt="After"> | | <img src="https://github.com/user-attachments/assets/71070400-79e8-412c-9d48-7dfdc09fd08b" width="420" alt="Settings before"> | <img src="https://github.com/user-attachments/assets/f72c4fd0-72c3-420e-9b21-3b711aa246fc" width="420" alt="Settings after"> | ## What changed - Track 36×20 → 30×18, thumb 20×16 oval → 14px circle with a 2px gap around it. - Motion is CSS only and uses transforms only: the circle slides with `translate`; on hover a same-color `::after` copy shifts 2px, so the pair reads as a pill without animating width. Disabled switches don't stretch. - The thumb color swaps instantly and only the track fades (150ms), so the circle never blends into the track mid-toggle. The old squash keyframes (`switch.css`) and the press-widen effect are gone. ## Testing 1. Open Storybook → Elements/Switch → All States and On Surfaces. 2. Hover a switch: the circle grows 2px toward the other side (right when off, left when on). Disabled ones don't react. 3. Click: the circle slides, with no stretch, and its color flips at once. 4. Check With State Icons in light and dark: the icons still fit inside the circle. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The switch is smaller and has a round thumb that slides when toggled. When an enabled switch is hovered, the thumb stretches slightly; a disabled switch does not stretch. ## Changes - Reduced the track from 36×20px to 30×18px and changed the thumb to a 14px circle. - Added thumb translation for toggling and a hover-only effect for stretching. - Updated track and thumb styles and transitions, and removed the old thumb animation stylesheet. - Updated styling tests and added a patch changeset for `@mastra/playground-ui`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
efc06290c0 |
feat(factory-ui): configure boards from the sidebar instead of Settings (#29881)
**─────── TLDR ───────** > Board settings now open beside the board in the sidebar, with a page per phase, instead of a long form under Settings › Factory. The Work board form sat in Settings, away from the board it changed, and the toolbar had its own automation popover. Now the toolbar's Configure board button, the Boards header, or a board row's hover icon opens settings in place: the sidebar widens and lists General plus every phase, and each phase page reads as steps (starts, agent runs, ends, allowed moves). ### Behavior changed configuring a board ├─ **was** — one form under Settings › Factory › Work board └─ **now** — General and one page per phase, opened from the board the automation switches on the board toolbar ├─ **was** — a popover behind a settings icon └─ **now** — on the General page; the toolbar opens board settings a phase Factory's code runs (Triage, Planning, Building, Done…) ├─ **was** — disabled inputs that still looked fillable └─ **now** — locked values as text, its skills listed with Edit/View reordering phases └─ **new** — drag the grip or Alt+↑/↓ in the sidebar, first phase pinned Settings › Skills ├─ **was** — every skill, grouped under a hardcoded subset per board └─ **now** — a Skills page in board settings, only skills no phase runs ### Shape changed | | | | |---|---|---| | **−** | `WorkBoardSection` | replaced by the board settings pages | | **−** | `BoardAutomationSettings` | its switches moved to the General page | | **−** | Settings `skills` section | old link redirects to `/work/skills` | | **+** | `domains/boardConfig/` | draft, routes, phase pages, sidebar nav | `@mastra/playground-ui` additions the factory UI now relies on `Sidebar.NavStack.View closeOnEscape` · `Sidebar.Provider` follows a runtime `minWidth` · `SkillSimpleForm` locked fields as text ### Decisions - **`codeSkills.ts` maps code phases to their skills** — the API doesn't say which skill a handler runs; one server field away - **Skills sits under board settings at `/work/skills`** — keeps the sidebar context; a factory-level route is the alternative - **phase descriptions stay editable but never reach agents** — same as `main`; wiring them into the prompt is a separate change ### Not verified - [ ] screenshots signed in against a real factory — I only checked against mocked API responses - [ ] mouse drag reorder in tests — jsdom has no layout; checked by hand in a browser only --- > ██████████████████ **source** `+2370 −1097` > ████████ **tests** `+1065 −939` > █ **changeset** `+18` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Board settings now sit next to the board, where people can find them while using it. This change adds pages for board details and phases, and moves skill management out of general Settings. ## Summary - Added board configuration pages in a sidebar, with General and phase views. Users can open configuration from the board toolbar or the Boards navigation. - Added board and phase editing, validation, saving, creation, removal, and reordering. The first phase stays in place. - Added board creation and redirects from the legacy board and skills Settings routes. - Moved factory skills to board-specific skills pages. Read-only skill names and descriptions now appear as text. - Added sidebar controls for Escape-key behavior and minimum width. Minimum width changes do not overwrite the saved width. - Added tests for board configuration, skills, navigation, and sidebar behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
0bd06eade7 |
fix(playground-ui): keep KPI groups on one row when the app ships its own Tailwind CSS (#29920)
## Description Dashboards on the platform still showed three KPIs as 2 + 1 (and four as 2 + 2) on wide screens. Studio already had them on one row since #29887. The cause is the CSS order. `MetricsCardGroup` applied `@xl:grid-cols-2` from 36rem upward, and the auto-fit row from 56rem only won because it came later in the stylesheet. The platform's Tailwind build emits its own `@xl:grid-cols-2` further down its CSS. That copy has the same specificity, so it wins and the group drops back to two columns. Now each column rule covers only its own width range, and the per-count exceptions win by specificity, so the layout doesn't depend on CSS order anymore. ```diff - @xl:grid-cols-2 @3xl:has-[>:nth-child(5)]:grid-cols-3 … @6xl:has-[>:nth-child(5)]:grid-cols-[repeat(auto-fit,…)]! + @xl:@max-4xl:grid-cols-2 … @4xl:@max-6xl:has-[>:nth-child(5)]:grid-cols-3 ``` I checked it in Chromium against the built `style.css`, with 1 to 6 cards at 30, 40, 50, 60, 76 and 90rem. Two runs: the package CSS alone (Studio), and the package CSS followed by the platform's deployed stylesheet. With the platform stylesheet, the old classes reproduce the 2 + 1 / 2 + 2 bug. With the new classes, three cards share a row from 48rem and four from 56rem, and both runs give the same layout. Every other count and width is unchanged. The dashboard tests pass. Once this is released, the platform only needs the version bump, no code change. ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The metrics cards now choose their columns based on the group’s width, even when an app loads its own Tailwind styles afterward. This keeps three and four cards together on wide dashboards instead of leaving cards on an extra row. ## Summary - Limited the two-column rule to the `@xl`–`@max-4xl` width range. - Applied three-column and four-card two-column exceptions only from `@3xl` through `@max-4xl`. - Kept auto-fit columns from `@4xl`, with groups of five or more limited to three columns through `@max-6xl`. - Added a patch changeset for `@mastra/playground-ui`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
06fa7df2a0 |
fix(ui): use Mona Sans's default letters in Studio and share fonts from Playground UI (#29915)
Studio draws an old-style double-storey "g" that no other Mastra app has. Studio switches on a Mona Sans stylistic set (`ss06`) for the whole page, and that set swaps the "g" for the double-storey version. Google Fonts, GitHub, the redesign in Figma, Platform and Factory all use Mona Sans's default letters, so this was a Studio-only bug. This PR removes it and moves our fonts into Playground UI, so every app loads them from one place instead of keeping its own copies. Part of PLTFRM-3364; Platform's half is mastra-ai/platform#4575. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/105f1252-aead-45f0-8401-b7d566805bb1" width="420" alt="Before eggs"> | <img src="https://github.com/user-attachments/assets/e4d8e455-2d0a-4fa0-9a2e-4f2e99fe9917" width="420" alt="After eggs"> | | <img src="https://github.com/user-attachments/assets/a1c29eaa-66c9-45de-8391-3ffb011a7aac" width="480" alt="Before garlic"> | <img src="https://github.com/user-attachments/assets/8e62f05e-43e2-45fa-b243-0be56ab0e81f" width="480" alt="After garlic"> | | <img src="https://github.com/user-attachments/assets/edae5be2-6f02-4036-a01a-324b1949c35d" width="480" alt="Before page"> | <img src="https://github.com/user-attachments/assets/6c285850-3bc0-41f8-a327-346cb27a464f" width="480" alt="After page"> | What `ss06` changes in Mona Sans: only the "g" and its accented forms. Default letters on top, `ss06` below: <img src="https://github.com/user-attachments/assets/6bc50fdc-a38f-4c7f-9f5b-9837378371d1" width="600" alt="What ss06 changes"> ## What changed - New `@mastra/playground-ui/fonts.css`: the package now ships Mona Sans and Commit Mono as woff2, split by script, with their OFL licences, and points the font tokens at them. No new dependencies. Studio, Factory and Storybook each import it, and their own font files and `@font-face` rules are gone. - Studio drops `ss06`, so it renders the default letters like every other app. - Studio now downloads one 96 KB woff2 for Latin text instead of a 349 KB TTF with every script. ## Scope - Platform gets the same file in a follow-up PR once a Playground UI snapshot includes it. - No weight, size or spacing changes. Apart from the "g", nothing should look different. ## Testing 1. Open a Studio chat with words like "eggs" or "garlic": the "g" is single-storey, like in Platform and Factory. 2. In the browser's network tab, Studio loads `mona-sans-latin-standard-normal-*.woff2`, and Commit Mono on pages with code. 3. Factory and Storybook render Mona Sans and Commit Mono as before. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR gives Studio, Factory, and Storybook a shared set of fonts. It also removes a setting that changed the shape of the letter “g,” so Mona Sans uses its default letterforms. ## Changes - Added `@mastra/playground-ui/fonts.css` with Mona Sans and Commit Mono WOFF2 fonts split by script. Exported the stylesheet and font files from `@mastra/playground-ui`. - Updated Studio, Factory, and Storybook to import the shared font stylesheet. Removed their local font declarations and font files. - Removed the `ss06` setting from Studio’s main page and startup error screen. - Added a package export test that checks the stylesheet and its referenced WOFF2 files. - Added release changesets for `@mastra/playground-ui` and Studio. ## Validation - `git diff --check` passed. - Test, build, and CI results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6e682db7f5 |
test(playground-ui): wait for both distinct-ids requests to fail before Retry (#29910)
## Description `distinct-ids-card.test.tsx > loads after Retry when both requests failed` flaked in [this job](https://github.com/mastra-ai/mastra/actions/runs/42832766279/job/129887567094). After Retry, the card stayed on the error instead of loading the legend. The card makes two requests (series and totals) and shows the error as soon as either one fails. Retry only refetches the requests that the card has rendered as failed. The test clicked Retry as soon as the error appeared, which happens after the series request fails. The totals request fails a few milliseconds later, and React Query hands that update to React in a `setTimeout(0)`. Under load the click sometimes landed before the card re-rendered, so Retry refetched only the series request. Totals stayed failed and the card kept showing the error. Logging the handler calls confirmed it: failing runs got a 9th request (series) and no 10th (totals). The test now waits for `queryClient.isFetching()` to reach 0 before clicking Retry, the same pattern other playground-ui MSW tests use, so both failures are rendered when it clicks. No other test in the file or the sibling metrics card tests clicks Retry on a card with two requests, so only this test changes. I ran the file as 20 parallel vitest processes per round, 10 rounds, on a 20-core machine: - Before: 11 of 200 runs failed (5.5%), all on this test with the same error as CI. - After: 0 of 200 runs failed. 30 sequential runs also passed. ## Related issue(s) None, flaky test found in CI on #29605 ## Type of change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [x] Test update ## Checklist - [ ] I have linked the related issue(s) in the description above - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The test could try again before both requests had finished failing. It now waits for both requests to finish before clicking Retry, so it checks that the card can load after a complete failure. ## Changes - Kept the query client returned by `render`. - Waited for `queryClient.isFetching()` to reach `0` after the error appeared and before clicking Retry. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
37d70ad725 |
feat(ui): raise font weight to more common 450, and reuse variables (#29743)
Regular text goes from weight 400 to 465, and labels and headings from 500 to 515. At 400, body copy, table cells and captions read thin on our dark surfaces. 465/515 is the scale modern design systems use, adjusted for our font. Linear, for example, sets regular text at 450 and emphasis at 500 in Inter. Mona Sans draws thinner than Inter at the same weight, so the same scale needs a small bump to look the same. I compared 450/500, 465/515 and 475/525 side by side in Studio, and 465/515 looked the most natural. The font itself doesn't change. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/c34dd7b6-7e33-4335-9c1d-49dba4c83fae" width="480" alt="Before chat"> | <img src="https://github.com/user-attachments/assets/205a1948-c21f-42fc-96fc-7b0b0352c701" width="480" alt="After chat"> | | <img src="https://github.com/user-attachments/assets/3189f32d-5dc6-44c4-9502-66677379b54c" width="480" alt="Before agents"> | <img src="https://github.com/user-attachments/assets/570f53b8-53c3-40e7-ae5c-19ffef1d0e3b" width="480" alt="After agents"> | | <img src="https://github.com/user-attachments/assets/82abb130-172a-4b6d-b3b3-7eb2f53a0b2b" width="480" alt="Before traces"> | <img src="https://github.com/user-attachments/assets/bca5ed60-3b33-4f47-8fbd-094bd6f77a1b" width="480" alt="After traces"> | | <img src="https://github.com/user-attachments/assets/bbc00442-08bd-41df-a0f7-734d93369ca7" width="480" alt="Before metrics"> | <img src="https://github.com/user-attachments/assets/70d6e2d8-81d2-404b-aaaf-adc2b9f8cfc7" width="480" alt="After metrics"> | | <img src="https://github.com/user-attachments/assets/4ce3d280-23e9-4b48-8d2d-fa7ff6b75f20" width="480" alt="Before chat 2"> | <img src="https://github.com/user-attachments/assets/269ed452-6725-4e36-bf61-05f399dbfe20" width="480" alt="After chat 2"> | | <img src="https://github.com/user-attachments/assets/f48fd24e-60b7-446b-b9f4-0fe784d8cb8a" width="480" alt="Before type"> | <img src="https://github.com/user-attachments/assets/a4a14c24-5b7d-481a-b7fd-520fa8e6fd1d" width="480" alt="After type"> | ## What changed - Text roles draw from two weight tokens: regular `--font-weight-normal` (465) for anything read, strong `--font-weight-medium` (515) for labels and headings. `font-normal`/`font-medium` resolve to the same tokens, and text without a role inherits regular instead of the browser's 400. - Cleanup: role + `font-medium` combos that equal an existing role now use that role (`text-body font-medium` → `subheading`, `text-body-sm font-medium` → `label`, `caption font-medium` → `column`). - Markdown bold goes from 500 to 550. Inside prose it has no size or color change to lean on, so it needs a bigger step above 465 text than labels do. ## Scope - The font stays Mona Sans. Factory picks up the same tokens; Platform picks them up when it bumps Playground UI, and its own raw `text-sm`/`font-medium` usage is a separate cleanup. - Letter spacing and line height are unchanged. ## Testing 1. Storybook, Foundations → Typography: `body`, `body-sm`, `caption`, `menu` show 465; `label`, `column` and headings show 515. 2. Studio, an agent chat with a markdown reply: text reads at 465 and bold is clearly heavier than the text around it. 3. Studio, a new agent chat: in "What can … do for you today?", the agent name still stands out from the sentence. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes regular text and headings slightly heavier while keeping the same font. Shared weight settings help text use consistent weights across the UI. ## Summary - Adds shared normal (465) and medium (515) weight tokens and applies them to typography roles. Text without a role uses the normal weight. - Updates UI components to use matching typography roles. Markdown headings use the medium token, and bold text uses weight 600. - Updates typography documentation and adds tests for the exported weight tokens and role mappings. **Diff:** 18 files changed; 72 additions and 42 removals. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7c4dd88400 |
chore: version packages (alpha) (#29889)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
3f1d3a38df |
fix: transparent menus and blocked pin button in observability widgets (#29906)
Two small bugs in the observability widget.
Menus in the widget (like the chart's view picker) rendered with a
transparent background, so the chart showed through. The widget's
stylesheet strips the card surface from every `.bg-card.rounded-xl`
element, and menus use the same classes. Since popups portal to `body`,
scoping the rule to `#root` fixes it:
```css
/* before */
.bg-card.rounded-xl { background-color: transparent; ... }
/* after */
#root .bg-card.rounded-xl { background-color: transparent; ... }
```
The other one: with the view menu open, you couldn't pin the widget. The
menu was modal, so Base UI drew a full-screen backdrop that swallowed
the click on the pin button. Making it non-modal (same as
`filter-bar-chip` and `sidebar-more-links`) fixes it:
```tsx
<DropdownMenu modal={false}>
```
Added a test in `chart-card.test.tsx` that opens the menu and clicks a
card action (it fails without the fix), and checked both fixes in a
browser against Storybook and the built widget.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The widget’s menus now keep their background, so the chart does not show
through them. You can also pin a chart while its view menu is open.
## Changes
- Scoped the observability widget’s card-surface styles to `#root`.
Portaled menus and popups keep their own backgrounds.
- Set the chart title menu to `modal={false}` so it does not block
clicks on card actions.
- Added a test that opens the menu and confirms the Pin action remains
clickable.
- Added patch changesets for `@mastra/mcp-apps-components` and
`@mastra/playground-ui`.
## Checks
Test and CI results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
536b8bd4be |
test: fix three tests that keep failing release and adapter CI runs (#29900)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
ffaae02fc4 |
feat(factory): move the review test check tool out of Factory and let apps build their own (#29888)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
d8e0ddb768 |
fix: tidy dashboard KPI controls and layout, and the observability widget's frame in chat (#29887)
Three small visual fixes for dashboards.
On Studio dashboards, the KPI group's drag handle and unpin button
stayed visible while rearranging or once pinned. They float over the
cards' top border, so they sat right on the edge all the time. On
screens that can hover, they now only show on hover or focus, even while
pinned or rearranging. Touch screens can't hover, so there the drag
handle (while rearranging) and the unpin button (while pinned) stay
visible and tappable, like on the other cards. Other cards keep their
grip and unpin button visible in those states everywhere; the KPI group
is a deliberate exception on hover-capable screens because its controls
overlap the cards' border.
KPI groups also use their width better. They stayed on two columns until
56rem, so three KPIs wrapped as 2 + 1 on medium-width dashboards. Groups
of three or more now switch to three columns at 48rem, so three cards
share a row and six go 3 + 3. Groups of one or two keep two columns
there rather than leave an empty one, and a group of exactly four keeps
2 + 2 at that width instead of leaving one card alone on a row. Every
other count and width lays out as before.
In chat, MCP Apps such as the observability dashboard showed as an
opaque box pressed against the tool badge above and the message below.
The app sets `color-scheme` from the theme the viewer sends it. When the
iframe's scheme differs from the host page's, the browser paints a solid
canvas behind the iframe. The viewer now gives its frame the same
`color-scheme` as the theme it sends, so the app shows through and sits
on the chat background with its own padding. This works whatever scheme
the host page declares, and the app itself is unchanged.
```tsx
<div style={{ colorScheme: resolvedTheme, /* … */ }}>
<AppRenderer hostContext={{ theme: resolvedTheme, /* … */ }} />
</div>
```
Tested with the dashboard renderer and MCP app viewer tests; the new
assertions fail without the fixes. I loaded the built observability
widget in a local host page and sampled the iframe's pixels for dark and
light app themes on pages with no, dark and light `color-scheme`:
transparent in all six cases with the fix, opaque without it. I checked
the touch behavior against the built CSS in Chromium with touch
emulation, and the KPI grid against the built CSS at 40, 50, 55, 60 and
75rem with one to six cards (there's a two-card story at 50rem in
Storybook). I couldn't check the deployed platform because it needs a
login.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR makes dashboard KPI controls easier to find and use, especially
on touch screens. It also adjusts how KPI cards fit in a row and helps
MCP app frames match their theme.
## Changes
- KPI drag and pin controls appear on hover or focus. On touch screens,
the drag handle stays available while rearranging, and the unpin control
stays available while pinned.
- KPI groups with three cards use three columns from 48rem. Groups with
four cards stay in a 2 + 2 layout at that width. The existing wider
layouts remain.
- The MCP app viewer sets the frame’s `color-scheme` to match the theme
sent to the app.
- Added dashboard and viewer tests, a Storybook story for two cards at
medium width, and patch changesets.
## Validation
The PR objectives report renderer and viewer tests, browser checks, and
Storybook layout checks. Completed CI results are not available. The
author reports that the deployed platform could not be checked because
it requires a login.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
aa406eaae6 |
fix(playground-ui): DatePicker fills its container; time Input shows a design-system clock (#29769)
## Summary Fixes two problems in the date and time pickers, visible in the platform's API key expiry picker: - **Calendar didn't fill its popover.** `DatePicker` kept its content width (`w-fit`), leaving an empty strip on the right of wider popovers. It now fills its container: the root is `w-full`, weekday and day cells grow, and day buttons stay centered. A width class passed through `className` (for example `w-fit`) still replaces the default. Popovers that size to their content look the same. - **Time field icon.** Chromium drew its own clock (black in dark mode, and it opened Chromium's native picker). Firefox and Safari drew none. `<Input type="time">` now hides Chromium's icon and draws a design-system clock (lucide `Clock`, muted foreground) as a background image, so it looks the same in every browser and theme. Like shadcn, the API is just `<Input type="time">`, and the value is typed or stepped with the arrow keys. The icon colour is a per-theme `--time-field-icon` token in `theme.css`, because an image can't read CSS variables. `DateTimePicker` and the custom range editor in `DateTimeRangePicker` no longer hide the native icon themselves. ## Follow-up Platform's `KeyExpirationPicker` already renders `<Input type="time">`, so it picks up both fixes with a `@mastra/playground-ui` bump. Its leftover `dark:scheme-dark` class can be removed in the same change. ## Test plan - [x] Picker, input and export tests pass (63 tests) - [x] `tsc --noEmit`, oxlint and prettier pass - [x] Storybook in headless Chromium, light and dark: `Elements/Input/Time` (empty, filled, `w-24`, disabled), the `DateTimeRangePicker` range editor, and `DateTimePicker` (with value). "12:00 AM" fits at `w-24`. - [ ] Check `Elements/Input/Time` in Firefox and Safari --------- Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com> Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
6deb16047f |
chore: version packages (alpha) (#29719)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/slack@1.9.0-alpha.0 ## @mastra/factory@0.28.0-alpha.3 ## @mastra/code-sdk@1.19.0-alpha.3 ## mastracode@0.50.0-alpha.3 ## @mastra/observability@1.24.0-alpha.2 ## @mastra/core@1.83.0-alpha.3 ## @mastra/mcp-apps-components@0.1.0-alpha.3 ## @mastra/playground-ui@69.0.0-alpha.4 ## @mastra/server@1.83.0-alpha.3 ## @mastra/server-adapters-test-suite@0.3.0-alpha.1 ## @mastra/platform-workspace@1.13.0-alpha.0 ## @mastra/auth-better-auth@1.1.11-alpha.1 ## @mastra/client-js@1.60.0-alpha.3 ## @mastra/react@1.15.0-alpha.3 ## @mastra/deployer-cloud@1.83.0-alpha.3 ## @mastra/longmemeval@1.1.42-alpha.3 ## @mastra/opencode@0.1.42-alpha.3 ## create-factory@0.4.3-alpha.3 ## @mastra/arize@1.3.30-alpha.2 ## @mastra/arthur@0.4.30-alpha.2 ## @mastra/braintrust@1.3.27-alpha.2 ## @mastra/datadog@1.4.22-alpha.2 ## @mastra/deepeval@0.1.24-alpha.2 ## @mastra/laminar@1.3.32-alpha.2 ## @mastra/langfuse@1.6.6-alpha.2 ## @mastra/langsmith@1.4.3-alpha.2 ## @mastra/otel-bridge@1.5.22-alpha.2 ## @mastra/otel-exporter@1.5.2-alpha.2 ## @mastra/posthog@1.4.7-alpha.2 ## @mastra/sentry@1.2.32-alpha.2 ## @mastra/agent-builder@1.2.1-alpha.1 ## mastra@1.39.0-alpha.3 ## @mastra/connect@1.3.2-alpha.2 ## @mastra/deployer@1.83.0-alpha.3 ## @mastra/editor@0.17.1-alpha.2 ## @mastra/fastembed@1.3.7-alpha.0 ## @mastra/mcp-docs-server@1.3.13-alpha.6 ## @mastra/memory@1.41.1-alpha.1 ## @mastra/elysia@0.1.23-alpha.3 ## @mastra/express@1.5.27-alpha.3 ## @mastra/fastify@1.5.27-alpha.3 ## @mastra/hono@1.7.25-alpha.3 ## @mastra/koa@1.7.27-alpha.3 ## @mastra/nestjs@0.3.0-alpha.3 ## @mastra/next@0.2.41-alpha.3 ## @mastra/tanstack-start@0.2.41-alpha.3 ## @mastra/convex@1.8.1-alpha.0 ## @mastra/pg@1.36.0-alpha.2 ## @mastra/inngest@1.11.2-alpha.2 ## @mastra/temporal@0.6.0-alpha.3 ## create-mastra@1.39.0-alpha.3 ## @internal/playground@1.39.0-alpha.3 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
1d9e116bef |
feat(thinking-level): show a brain instead of bars on the thinking button (#29853)
**─────── TLDR ───────** > The thinking button in the composer shows one brain filled to the picked level, the same drawing as the ramp it opens, instead of five bars. Stacked on #29845. Merge that first and GitHub retargets this one to `main`. ### Behavior changed The thinking button (Studio composer, Factory model picker) ├─ **was** — five bars filled up to the level └─ **now** — one brain filled bottom-up to the level; amber at Extra high and Max, empty with no level, pulses while loading ### Shape changed renamed in `@mastra/playground-ui` `ThinkingLevelBars` → `ThinkingLevelIcon` — same props (`options`, `value`, `loading`); `ThinkingLevelPicker` and `ThinkingLevelUnavailable` use it on their button Factory's `SessionThinkingBars` becomes `SessionThinkingIcon`. ### Decisions - **renamed instead of keeping "Bars"** — a component named Bars that draws a brain would mislead; no callers outside this repo, including platform, and the changeset shows the swap. - **no unit test for fill amounts** — it would only restate SVG attributes; checked in Storybook at phone, tablet and desktop widths. --- > ██████████████████ **source** `+43 −40` > ████ **stories** `+10 −10` > █████ **changeset** `+13 −1` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The thinking control now shows one brain instead of a row of bars. The brain fills more as you choose a higher thinking level, so the button shows the selected level at a glance. ## Changes - Replaced `ThinkingLevelBars` with the exported `ThinkingLevelIcon` component in `@mastra/playground-ui`. Its fill follows the selected option; it stays empty when no option matches and pulses while loading, unless motion is reduced. - The icon uses warning text color for options marked with warning emphasis. - Updated `ThinkingLevelPicker`, `ThinkingLevelUnavailable`, and the Composer layout story to use `ThinkingLevelIcon`. - Renamed Factory’s `SessionThinkingBars` to `SessionThinkingIcon` and updated the model picker to use it. - Added a minor changeset for `@mastra/playground-ui`. The author reports checking the appearance in Storybook at phone, tablet, and desktop widths. No unit test was added for fill amounts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
0adf28c60d |
feat(composer): share one composer and model picker between Studio and Factory (#29845)
**─────── TLDR ───────** > Studio and Factory now render the same chat composer from `@mastra/playground-ui`, with one model picker that also holds the thinking level. Each app used to build its own composer row, attach control and model switcher, so a fix in one never reached the other. The layout, attach menu, model picker and thinking ramp now live in playground-ui, and each app only passes its data. ### Behavior changed The "+" in the composer ├─ **was** — an image button in Factory, a popover in Studio └─ **now** — Camera, Photos, Files (and From a URL in Studio); a sheet on phones Picking a model and thinking level in Factory ├─ **was** — a model menu and a separate thinking button └─ **now** — one picker, thinking ramp inside, level shown as bars on the trigger Picking a model in Studio ├─ **was** — raw ids, no default, no way back to the agent's model └─ **now** — readable names, agent's model marked Default, one-click reset The thinking level control ├─ **was** — a bar chart slider └─ **now** — a row of brains; a pill stretches to the picked level and names it Factory loses its connection mid-draft ├─ **was** — the notice pushed the transcript and blocked typing └─ **now** — it floats over the status row; typing continues, Send waits ### Shape changed new in `@mastra/playground-ui` `ModelPicker` · `ComposerAttachMenu` · `ComposerStatus` · `ComposerActionsStart` · `ComposerActionsEnd` · `ComposerHeader placement="overlay"` removed from `@mastra/playground-ui` `ThinkingLevelSlider` — no callers in Mastra or platform; use `ThinkingLevelRamp` or `ThinkingLevelPicker` `ThinkingLevelRamp` keeps its props; only its look and pointer handling changed. Its stories are split into Ramp, Picker, Bars and Unavailable. ### Decisions - **readable names from raw ids only** — `formatModelName` turns `claude-opus-4-6` into "Claude Opus 4.6"; a `name` field is one prop away. - **the ramp stays a native range input underneath** — keyboard, screen readers and slider tests keep working; clicks and drags are handled on the row. - **dropped Factory's "Showing models this Factory's organization credentials can run" footer** — the picker header already names the credential. ### Not verified - [ ] the stretching pill in Safari — no Safari on this machine --- > ██████████████████ **source** `+1644 −776` > ████████ **tests** `+700 −157` > █████ **stories** `+495 −204` > █ **changeset** `+74` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Studio and Factory now share controls for choosing a model and adding attachments. This makes their composers more consistent while letting each app provide its own models and settings. ## Summary - Added `ModelPicker` to `@mastra/playground-ui` with provider filtering, model search, mobile and desktop layouts, default-model labels, and an optional reset action. Searches can include disconnected providers and show up to 50 matches. - Added shared composer components for attachment menus, status rows, action groups, and overlay headers. Studio and Factory now use shared composer controls. - Updated Factory’s composer so connection loss disables sending but not typing. The reconnect notice can appear as an overlay. - Updated thinking-level controls with a brain-cell ramp, loading and unavailable states, and an optional reset action. The ramp supports keyboard and assistive-technology input. Removed `ThinkingLevelSlider`. - Updated Studio’s model switcher to mark the configured agent model as the default and offer a reset when another model is selected. - Added tests and Storybook examples for the shared picker, attachment menus, composer layouts, and thinking-level controls. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> |
||
|
|
feb0bee7e5 |
fix(playground-ui): wrap filter rows cleanly on narrow screens (#29786)
## Description Filter rows break badly on phones. When the filters and the controls on the right don't fit on one line, the filter input drops under the time range and the right-hand controls float beside it. Now the controls wrap onto their own line, right-aligned, and the filter input fills the rest of the first line. The input also shrinks a little further before wrapping, and it grows up to 320px on wide screens. It's a component change, so every page gets it without a new prop. This replaces the call-site overrides in mastra-ai/platform#4524, per the discussion with Max and Damien. **Narrow (416px).** The start group can't fit beside the toggle, so the toggle wraps as a whole instead of squeezing the filters. | | Light | Dark | | --- | --- | --- | | Before |  |  | | After |  |  | **Wide (960px).** Everything fits, so the row stays on one line and the input grows to 320px. | | Light | Dark | | --- | --- | --- | | Before |  |  | | After |  |  | Both from the new `Layout/ActionRow/With Filter Bar` story. Verified: playground-ui typecheck and oxlint pass. 1994 of 1995 FilterBar, ActionRow, traces, spans, threads, metrics and SavedViews tests pass; the one failure was a metrics retry test this change doesn't touch, and it passed on rerun. Checked every toolbar in the toolbar audit story at 474px and 1440px. ## Related issue(s) Fixes PLTFRM-3335 ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [x] I have linked the related issue(s) in the description above - [ ] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The filter row now uses its space better on small screens. The filter stays beside the time range when it can, while the controls on the right move to a new line when needed. ## Changes - Updated `ActionRow.Start` to size to its content while retaining its minimum width. - Adjusted the top-level filter input to shrink further on narrow screens and grow up to 320px on wider screens. Reduced minimum widths for its field, operator, and value steps. Inputs inside advanced filter groups keep their previous sizing. - Added a `WithFilterBar` Storybook story with narrow- and wide-layout assertions. - Added a patch changeset for `@mastra/playground-ui`. ## Validation - The story defines layout assertions for narrow and wide widths. Completed run results are not available. - Typecheck, lint, and test results are not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f2aac6ae0e |
fix(playground-ui): keep the KPI row aligned with the dashboard when it has controls (#29753)
## Summary On dashboards that can be edited, pinned, or turned into alerts, the KPI row came out narrower than the cards above and below it. The KPI group has no title to hold its controls, so the drag handle, alert button and pin button sat beside the cards. That took space from both sides of the row and broke the dashboard's grid edges. The controls now sit in a small toolbar that floats over the group's top-left edge. They only show on hover, on keyboard focus, or while the alert menu is open, so they take no layout space and the KPI cards line up with the rest of the dashboard. Also adds an `Experiments/Dashboards/KPI widget controls` Storybook story that compares the layout options considered (current, header strip, in-card, floating, edit frame). ## Trade-off The KPI group's unpin button is now hover-only even when pinned, unlike chart cards, which keep it visible once pinned. This keeps the row's spacing consistent in every state. Keyboard users can still reach it. ## Test plan - [x] `vitest run src/domains/dashboards`: 276 tests pass, including a new test that checks the KPI group's pin waits for hover whether pinned or not - [x] Existing drag-handle, pin and alert tests for the KPI group still pass - [x] `pnpm typecheck` and `pnpm lint` (0 errors) in `packages/playground-ui` - [x] Checked visually in Storybook (`Dashboards/DashboardRenderer/Card alerts`): in edit mode at rest the KPI row aligns with the charts, the toolbar shows on hover, and the alert menu keeps it visible while it's open <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The KPI row was getting squeezed when its buttons sat beside the figures. This change moves the buttons above the row so it can stay aligned with the other dashboard cards. ## Changes - The move, alert, and pin controls now float above the KPI row. - The controls remain visible while the dashboard is being rearranged or when the KPI row is pinned. Otherwise, they appear on hover, keyboard focus, or while the alert menu is open. - The alert control is only created when the data gate is ready. The toolbar is omitted when no controls are available. - Dashboard tests now cover KPI move-handle visibility, pin and unpin visibility, and pointer handling for hidden controls. - Added a patch changeset for `@mastra/playground-ui`. ## Checks Test, typecheck, and lint results on the current head: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
f342ac3915 |
perf(playground-ui,factory-ui): stop re-rendering unchanged list items and chat snapshots (#29596)
**─────── TLDR ───────** > While a reply streams, long Markdown lists and the Factory chat stop re-rendering the parts that did not change. Two hot paths from a profiling pass. A streamed list re-parsed every one of its items on each chunk, so a 20 KB list cost about 17 ms per chunk. And every `display_state_changed` snapshot re-rendered the whole Factory chat, even when the usage, memory progress and buffering flags it carries matched what was already on screen. ### Behavior changed a reply streaming a long list ├─ **was** — each chunk re-parses the whole list └─ **now** — only the item still being written re-parses a list the lines alone can't settle (lazy lines, mixed markers, tabs, a task item underlined into a heading) └─ **unchanged** — parsed whole, as before a host that overrides `ul`/`ol` or passes `remarkPlugins` └─ **unchanged** — lists stay whole, so the host still shapes them a snapshot that repeats what the chat shows ├─ **was** — the whole chat re-renders └─ **now** — the reducer returns the same state and React skips it The settled markup is the same as on `main`. I compared it in Storybook: same DOM, same selected text, and byte-identical screenshots at 390, 820 and 1280 px. A random check also matched `main` at every character prefix of 400 generated lists. ### Gain | jsdom, React production build, n=500 | before p50 / mean | after p50 / mean | |---|---|---| | 20 KB tight list, per chunk | 17.2 / 17.7 ms | 1.46 / 1.63 ms | | 20 KB loose numbered list, per chunk | 29.6 / 30.6 ms | 1.24 / 1.29 ms | | repeated snapshot, 200 transcript entries | 1.23 / 1.34 ms | 0.008 / 0.009 ms | jsdom has no layout or paint, so treat these as a lower bound. On its own harness the audit measured 18.9 ms p50 for the list and at least 1.9 ms for the snapshot. ### Decisions - **lists split only when the lines prove how they parse** — a wrong guess changes the markup; unclear lists stay whole - **`remend` now closes markers in the last item only, before its trailing blank lines** — an unclosed `*` from an earlier item no longer leaks a closer mid-stream, and the closer lands inside the item rather than as a stray paragraph in the list - **kept the full snapshots subscribed** — `displayState: false` would also drop the initial snapshot, and the reducer guard gets the same win - **the guard compares the whole next state** — `replaceEqualDeep` returns the same object when nothing changed, so a field added to the snapshot later can't be left out of a hand-written check ### Not verified - [ ] timings in a real browser — every number above is jsdom - [ ] a live Factory chat against a real agent — the guard ran in unit tests and a jsdom harness only --- > ██████████████████ **tests** `+264 −1` — 50% of the additions > █████████████████ **source** `+252 −30` > █ **changeset** `+11` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 While a reply is being written, the chat does less repeated work on long lists and unchanged status updates. This helps the reply update more efficiently while preserving its displayed content. ## Changes - Added `splitList` to split eligible Markdown lists into top-level items. It keeps lists whole when their structure is ambiguous. - Updated `MarkdownRenderer` to parse eligible list items separately during streaming. It keeps the list whole when `ul` or `ol` components are overridden or extra remark plugins are supplied. - Updated the Factory runtime reducer to reuse the existing state when a `display_state_changed` snapshot produces no structural change. - Added tests for list splitting, streamed list rendering, compatibility with plugins and component overrides, and repeated status snapshots. - Added patch changesets for `mastra`, `@mastra/factory`, and `@mastra/playground-ui`. ## Validation - Completed CI, build, and test results: not available. - Current review finding counts: not available. - Real-browser performance results and a live Factory chat against a real agent: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
d0f3dc47c3 |
feat(playground-ui): rename dashboard widget titles in place (#29751)
Dashboard widget titles couldn't be customised from outside
`@mastra/playground-ui`, so there was no way to let people rename a
widget where it sits. `ChartCard` and `StatelessWidget` now accept an
optional `onTitleChange`, and when it's set a plain title becomes
editable in place.
```tsx
<StatelessWidget {...widgetProps} onTitleChange={title => saveWidget({ ...widget, title })} />
```
At rest the title looks exactly like before. Hovering or focusing it
shows a dashed outline using the existing border tokens. Enter or
clicking away saves the trimmed title (only when it actually changed)
and Escape cancels. Long titles still truncate with an ellipsis, and the
title stays aligned with the drag handle. Titles that have a view menu
or an expand link stay read-only, KPI cards aren't affected, and nothing
changes when the prop isn't passed. Saving the new title is left to the
consumer.
Testing: unit tests next to `ChartCard` cover when the title is
editable, Enter/blur commits, Escape reverts, unchanged edits are
ignored, and the menu/link cases render no input. A `StatelessWidget`
test checks that a timeseries widget forwards the new title. There's
also a new `EditableTitle` story in Storybook that I checked with
Playwright for the hover/focus outline, truncation and drag-handle
alignment. Typecheck and lint are clean.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
Dashboard users can rename eligible widget titles directly on the card.
The dashboard host still saves the new title and supplies it back to the
widget.
## Summary
- Added optional `onTitleChange` callbacks to `ChartCard`,
`StatelessWidget`, and `WidgetKindProps`.
- When the callback is provided, a plain title becomes an input. Enter
or blur submits the trimmed title if it changed. Escape restores the
current title.
- Titles with a view menu or link remain read-only. Hero cards do not
support editing.
- Passed the callback through the timeseries, scores, and table widget
paths. Multi-view table titles remain read-only.
- Added tests for title editing and read-only cases, a `StatelessWidget`
forwarding test, and an `EditableTitle` Storybook story.
**Change size:** 12 files changed; 262 lines added and 6 removed.
**Test and CI results:** not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
c2026a2e4a |
feat(ui): update empty states UI for charts (#29740)
## Description
Every empty chart now looks the same: it keeps its dates but drops its
lines and y-axis, under dashed rulers and "No data in this range".
Before, each card wrote its own sentence ("No requests in this range.",
"No vCPU usage in this range.") over an empty y-axis, and some totals
showed "—" while others showed 0. Legends also stay hidden while a chart
loads or is empty, since there's nothing for them to label.
## Before / After
Platform's Monitoring page for a range with no data:
| Before | After |
| --- | --- |
| <img
src="https://github.com/user-attachments/assets/b6d68e37-7014-45e4-bcbc-c4a2abb5d4e0"
width="440" alt="Before"> | <img
src="https://github.com/user-attachments/assets/f26b20d6-5804-4ce0-a8b8-a413334fd98d"
width="440" alt="After"> |
## What changed
- `ChartArea` draws the shared empty state. `emptyMessage` stays, but
only for a reason other than an empty range (e.g. an alert preview that
can't run yet); every caller that described an empty range drops it.
- Empty totals show 0: latency (a peak included), timeseries widgets and
distinct ids. A chart whose request failed shows no total beside its
error.
- `timeseries` and `scores` widgets: the `emptyMessage` option is
deprecated (saved definitions still parse); table widgets keep theirs.
`ChartCard` hides the legend over a loading or empty chart.
## Testing
1. `pnpm -F @mastra/playground-ui storybook`, open
Metrics/ChartCard/Compact Empty: dates only, three dashed rulers, "No
data in this range", no legend, total 0.
2. In Platform's Monitoring page (with the Platform bump PR), pick a
route with no requests in the range: every chart reads the same.
Typecheck and the dashboards, metrics and chart tests pass.
## Related issue(s)
None.
## Type of change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Checklist
- [ ] I have linked the related issue(s) in the description above
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
When a chart has no data for the selected date range, it now shows the
same clear message and keeps the date labels. The change also shows zero
totals where appropriate and hides totals when a request fails.
## Changes
- Added a shared empty state to `ChartArea` with dashed rulers and “No
data in this range.”
- Hid the y-axis on empty charts and hid legends while charts load or
have no data.
- Removed chart-specific empty messages from metrics and dashboard
charts.
- Updated latency, timeseries, and distinct-ID totals to show zero for
empty ranges. Totals remain hidden when requests fail.
- Deprecated `emptyMessage` for timeseries and scores widgets. Saved
definitions still parse it, and table widgets retain the option.
- Added a compact empty-chart Storybook story, updated related tests,
and added a changeset.
## Checks
Test, typecheck, and build results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
94b1641919 |
fix(core): prepare structured output schemas for strict Azure OpenAI requests (#29590)
## Description
Structured output on Azure OpenAI models sent a strict json_schema
without preparing it, so Azure rejected any schema with an optional
field:
```ts
import { createAzure } from '@ai-sdk/azure'; // v3, AI SDK 6
const agent = new Agent({ model: createAzure({ resourceName, apiKey }).responses('gpt-5.4'), ... });
await agent.generate('hi', {
structuredOutput: { schema: z.object({ reply: z.string(), note: z.string().optional() }) },
});
// before: Invalid schema for response_format 'response': ... Missing 'note'.
// after: { reply: 'hi there' }
```
The same 400 happened with `AzureOpenAIGateway` or AI SDK 5
`@ai-sdk/azure` models set to `strictJsonSchema: true`.
`usesOpenAIStrictJsonSchema` now reads `strictJsonSchema` from the
provider options key and default that `@ai-sdk/azure` uses for each
model type (AI SDK 5 defaults to non-strict, AI SDK 6+ to strict) and
prepares the schema only when the request is strict. It never changes
the strict flag, so AI SDK 5 and `AzureOpenAIGateway` defaults stay as
they are, and tool strictness is untouched. Free-form schemas
(`z.record`) stay unprepared on Azure, since preparing them would drop
their keys.
Left for follow-ups:
- `AzureOpenAIGateway` still defaults to non-strict, and on AI SDK 5
opting in makes every tool strict too, because `@ai-sdk/azure` 2.x uses
one flag for both. Moving the gateway to `@ai-sdk/azure` v3 would
separate them.
- Durable and evented runs skip the null-to-undefined transform for
strict answers, for `openai/*` models as well. The new scenario pins
those cases with `it.fails`.
Tests: an aimock scenario runs the real `@ai-sdk/azure` v2 and v3
providers over HTTP on every engine and checks the request body and the
returned object. It adds `@ai-sdk/azure-v6` as a dev dependency, named
like the existing `@ai-sdk/openai-v6` alias. A table test in
`execute.test.ts` covers the option lookup for each model type,
including the gateway. The new strict cases fail on `main`.
## Related issue(s)
Refs #28593. The issue stays open for the gateway's non-strict default
and strict tool schemas on AI SDK 5.
## Type of change
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Checklist
- [x] I have linked the related issue(s) in the description above
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
Azure OpenAI can reject structured-output schemas when strict mode is on
and optional fields are not marked as required. This change prepares
those schemas when the model’s settings indicate strict mode, while
keeping non-strict defaults and free-form schemas unchanged.
## Changes
- Added strict-mode detection for Azure OpenAI provider IDs. It reads
`strictJsonSchema` from provider options according to the provider and
SDK version.
- Prepares Azure structured-output schemas when the request is strict.
It does not change the strict flag or tool strictness.
- Leaves Azure free-form output schemas unprepared because preparation
would remove their free-form keys.
- Added tests for provider-option lookup, strict-mode defaults, schema
preparation, and free-form schemas.
- Added scenario tests for AI SDK 6 Azure Chat and Responses models,
plus AI SDK 5 Responses and `AzureOpenAIGateway` with strict mode
enabled. Durable and evented cases for strict answers with null values
are marked as expected failures.
- Added a patch changeset for `@mastra/core`. `AzureOpenAIGateway` and
AI SDK 5 requests remain non-strict by default.
- Updated two playground UI type assertions to address lint issues.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
c8a8be6632 |
feat(ui): thin Studio's sidebar icons to the shared line weight (#28868)
Studio's sidebar icons were drawn about twice as thick as the lucide icons next to them (Review Queue, Resources, More) and as Platform's sidebar. This thins 11 of them to the shared `--icon-stroke-width` line weight, keeping their shapes. The product icons (Agent, Workflow, MCP Server) are unchanged. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/16743485-3307-45ef-90c4-33ee995aeb15" width="480" alt="Before"> | <img src="https://github.com/user-attachments/assets/f14872e4-0dce-4d66-8ce6-7bc2174e66eb" width="480" alt="After"> | Icons, before and after:  ## What changed - Metrics, Traces, Logs, Tools, Experiments, Datasets, Scorers, Workspaces and Settings now use their lucide equivalents, which have the same shapes as ours (tree, dots and bars, line chart, hex nut, flask, cylinder, % square, folder, gear). Prompts and Processor keep their own drawings as line icons. - Same names and 16px default size, so call sites don't change. Platform picks them up after the bump. - `SeriesMark` no longer forces fills on line icons, so the Tools marks in the Metrics breakdown stay outlined. ## Scope Agent, Workflow, MCP Server and the other filled icons in `ds/icons` are unchanged. ## Testing 1. Open Studio: Metrics, Traces, Logs and the other icons above have the same line weight as Review Queue and Resources. 2. Agents, Workflows and MCP Servers look the same as before. 3. Metrics → Breakdown → Tools: the marks are outlined. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR updates Studio sidebar icons so their lines have a more consistent weight. It also keeps chart marks from filling in line icons. ## Changes - Replaced the Metrics, Traces, Logs, Tools, Experiments, Datasets, Scorers, Workspaces, and Settings drawings with Lucide icons. - Redrew the Prompts and Processor icons using Lucide’s icon format. - Updated `SeriesMark` so its fill and stroke overrides do not affect Lucide icons. - Left the Agent, Workflow, and MCP Server icons unchanged. ## Validation Test and CI results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6dec94bc70 |
perf(playground-ui): skip redrawing off-screen charts on resize (#29726)
On a page with lots of metrics charts, opening a side panel resizes
every chart at once and they all redraw, which freezes the page. With 20
charts (6 series × 120 points each), that was about 4s of blocked main
thread in a dev build, mostly Recharts re-rendering charts that weren't
even on screen.
This adds `content-visibility: auto` to the `ChartPlot` wrapper:
```css
.chart-plot {
content-visibility: auto;
}
```
Off-screen plots skip layout, so their ResizeObserver doesn't fire and
they only draw once they scroll into view. It sits on the parent of
`.chart-plot-box`, so the observed box itself still gets laid out
normally once visible. It applies to both `MetricsLineChart` and
`MetricsStackedBarChart`.
On the 20-chart stress test, blocked time when opening the panel went
from ~4.2s to ~1.1s, and only the 6 visible charts redraw instead of all
20. The rest catch up as you scroll. I checked tooltips and axis labels
near the plot edges and they render exactly as before (no clipping,
tooltip still sits above the next card).
Test plan: open a page with many metrics charts, toggle a side panel,
and check that the page stays responsive and charts below the fold draw
correctly when scrolled to.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
When the page changes size, charts you cannot see no longer need to
redraw right away. They redraw when you scroll them into view, which can
help the page stay responsive.
## Changes
- Added `content-visibility: auto` to the `ChartPlot` wrapper. This lets
the browser skip layout for off-screen chart content.
- Added a patch changeset for `@mastra/playground-ui`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
009f632534 | chore: version packages | ||
|
|
3b7fd6cae8 |
fix(playground-ui): resolve rolling list ranges against one clock read (#29700) |