6496 Commits
Author SHA1 Message Date
Oleg Isonen be19033c68 Merge branch 'main' into release-30-06-2026.staging 0.274.5 2026-07-03 18:36:52 +01:00
Oleg Isonen bdb3f3dfd3 fix: MCP style mutation validation (#5855) 2026-07-03 19:35:07 +02:00
Oleg Isonen 371a6d6b8a fix: Validate expression-backed API inputs (#5854)
1. fix the issue with expressions requiring string when expression, this
is an issue not only for meta in page settings but for any field that
supports bindings

2. make sure llm knows when to use bindings and when to just set the
string value, test it with a subagent without additional context
2026-07-03 14:50:39 +02:00
Oleg Isonen b1a3eed1f8 feat: guide agents through webstudio cli (#5847) 2026-07-03 01:06:47 +02:00
Oleg Isonen 8136386161 chore: make pnpm dev start local builder stack (#5853) 2026-07-03 00:01:00 +02:00
Oleg Isonen 3c94dc8c5a Update private-src 2026-07-02 21:51:27 +01:00
Oleg Isonen 4e127c407e update sdk animations 2026-07-02 21:39:11 +01:00
Oleg Isonen 8716010be2 fix: update animation submodule formatting 2026-07-02 21:39:10 +01:00
Oleg Isonen dc134a7795 fix: use SSH URL for animation submodule 2026-07-02 21:39:10 +01:00
Oleg Isonen 607ab20414 ::migrate::add token API permission 2026-07-02 21:39:10 +01:00
Oleg Isonen c36cb902ef build: Release 30-06-2026 2026-07-02 21:39:10 +01:00
Oleg Isonen fdff844a61 Update animation submodule reference 2026-07-02 21:39:10 +01:00
Oleg Isonen a515a4fcbf chore: Change the local setup to use docker only for supabase (#5851)
It was disappearing after played on builder
2026-07-02 21:53:47 +02:00
Oleg Isonen de5c99ce46 fix: Fix stagger animation (#5852) 2026-07-02 19:46:00 +02:00
Oleg Isonen 6ea83ef056 fix: handle redirects for unmatched routes (#5846) 2026-07-01 18:10:43 +02:00
Oleg Isonen 6bf973d5d8 fix: refresh mcp session from dev build (#5845) 2026-07-01 17:45:39 +02:00
Oleg Isonen 9b0cedf9c2 fix: keep project-build out of cli runtime deps (#5844) 0.274.3 2026-07-01 17:07:30 +02:00
Oleg Isonen bfcdef65de chore: Fix/build id sync from main (#5843) 2026-07-01 15:57:26 +02:00
Oleg Isonen a7f1bc6e61 chore: Update animation submodule reference (#5839) 2026-07-01 11:25:44 +02:00
Oleg Isonen e1dec8c456 fix: Bring back import command (#5841) 2026-07-01 11:24:23 +02:00
Oleg Isonen 1ddf6b02c9 feat: API and CLI for everything (#5838)
Closes #5287
2026-07-01 01:20:50 +02:00
Oleg Isonen 65d8a1670f fix: Fix nested collection data variable (#5835) 2026-06-24 22:54:58 +02:00
Oleg Isonen 2a77c2a8b5 feat: Multiselect (#5834)
Closes https://github.com/webstudio-is/webstudio/issues/5310
2026-06-24 21:20:33 +02:00
Oleg Isonen e76c259669 fix: Fix proxied image asset src handling (#5833) 2026-06-24 15:02:23 +02:00
Oleg Isonen 7f91fdc59d fix: Fix gradient stop color variable autocomplete (#5832) 2026-06-24 13:31:11 +02:00
Oleg Isonen 82c3d83fd1 fix: optimize CLI import for large data amount (#5831)
## Summary

- Add CLI project import support from synced `.webstudio/data.json` into
another project via a destination share link.
- Move project bundle import/export contract into
`@webstudio-is/protocol`, including bundle versioning, staged upload
constants, schema validation, and fixture coverage.
- Upload project bundle data through staged TUS upload before calling
the import RPC to avoid request body limits.
- Upload referenced assets as binary files through the existing asset
upload route before importing asset rows.
- Add `--skip-assets` and `--ignore-version-check` import options.
- Add retry handling for transient missing imported asset files by
re-uploading only the reported missing assets.
- Share missing-asset import error formatting/parsing through protocol
to avoid duplicated string contracts.
- Preserve browser asset upload behavior while adding API upload
support.
- Normalize schema naming across the branch to lower-case names without
`Schema` suffix.
2026-06-23 18:50:01 +02:00
Oleg Isonen 64717a71d9 fix: Packages publishing (#5830)
Internal packages publishing issue.
2026-06-23 12:13:22 +02:00
Oleg Isonen b194d3e0b3 feat: Import project via CLI (#5828) 2026-06-23 02:54:55 +02:00
Vianney MORAINandClaude Sonnet 4.6 4575ca9226 fix(storybook): update color import after Figma token pipeline removal (#5826)
Commit db78ae4 (`feat: Bring back blue token color and remove Figma
token sync pipeline`) deleted
`packages/design-system/src/__generated__/figma-design-tokens` but
`.storybook/preview.tsx` still imports `color` from it, breaking
Chromatic/Storybook builds.

The same `color` export already exists in `design-tokens.ts` (the source
that was previously used to generate the deleted file).

```diff
- import { color } from "../packages/design-system/src/__generated__/figma-design-tokens";
+ import { color } from "../packages/design-system/src/design-tokens";
```

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 12:33:37 +02:00
Oleg Isonen e7b7faeca5 fix: performance optimizations (#5827) 2026-06-19 12:23:44 +02:00
Oleg Isonen b67524bc09 fix: Fix published redirect generation (#5825) 2026-06-18 02:38:40 +02:00
Oleg Isonen ac29cf7d1d feat: Keyboard shorthands for instance positioning and slot bug fixes (#5821)
Closes https://github.com/webstudio-is/webstudio/issues/4586
Closes https://github.com/webstudio-is/webstudio/issues/4619

## Summary

Fixes shared Slot editing so linked Slot occurrences stay consistent
across structural edits and labels.

## Changes

- Fixed moving a direct Slot child out of a Slot so the child is removed
from all linked Slot occurrences.
- Fixed unwrapping a direct Slot child so the child is removed from all
linked Slot occurrences.
- Added linked Slot label sync when renaming from Navigator or Settings
panel.
- Added/updated tests for canonical Slots, legacy Slots, nested Slot
children, keyboard moves, unwrap, reparent, and label sync.
- Simplified stale Slot detach logic that was incorrectly cloning only
the selected Slot occurrence.

## Testing

- `pnpm --filter @webstudio-is/builder test --
app/shared/instance-utils/...`
- `pnpm --filter @webstudio-is/builder test --
app/builder/shared/commands.test.ts`
- `pnpm --filter @webstudio-is/builder typecheck`
- `pnpm lint`
- `git diff --check`
2026-06-16 02:25:28 +02:00
Oleg Isonen 7ded63065c fix: Fix insertion into legacy slots (#5820)
## Summary

Fixes insertion into legacy Slot instances whose children are stored
directly under the Slot instead of under the newer hidden Fragment
wrapper.

Previously, adding an element to an old Slot could insert the new
element into the first existing Slot child. The insertion path assumed
the first Slot child was always a Fragment.

## Changes

- Normalize legacy Slot children during insertion by wrapping direct
Slot children in a Fragment.
- Preserve the existing behavior for valid `Slot -> Fragment ->
children` structures.
- Add regression tests for:
  - low-level `insertInstanceChildrenMutable`
  - UI-facing `insertWebstudioElementAt`

## Validation

```bash
pnpm --filter @webstudio-is/builder test -- app/shared/instance-utils.test.tsx
pnpm --filter @webstudio-is/builder typecheck
```
2026-06-15 03:17:10 +02:00
Oleg Isonen c8d9a27023 fix: Make accordion forceMount template-scoped (#5819)
We changed forceMount by default to true in the component, which broke
existing instances.
2026-06-15 01:45:56 +02:00
Oleg Isonen 4beffcd194 fix: Fix slot's getting out of sync between pages (#5818) 2026-06-13 13:37:27 +02:00
Oleg Isonen 953ab1eb79 fix: fix bindings crash (#5817) 2026-06-13 12:29:14 +02:00
Oleg Isonen 8764b57a49 fix: prevent data variable creation crash (#5815) 2026-06-13 12:22:25 +02:00
Oleg Isonen bb46731243 fix: prevent self-hosted animation rerenders (#5813)
User reported:

The repeated animation issue has been fixed on Webstudio Cloud hosting,
but the bug still exists — and is actually even worse — on self-hosted
deployments, whether it's on Netlify or Vercel.

Animations sometimes play twice on the initial page load. They also
replay before navigating to another page and when clicking an anchor
link that points to a section on the same page.

Additionally, on the very first visit to the website, the first
interaction with Radix components causes all animations to replay again.
As far as I can tell, this no longer happens after assets are cached,
but the initial glitch is still noticeable and doesn't look very
polished from a user experience perspective.
2026-06-12 13:49:14 +02:00
Oleg Isonen db78ae4dcc feat: Bring back blue token color on style source and remove Figma token sync pipeline (#5812)
Originally we made the token color purple to make it more distinct from
local style source, but now local style source is visually different and
having both blue makes sense because when its blue, active style values
are matching the blue color and it makes it more clear what that blue
color on values means.
2026-06-12 12:43:14 +02:00
Oleg Isonen f52545a2e9 fix: Fix expression binding editing (#5811)
## Summary

Fix expression binding editing when changing assignment/comparison
operators in the binding editor.

## Changes

- Fix duplicate variable replacement in assignment expressions like
`system.origin = ...`
- Align assignment target handling across expression linting, identifier
collection, and transpilation
- Prevent executable transpilation from adding optional chaining to
assignment targets, avoiding invalid JS like `a?.b = c`
- Preserve CodeMirror selection when syncing external editor values so
the cursor does not jump to the beginning
- Add regression coverage for:
  - `system.origin = ...` variable roundtrip
  - direct, member, computed, nested, compound, and logical assignments
  - destructuring assignment rejection
  - executable assignment transpilation parse safety
  - editor selection clamping

## Testing

- `pnpm --filter @webstudio-is/sdk exec vitest run
src/expression.test.ts`
- `pnpm --filter @webstudio-is/sdk exec tsc --noEmit`
- `pnpm --filter @webstudio-is/builder exec vitest run
app/shared/code-editor-base.test.ts app/shared/data-variables.test.tsx
app/builder/shared/expression-editor.test.ts
app/builder/shared/binding-popover.test.ts`
- `pnpm --filter @webstudio-is/builder exec tsc --noEmit`
- `git diff --check`
2026-06-11 23:35:11 +02:00
Oleg Isonen c3d2fa7fa3 feat: Render current page state on links in preview mode (#5810)
Closes https://github.com/webstudio-is/webstudio/issues/5207
2026-06-11 21:11:11 +02:00
Oleg Isonen 2b06b2a987 fix: Fix current link state in static export (#5809)
Closes https://github.com/webstudio-is/webstudio/issues/3909

Current page state for links doesn't work with static export
2026-06-11 00:24:46 +02:00
Oleg Isonen c585918459 fix: Fix text binding rendering for non-text values (#5808)
Closes https://github.com/webstudio-is/webstudio/issues/2966

## Description

Fixes visitor-facing crashes when a text binding resolves to a non-text
value, such as an object returned from a resource.

Generated expression children now render through `renderText`, which
preserves strings and numbers and renders other runtime values as empty
text. This prevents React SSR from throwing `Objects are not valid as a
React child` when resource data shape changes unexpectedly.

## Changes

- Added `renderText(value)` runtime helper.
- Wrapped generated expression children with `renderText(...)`.
- Updated generated page imports to include `renderText`.
- Added rendering tests for resource status/error fields and
object-shaped bindings.

## Tests

```bash
pnpm --filter @webstudio-is/react-sdk test -- context.test.tsx component-generator.test.tsx
pnpm --filter @webstudio-is/react-sdk typecheck
pnpm --filter ./packages/cli typecheck
2026-06-10 20:55:00 +02:00
Oleg Isonen 42dd848dc1 fix: Fix trailing space in instance name input (#5807)
Closes https://github.com/webstudio-is/webstudio/issues/4729
2026-06-10 19:52:28 +02:00
Oleg Isonen f099e60b51 fix: Accordion SEO (#5804)
Closes https://github.com/webstudio-is/webstudio/issues/5236
2026-06-10 19:18:39 +02:00
Oleg Isonen 7a6ffcb229 fix: Fix share link options saving (#5805) 2026-06-10 14:23:18 +02:00
Oleg Isonen 03f398d9b2 fix: Fix local link matching when query params are used (#5802)
Closes https://github.com/webstudio-is/webstudio/issues/5377


## Summary

Fixes local link matching so links are marked current only when the full
URL matches: pathname, search query, and hash.

## Changes

- Replaced duplicated Remix/React Router `Link` logic with a shared
`createLocalLink` helper.
- Switched from `NavLink` route-only active matching to explicit full
URL matching.
- Preserved exact `end`-style behavior while also requiring query/hash
equality.
- Kept hash-only links as native anchors so current search params are
not rewritten.
- Preserved browser-like behavior for `href=""` by resolving it to the
full current URL.
- Kept asset/external/protocol links as plain anchors.
- Added comments explaining why the shared local-link code exists and
why specific edge cases avoid router navigation.

## Tests

- Added URL matching unit tests for pathname/search/hash, case
sensitivity, trailing slash, empty href, hash href, and router-resolved
paths.
- Added React Router integration coverage for:
  - exact active/current matching
  - query/hash mismatches
  - active class and `aria-current`
  - hash-only links
  - empty links preserving search/hash
  - external/protocol/asset links
  - relative route links
  - `preventDefault`
  - pending navigation/render behavior
  - same-url resource updates
  - HTML embed navigation behavior

## Verification

- `pnpm --filter @webstudio-is/sdk-components-react test`
- `pnpm --filter @webstudio-is/sdk-components-react-router test`
- `pnpm --filter @webstudio-is/sdk-components-react typecheck`
- `pnpm --filter @webstudio-is/sdk-components-react-router typecheck`
- `pnpm --filter @webstudio-is/sdk-components-react-remix typecheck`
- `pnpm --filter @webstudio-is/sdk-components-react dts`
- `pnpm --filter @webstudio-is/sdk-components-react-router dts`
- `pnpm --filter @webstudio-is/sdk-components-react-remix dts`
2026-06-10 00:06:33 +02:00
Oleg Isonen 4d3cca74e2 fix: Enable greedy redirects (#5801)
Closes #5625

## Description

Fixes greedy redirects like:

```txt
/privat/* -> /*
2026-06-09 22:00:20 +02:00
Oleg Isonen bffc4597fe fix: Prevent outgoing page rerender during navigation (#5800)
**Description**

Prevents published pages from rerendering the outgoing generated page
during pending internal navigation.

React Router can rerender the current route while the next route loader
is pending. The generated `Page` was rendered directly inside that
route, so the entire outgoing page could rerender before the next page
appeared.

This adds a memoized `PageBoundary` keyed by `url`, so the generated
page only rerenders/remounts when the actual page URL changes. The SDK
context value is memoized by `resources`, preserving same-URL resource
updates without exposing the full page tree to unrelated
pending-navigation rerenders.

**Changes**
- Added `PageBoundary` to React Router and Remix/default HTML route
templates.
- Kept `key={url}` behavior for HTML Embed script reloads on dynamic
pages.
- Added regression tests for:
  - no outgoing page rerender while destination navigation is pending
  - same-URL resource changes still update generated page content
- Added Vitest setup for `sdk-components-react-router`.

**Verification**
```txt
pnpm --filter @webstudio-is/sdk-components-react-router test src/link.test.tsx
pnpm --filter @webstudio-is/sdk-components-react-router typecheck
pnpm --filter @webstudio-is/sdk-cli typecheck
```
2026-06-09 19:27:40 +02:00
Oleg Isonen 96433918b7 fix: fix page context menu actions (#5799) 2026-06-09 15:52:36 +02:00