0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

Compare commits

...

5 commits

Author SHA1 Message Date
mastra-platform[bot]
a4ba438154 fix(playground-ui): keep the side panel's slides whole when another source opens or closes it
A panel opened while navigation was still sliding closed could take the
edge before navigation had left the screen, so both drawers showed for a
moment. The panel now waits until navigation is fully gone, not just
marked closed.

A panel closed by its parent, rather than by a swipe, Escape or the scrim,
vanished at once instead of sliding out. The panel now stays mounted after
any open settles, so every close plays its slide before unmounting.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-17 08:02:06 +00:00
mastra-platform[bot]
fdbec3e179 refactor(playground-ui): keep one drawer owner in the provider and mount both drawers in the scope
Which edge drawer holds the shared scope was tracked three ways: a
data-reveal-owner attribute on the scope, React state, and an effect in
AsideReveal that closed navigation whenever the panel opened. The owner
now lives in one ref on SidebarProvider that both gestures and the
sidebar's open guard read, and the effect is gone: a panel opened while
navigation is out waits for navigation to close, the same way a swipe is
ignored while the other drawer holds the edge.

The navigation drawer now portals into the scope like the panel does, so
every scope :has() check is a direct-child match instead of a search of
the whole app subtree on each DOM change.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-17 07:43:08 +00:00
mastra-platform[bot]
b07d8695a6 fix(playground-ui): send navigation back when the aside opens from outside
AsideReveal is controlled, so a route or command can set `open` while the
navigation drawer is out. Both drawers then stayed open, and the aside's
inert marks skipped what navigation had already made inert, leaving the page
reachable once navigation let go. The aside now closes navigation and only
comes out once it has, keeping one drawer out at a time.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-17 07:20:12 +00:00
mastra-platform[bot]
eb807b8c19 refactor(playground-ui): share one edge-drawer shell and drive reveal state from CSS
Both edge drawers had their own copy of the modal markup, focus trap,
Escape handling and inert-outside logic, and the aside synced
attributes onto the shared scope from effects and set state during
render. One RevealDrawer now owns that markup; the provider exposes its
scope element through a stable callback ref so the aside can portal into
it, and the stylesheets read open/present state with :has() instead of
JS-written scope markers.

Also closes two one-drawer-at-a-time gaps from review: the sidebar
shortcut can no longer open navigation over an open aside, and focus
returns to whatever opened a drawer when no trigger ref is given.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-17 07:04:47 +00:00
mastra-platform[bot]
1eccf3bd9c feat(factory-ui): swipe the session panel in from the right edge on phones
On phones the session panel only opened as a popover from a header button,
while navigation already slid in with a swipe from the left. The panel now
behaves the same way from the other edge: a leftward swipe slides the page
left to uncover it, and a rightward swipe, Escape, or a tap on the page puts
it back.

The sidebar's reveal gesture now takes a side and a namespace, so both
drawers share one implementation. They also share one gesture scope, and
whichever drawer is out claims it, so a swipe never moves both at once.

Co-Authored-By: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-17 06:46:56 +00:00
17 changed files with 908 additions and 169 deletions