mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-01 21:05:42 +09:00
fc5b7e140e77fc88ea006eb4f4bae9fb2b0ffb3b
6820
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fc5b7e140e |
test: Cover Builder tRPC request workflows (#6720)
Builder features that use tRPC need request-level coverage beyond publishing. This PR shares the publish request interceptor and uses it to test uncovered UI flows across the HTTP boundary. It only changes test support and tests; product behavior and API contracts stay unchanged. ## Todos - [x] Move the tRPC interceptor into shared Builder test support and update its publish tests. - [x] Replace the JSX paste test’s tRPC client mock with an intercepted request. - [x] Test workspace member invitations for success and server rejection. - [x] Test accepting and declining notifications. - [x] Test backup loading and both successful and failed restores. - [x] Make the shared interceptor reject invalid batch requests, enforce each request's method, and reject unregistered routes. - [x] Review Builder docs; the existing dashboard guide already describes invitations, and these test-only changes need no doc update. - [x] Run focused browser tests, Builder typecheck, lint, and formatting checks. - [x] Wait for CI on the latest commit. ## Verification - Publish browser tests: 19 files, 199 tests passed. - Shared tRPC, notifications, and backups: 3 files, 12 tests passed. - JSX paste request tests: 1 file, 6 tests passed. - Workspace member request tests: 1 file, 2 tests passed. - New regression tests failed against the previous implementation and passed with the fix. - Builder typecheck, changed-file lint, formatting, diff checks, and CI passed. Ref #6719 |
||
|
|
0fc5744719 |
fix: Keep publish audit warnings linked to instances (#6715)
Fixes #6714 Validate and Publish now use the same audit formatter, location details, and instance links. This keeps messages consistent and preserves the link from publisher findings. Free-plan location redaction remains unchanged. ## Checklist - [x] Use one shared mapper for local and publisher audit findings, excluding info findings. - [x] Add a Builder browser regression test for a published warning and its **Show element** link. - [x] Update publish-test fixtures to use the structured audit response shape and SDK instance type. - [x] Remove redundant Publish-dialog startup and repeated close/reopen work from the session tests. - [x] Allow the static integration test’s module setup extra time under the full browser suite without changing global test timeouts. - [x] Give only the three browser tests that exceeded the 15-second shard limit a 30-second limit. - [x] Review Builder publishing documentation; the existing paid-plan element-link guidance already covers this behavior, so no documentation change is needed. - [x] Run Builder typecheck and lint. - [x] Run Publish tests: 203 passed; focused changed files also pass 13 tests after the test-timeout changes. - [ ] Confirm the Builder-core CI jobs pass after the repeated-publish helper cleanup. |
||
|
|
02f62eeaf2 |
fix: Keep style source clicks from focusing the input (#6717)
Clicking a style source or the empty space around it no longer moves focus to the new source input. Keyboard navigation that focuses the field container still moves focus into the input. The field now forwards focus only when the container itself receives focus. It prevents a mouse click on empty container space from triggering that focus path. Source buttons keep their own focus and menu behavior. - [x] Update focus behavior for source controls and the field container. - [x] Add a browser regression test; confirmed it failed before the fix and passes now. - [x] Run the focused browser tests (14 passed), Builder typecheck, formatting, and lint. - [x] Review documentation impact: existing Style panel guidance still applies; no doc change needed. - [x] Review fixture impact: no fixture inputs or outputs changed. - [ ] CI: Builder core jobs and visual regression remain red for the separate failures below. CI findings on the latest commit: - The changed Style sources test passes in the full Builder suite. Builder app tests, end to end shards, lint, and submodule checks pass. - Builder core jobs fail in static publish tests with varying timeouts and assertions under the full suite. The five static publish tests pass when run alone locally. See the [main workflow](https://github.com/webstudio-is/webstudio/actions/runs/44212698257). - Visual regression reports a 440 pixel difference in the Color Picker Oklch story. This PR does not change that story or its styles. The same difference appeared on retry. See the [visual workflow](https://github.com/webstudio-is/webstudio/actions/runs/44212698286). No migrations or data changes. Closes #6716 |
||
|
|
b9801bb731 |
fix: Keep current page links active after anchor navigation (#6711)
A link to the current page loses its Current page styling after an anchor jump or when opened with a hash. Keep the page link active, and select only the matching section link when the URL has a fragment. Ref #5377 ## Changes - Match path and query exactly. - With no current fragment, match all links with that path and query. - With a current fragment, match links without a fragment and links with that exact fragment. - Keep the existing `:local-link` polyfill to `[aria-current=page]`. An explicit `aria-current` value can override that styling. - Give static pages the browser URL after hydration and update link state on fragment changes. ## Todo - [x] Implement the mixed path, query, and fragment matching rule. - [x] Cover plain links, router links, direct fragment loads, anchor navigation, and static hydration. - [x] Document the rule and its difference from standard `:local-link` behavior, with the MDN reference. - [x] Remove the redundant CSS selector rewrite, parser dependency, generated schema snapshot, and unneeded history listener. - [x] Run focused tests, typechecks, lint, formatting, and review the final diff. - [x] Confirm required CI checks pass on the latest cleanup commit. ## Verification - SDK link URL tests: 18 passed. - Plain React Link and hydration tests: 10 passed; hydration test passed again after narrowing the subscription to fragment changes. - Router Link tests: 23 passed. - SDK, React Link, router, and CSS engine typechecks passed. - Changed code passed oxlint, oxfmt, and `git diff --check`. - Native fragment event behavior was checked in Chromium, Firefox, and WebKit; hydration behavior was checked in Chromium. - Required GitHub CI passed on `9758b19a6d92c7ab8a2efc7efa553f725a68109f`; the empty Builder core shard passed on retry. ## Behavior note This mixed rule is Webstudio behavior, not the current CSS `:local-link` draft, which ignores fragments on both URLs. Local Link styling follows this mixed match. The mixed match also sets `aria-current="page"` by default, including on section links. Authors can set another value explicitly. |
||
|
|
aeb34e3c70 |
fix: Show origin-based resource data in canvas (#6710)
A resource using `system.origin` can show the right value in Settings while Canvas and Preview stay empty. Canvas needs the same published host as Builder to find the cached resource response. This PR targets `main` from `org.staging`. It does not change stored project data or the published runtime. ## Plan and verification - [x] Apply the minimal host synchronization fix on top of `main`. - [x] Confirm the regression test fails before the fix and passes afterward. - [x] Run 97 focused tests, Builder typecheck, lint, format, and package-boundary checks on `main`. - [x] Check the staging behavior with a real shared project (confirmed by the reporter). - [x] Run a local database-backed Builder and Canvas check with a non-default publisher host (passed). - [x] Review documentation impact: existing behavior is restored; no docs update needed. - [x] Review fixture impact: the current `main` merge supplied the required E2E schema snapshot; no fixture change is needed in this PR. - [ ] Stabilize the two publish tests that failed in the full CI suite after the `main` merge. - [ ] Required PR checks pass. The local full Builder core suite also reported unrelated style and form test failures under parallel load; the focused publish tests passed. The PR run is the final verification for the CI test fix. Ref #3343 |
||
|
|
244b26e310 |
fix: keep diagnostic findings inline (#6708)
Diagnostics keeps Errors and Warnings in their lists, shows available explanations and instance links inline, and removes the separate details/Back screen. Ordinary instance-link clicks close Diagnostics; modified clicks are preserved. ## Todo - [x] Keep errors and warnings inline with their details and instance links. - [x] Remove the details/Back screen and related state. - [x] Add focused coverage for inline findings and instance-link click behavior. - [x] Stabilize publish browser-test interactions under parallel CI. - [x] Wait for static-export controls before interacting and remove redundant keyboard-copy coverage. - [x] Use Radix pointer events and allow async publish/log assertions to settle under the full CI suite. - [x] Run diagnostics and publish tests, typecheck, lint, formatting, and diff checks. - [x] Generate the Builder E2E schema snapshot required by CI. - [x] Rebase on main; the snapshot is now present upstream. - [x] Review Builder docs; no documentation changes are needed. ## Verification - The full `core-*` Builder test command passed locally: 1,770 passed, 1 skipped. - Builder typecheck, focused lint, formatting, and diff checks passed. - CI has started for the latest commit. |
||
|
|
b9319a3891 |
perf: share CLI startup for user-site publishing (#6704)
This PR reduces user-site publish time by sharing CLI startup between sync and build, reducing asset downloads when hosted builds do not need them, and testing smaller publish artifacts. The paired [SaaS PR #685](https://github.com/webstudio-is/webstudio-saas/pull/685) uses the combined CLI path when the Builder artifact advertises support; older artifacts keep the existing split path. The paired staging publish served HTML and JavaScript successfully. The combined CLI step took 4 s versus about 8 s for the previous split steps in that run; total publish time remained about 40 s. This is one observation, not a controlled benchmark or a large-site measurement. Local artifact pruning reduced the compressed archive from 119 MiB to 111 MiB (6.7%); it was not adopted. The full artifact is still downloaded and extracted on every publish. ## Checklist - [x] Preserve standalone sync/build behavior and gate combined sync/build with an artifact capability marker. - [x] Skip hosted asset downloads only when content indexing does not need them; preserve static and MDX-required downloads. - [x] Test CLI startup, synthetic build, and artifact-size opportunities; record why no riskier change was adopted. - [x] Verify the paired staging publish and review Builder documentation. - [x] Keep only the E2E schema snapshot matching current inputs; no migration source or migration was added. - [x] Retry the failing `pages-drag` shard: all 17 tests passed, including the drag-and-nest test. - [x] Resolve the two outdated review threads; current code retains finding details and closes diagnostics on element navigation. - [x] Required CI on the cleanup commit passed, including all Builder E2E shards, visual regression, and the existing migration-chain check. - [ ] Run the agent evaluation suite only after separate approval; remind the user before merging. No large-site publish or production release has been tested. |
||
|
|
9a86222afd |
perf: Cut Builder E2E shard startup and repeated work (#6705)
The five-worker A/B run (`3d464ec2`, run 43985693015) passed all 61 E2E
cases and every Main check. Full shard jobs took **197, 201, 218, 226,
and 233 seconds** with a warm Builder build cache. Browser phases were
**154, 147, 169, 184, and 186 seconds**, totaling about 18 seconds more
than the four-worker warm run (`6f87754c`, run 43983946199). Five
workers raised CPU scheduling pressure from 72–74% to 77–84%. Four
workers are restored; all five jobs still need to finish under 180
seconds.
The merged-main run (`dfa0fc97`, run 43981570428) passed all **61 E2E
tests** and every Main workflow check. Its cold build cache made each
shard wait about 35–41 seconds for the shared Builder artifact. Full job
times were **285, 246, 227, 202, and 228 seconds**; browser phases were
**196, 154, 138, 116, and 140 seconds**. CPU scheduling pressure was
68–71%, with no memory pressure. A same-SHA rerun hit the Builder build
cache on shard 1: the full job fell to 215 seconds and browser work took
155.9 seconds. Warm setup is cheaper, but shard 1 still misses 180
seconds. The other four jobs have not been rerun warm.
The warm-cache full run on commit `3c0a936d` passed all 60 browser cases
across five fixed shards with three workers. Full jobs took 184, 191,
124, 161, and 190 seconds. Shards 1, 2, and 5 remain 4–11 seconds over
the 180-second target.
Browser phases took 137.5, 140.3, 77.0, 117.4, and 134.0 seconds. Setup
and cleanup added 44–56 seconds. All caches hit, and source checkout
took about 1–2 seconds.
The latest warm-cache run on `8a8f04b4` passed all 60 cases, but browser
phases were 85.9, 129.8, 193.2, 169.9, and 138.4 seconds. Shard 3's
Email binding test alone took 96.8 seconds in this run, versus 50.5 and
59.2 seconds in two earlier runs. This shows the current fixed
assignment is still too uneven and timings vary by run. The third
assignment moved Data variables from shard 1 to 3, Style panel from
shard 2 to 4, and Animation runtime from shard 2 to 5. All 60 cases
passed, but browser phases were 93.7, 150.2, 156.7, 110.6, and 167.2
seconds. Shards 2, 3, and 5 remain above the target once setup is
included. Test times varied sharply from prior runs. Read-only
inspection found no safe material reduction in the 93-second redirect
test or 56-second Asset folder clone test; both use serial state changes
and persistence checks. A separate select-asset-folders test now uses a
direct page reload for its final persistence check, removing an
unnecessary canvas wait. Its focused full-run time changed from 19.9 to
18.8 seconds, but this small result is not a speedup for the slow Asset
folder clone test. The six-move assignment passed all 60 cases on run
43969666884, but browser phases were 166.8, 106.5, 151.5, 183.3, and
123.1 seconds. Only shards 2 and 5 finished under 180 seconds including
setup. The total measured test work was about 1,805 seconds across 15
workers, a 120-second ideal average before scheduling overhead. The
latest run on `b71669bf` passed all 60 cases, with browser phases of
88.4, 123.5, 138.8, 151.4, and 157.1 seconds. Setup added 43–65 seconds.
Only shard 1 finished under 180 seconds for the complete job. The
four-file rebalance reduced the worst complete-job time from about 238
to 209 seconds. Run `66163599` passed all 60 cases; full jobs took about
155, 212, 152, 168, and 173 seconds. Run `1853aef1` also passed all 60,
but jobs were about 180, 157, 203, 166, and 156 seconds; browser phases
were 129, 90, 136, 106, and 103 seconds. Setup and cleanup added 51, 67,
67, 60, and 53 seconds. Shards 1 and 3 missed the 180-second target. CPU
scheduling pressure was 48–62%, with no memory pressure.
Recent changes reduce repeated work and keep the same assertions:
- The variable test uses one saved pre-edit Preview snapshot while
Builder edits and reloads the project on a separate page.
- The two-generation Email test starts from a blank project because it
creates the routes and forms it checks. Both saved production
generations are still built and checked.
- Email delivery forms are authored inside the existing Preview process,
removing a separate Node process start.
- Two shard-3 form tests share one project and production Preview. Their
success/failure results, redirects, browser feedback, scroll behavior,
retry behavior, and saved project redirect checks remain.
- Marketplace settings save both fields in one cycle and keep checks for
each value before and after reload.
- Content-mode rich-text tests save both link edits together while
keeping stored href and link-removal checks.
- MCP form delivery uses a smaller fixture with the same email plan and
Builder permissions; it removes five unused inserts. Warm local timings
were nearly the same.
- The two longest shard-5 cases and the 64-second shard-3 Pages bridge
file moved to lower-load fixed shards. All 60 cases remain assigned
once.
- The shard-3 form-delivery file now sorts earlier so its Preview work
overlaps earlier cases. A local three-worker comparison reduced shard-3
Playwright time from 71.2 to 64.7 seconds.
- The shard-5 callbacks test uses a blank project with its existing
page. It keeps its production Preview and all assertions, removes eight
unrelated database operations, and measured 13.8% faster in focused
local comparisons.
- The shard action starts PostgreSQL and PostgREST image pulls while
pnpm installs dependencies. Both operations still occur; setup and
cleanup still add about 45 seconds.
The latest run (`43990503162`) passed all 61 browser cases, but GitHub
reported full shard jobs of **228/200/176/152/218 seconds**; shards 1,
2, and 5 missed the 180-second target. Hook-aware logs show per-file
work sums of **587/458/358/349/551 seconds**. These are work totals, not
CI wall times, and the two parallel suites on shard 1 made a simple
work-sum rebalance misleading. The current setup change starts and
readies the snapshot database/PostgREST while dependencies install, with
Prisma and Chromium work remaining after installation; its CI saving is
not measured yet.
Run `44008044890` passed all 61 browser cases and five setup tests on
the same fixed assignments after backend setup began overlapping
dependency installation. Browser phases were
**202.5/176.4/81.2/106.7/110.8 seconds**; the full jobs still missed the
180-second goal on the slower shards. Image pulls finished in
4/6/21/8/23 seconds, and only shards 3 and 5 waited after installation
(9 and 14 seconds). The nine-file tag assignment passed all 61 browser
cases and five setup tests in run `44008945736`. Complete shard jobs
took **174.4/125/223.7/161.6/166.2 seconds**; only shard 3 missed 180
seconds. Three more measured file retags move slow serial work from
shard 3 to shards 2 and 4. All twelve tag changes are exact file
renames, so test cases and assertions remain. The final full run on
commit `b9bc8b4` (run `44050045632`) passed all 61 browser tests and
five setup tests. Complete shard jobs, including setup and cleanup, took
**151/132/136/162/144 seconds**; all five finished under three minutes.
The Node/pnpm, Playwright browser, and Builder build caches hit, so no
E2E build artifact polling or download was needed. Each shard still
installs workspace dependencies, starts and readies its local database
services, prepares E2E, runs its assigned tests, and tears services
down. CPU scheduling pressure was 60–68%; memory pressure was 0%. All
workflow checks passed.
### Checklist
- [x] Keep five fixed shards and preserve every test while measuring
worker counts.
- [x] Add timings for generated Preview phases and preserve the logs in
CI.
- [x] Reduce repeated form, variable, and Preview setup without dropping
assertions.
- [x] Compare worker counts and restore three workers after the
two-worker trial increased total test time.
- [x] Manually rebalance fixed shard tags from measured test durations;
discovery confirms all 60 cases run once.
- [x] Review Builder documentation impact; the E2E README describes
fixed, manually measured shard tags.
- [x] Run all five shards on the latest assignment; all 60 browser cases
and all workflow checks passed.
- [x] Check whether slow source checkouts recur; this run's five fetches
took 1–2 seconds, and source caching remains unjustified.
- [x] Optimize shard-5 setup without removing its Preview or assertions.
- [x] Rebalance heavy tests onto lower-load fixed shards, based on
measured durations.
- [x] Overlap image pulls with the dependency install shared by the five
shards.
- [x] Run the full suite on these combined changes; all 60 cases and
workflow checks passed.
- [x] Re-run shard 5 with the Builder build cache warm; it passed in 173
seconds.
- [x] Rebalance measured files across the five shards and verify all 60
cases run once.
- [x] Run all five shards with the Builder build cache warm; four
finished under 180 seconds.
- [x] Move the 61-second data-variable Preview case from shard 1 to
shard 5; all 60 cases remain assigned once.
- [x] Run all five shards on the latest assignments; all 60 cases
passed, but shards 3 (183s) and 5 (212s) remain over 180 seconds.
- [x] Share one generated Preview between shard-5 callback and
legacy-route scenarios; local full-shard A/B improved by 6 seconds with
all assertions preserved.
- [x] Move the data-variable and Form inspector tests from shard 5 to
shard 4, Preview links from shard 5 to shard 1, and content-mode pages
from shard 3 to shard 1.
- [x] Run all five shards on the new assignments; all 60 cases passed,
but shard 4 took 235 seconds.
- [x] Move the 61-second data-variable and 46-second redirect tests from
shard 4 to shard 1, the 79-second Email binding test to shard 5, and the
21-second Slot keyboard test from shard 5 to shard 2.
- [x] Rebalance the four longest test files from the latest CI
measurements while keeping five fixed shards and all 60 cases.
- [x] Run all five shards on that assignment; all 60 browser cases and
workflow checks passed, but full jobs were approximately 144, 188, 247,
212, and 180 seconds. Shards 2–5 remained at or above the 180-second
goal.
- [x] Rebalance measured test files again and verify all 60 cases run
once; full workflow run 43965687329 passed all cases, but several shards
remained over 180 seconds.
- [x] Use four-run medians to rebalance Data variables, Style panel, and
Animation runtime while keeping five shards and three workers.
- [x] Run all five shards on the latest assignment; all 60 cases passed,
but browser phases were 93.7, 150.2, 156.7, 110.6, and 167.2 seconds.
- [x] Replace the unnecessary Builder canvas readiness wait with a
direct reload in the select-and-drag asset folder persistence test;
preserve the post-reload folder assertions. Focused full runs were 19.9s
and 18.8s, including setup; independent review found no coverage or
readiness issue.
- [x] Inspect the slow redirect and Asset folder clone tests; keep their
serial writes and persistence checks because no safe material reduction
was found.
- [x] Rebalance six files against recent and median timings; all 60
browser cases passed on run 43969666884, with full jobs approximately
212, 156, 208, 238, and 176 seconds. Shards 1, 3, and 4 remained over
180 seconds.
- [x] Rebalance Data variables, Content mode assets, Navigator, and Form
redirect files using the latest run. All 60 cases passed on run
43971617077; complete jobs were approximately 149, 191, 191, 209, and
202 seconds.
- [x] Move Navigator (shard 4→1), Form redirect matrix (5→1), and Editor
fragment (2→4). The
|
||
|
|
c4b26b4173 |
fix: Persist nested MDX heading edits after refresh (#6707)
Nested headings inside MDX templates should save and remain after refresh. PR #6692 did not fix that persistence failure. The staging repro showed the MDX serializer rejecting an unchanged Asset record. The live record and saved record can have different JavaScript prototypes while representing the same JSON data, so the raw deep comparison rejected a valid edit. Reconciliation now compares normalized JSON data. Known authored Asset props and path-mapped template assets remain supported. Unmapped, unreferenced template Asset records are still rejected; the staging repro did not need a broader provenance-based exception. The save status remains pending until the MDX Asset write completes, even if the last Content Block root unmounts. Failed or conflicting writes remain visible as errors and keep the unload guard active. ## Checklist - [x] Add a Builder E2E regression test for nested heading persistence through the MDX Asset. - [x] Track Asset saves independently of mounted Content Block roots. - [x] Keep failed/conflicting Asset writes visible and guarded. - [x] Preserve authored Asset props and path-mapped template assets during MDX text edits. - [x] Add regression tests for omitted asset records and continue rejecting unknown or modified assets. - [x] Confirm the asset comparison regression test fails with the previous comparator and passes with the fix. - [x] Review Content Block docs; no documentation changes are needed. - [x] Run the focused MDX suite (62 passed), project-build typecheck, oxlint, formatter, and diff checks. - [x] Add the generated Builder E2E schema snapshot required by CI. - [x] Remove temporary diagnostics and the unneeded broader provenance exception. - [x] Verify nested heading persistence on staging after the latest deployment. - [x] Verify required CI checks for this staging branch; all passed. Replaces #6706 Ref #6306 |
||
|
|
baeaab904f |
perf: Measure and trim Builder E2E setup (#6699)
Builder E2E still misses the three-minute target. The latest warm ten-shard run passed, but shard 6 took 4:29 from runner start to completion. This PR remains a draft. The ten shard jobs took 2:21–4:29. Their test phases took 1:20–3:31 and their test durations summed to about 4,018 seconds across 136 tests. At three Playwright workers per shard, that is a 2:14 average lower bound before roughly 45–60 seconds of runner setup; some shards have much more work than average. The latest managed Form consolidation passed on shard 7, but that shard still took 4:06. Shard 5 ranged from 4:40 to 3:20 across two warm runs with no shard 5 code change, so a single run is not evidence of a stable speedup. This branch caches the compiled Builder for E2E-only changes and commits the schema snapshot so shards do not repeat migrations. The separate Supabase migration job still applies all migrations. Each shard now restores the compiled Builder cache directly. A warm run confirmed the artifact wait and download were skipped; a miss run confirmed the fallback. New runners still restore pnpm, Playwright, and Builder caches, and start a database. Related Form redirect, Email, feedback, resource, and managed delivery outcomes now use fewer generated production Previews while retaining named steps and assertions. Three generated resource tests now share one project and Preview; the combined test passed in 52 seconds on CI versus three prior tests of about 76–79 seconds each. The newest managed Form test combines navigation, two Action delivery, and multipart upload in one Preview and passed both locally and in CI. Four workers per shard were tested and reverted: full E2E rose from 4:46 to 5:32, with 57–64% CPU scheduling pressure on several shards and zero memory pressure. In the latest shard 7 run, seven generated Preview startups summed to 200 seconds across parallel tests. Repeated Builder canvas startup and saves dominate other shards. Caching and small test consolidations are insufficient for the target; the remaining work needs a test architecture that keeps production Preview and real Builder coverage while avoiding full compilation or reload for every behavior case. ### Status - [x] Measure per-test, key phase, and runner CPU/memory times. - [x] Cache compiled Builder inputs and commit a schema snapshot while retaining the full migration check. - [x] Keep dashboard UI creation coverage while using faster setup in unrelated tests. - [x] Fix the MCP Preview redirect observation race with a regression test. - [x] Consolidate related redirect, Email, feedback, resource, and managed Form outcomes while retaining assertions. - [x] Verify formatting, Builder typecheck, focused local tests, and the latest warm ten-shard CI run. - [ ] Diagnose and eliminate intermittent Chromium startup failures beyond the concurrent Email binding case. - [ ] Run managed Form callback protocol and browser checks against one production Preview. - [ ] Cut repeated Builder and production Preview work enough for every shard to finish within three minutes. - [ ] Verify cold and warm ten-shard CI runs under three minutes. No user-facing documentation or fixture bundle changes are needed. |
||
|
|
82bd484b9d |
fix: Make publish diagnostics selectable and align static export status (#6703)
Warnings and publish logs should be easy to select, and static export should show the same kind of result alert as site publish. This PR fixes those Builder behaviors without changing the publish pipeline. ## Checklist - [x] Make warning text selectable while keeping finding details on a separate link. Publish-log text remains selectable, with collapsibles and copy buttons unchanged. - [x] Show static-export success and failure in result alerts that open the matching Diagnostics tab; remove the redundant status icon while keeping button progress. - [x] Notify the user if a static-export audit rejection arrives after the Export popover closes; keep the inline-only notice while it is open. - [x] Preserve a persisted static-build failure indicator after Builder reload, without linking to session-only diagnostics. - [x] Add regression tests for both cases and verify 197 publish tests, Builder typecheck, root lint, formatting, and diff checks locally. Each new test failed without its fix and passed afterward. - [x] Update the authoritative static-export guide to explain what remains after reload. - [x] Confirm the main workflow, PR lint, submodule check, and approved visual regression pass on the final commit. No database or package contract changes. Wrangler telemetry is a separate SaaS publish-job setting and is not changed here. No local screenshots were taken, as previously requested. The intended visual changes were reviewed from CI screenshots and approved. A live staging publish/log read across this Builder PR and SaaS #684 remains unverified because the staging account reached its daily publish limit. No quota was changed. Replaces #6702. Closes #6701 |
||
|
|
896a383e32 |
feat: show publish logs in Builder, CLI, and MCP (#6690)
Staging work for publish diagnostics. This PR pairs with webstudio-is/webstudio-saas#681. No production release is authorized. ## What changes People can open Diagnostics from a domain or static export to see warnings, errors, and publishes from the current Builder session. Each publish has its own collapsible report and copy control. A failed publish keeps a short reason and links to its own log when that publish was accepted. Builder, CLI, and MCP use the same publish reference and log access path. Status and logs stay separate. Builder keeps session reports in memory, and Edge retrieves available output from the current publish runner. Reloading Builder loses session reports. An unavailable log does not change publish success or failure. Log pages still require runner retrieval and transfer through Edge and Builder; there is no Webstudio log archive in this PR. The UI now keeps publish state in its owning component, with separate site and static actions, focused diagnostics views, and one domain status control. Both actions share completion handling while retaining their different request and download behavior. Late best-effort checks cannot erase a final rejection. A new rejected request does not make an older publish look like its log. Site errors stay scoped to the selected domains. The existing site and asset publish paths are unchanged. ## Checklist - [x] Keep confirmed session success ahead of stale Build timeout during popover reconciliation; cover an old Build timestamp. - [x] Retry a temporarily pending or failed publish-log read before marking it unavailable; cover session behavior. - [x] Verify CI on the rebased PR head and confirm review threads remain resolved. - [x] Let a matching session's confirmed result clear stale pending controls for site and static; cover success and failure. - [x] Remove redundant static-export loading icon while keeping the export button's pending state and diagnostics access. - [x] Prefer confirmed runner success over a timeout inferred from a stale matching Build; cover site and static publishes. - [x] Keep MCP publish input valid when a target union is converted to tool JSON Schema; cover both the adapter and real CLI contract. - [x] Finish an accepted publish by its build ID even if another publish becomes the project's latest; cover site and static behavior. - [x] Review docs impact, verify local checks and CI, and reply to the new review threads. - [x] Keep current validation findings ahead of an older publish success notice; cover rejected requests and manual validation. - [x] Scope accepted-publish status errors to the domains in that publish; cover another domain's Diagnostics. - [x] Make success, warning, and error publish notices distinct and readable in dark mode; use the existing PanelBanner variants and leave light mode unchanged.\n- [x] Review documentation impact and run focused tests, typecheck, lint, and CI for these fixes. The publishing guide needs no wording change. - [x] Resolve the four Builder review comments and push the focused fix. - [x] Split Diagnostics into findings, detail, publish history, and dialog shell without new copy or icons. - [x] Keep Warnings and Errors separate from Publish logs; preserve current-session history, log copying, and access checks. - [x] Consolidate site/static flow and quota reads; narrow UI access to flow internals. - [x] Preserve completed findings, final rejection, target/domain isolation, and accepted-build log links across both completion orders. - [x] Review the remaining publish UI; share the duplicated domain status control and leave cohesive baseline domain/export UI in place. - [x] Review authoritative publishing docs for this UI change. - [x] Correct the guide's statement that all validation errors block the request; the approved wording is in the publishing guide. - [x] Audit names introduced by this PR against their runtime values and existing repository terminology; fix misleading local names without changing stored or public contracts. - [x] Review docs impact of naming-only changes and verify tests, types, lint, and CI. Docs need no change; 179 publish tests, Builder typecheck, root lint, formatting, diff checks, and all non-visual CI on the previous commit passed. Visual approval remains open. - [x] Remove single-use publish hooks; keep their state/effects in the owning component and test behavior through that component. - [x] Split site and static publish actions into clear component-owned flows without the target-discriminated publish function. - [x] Review docs impact of the structural change. No user-facing copy or behavior changed, so no further docs change is needed. - [x] Verify migrated tests, coverage, Builder core tests, typecheck, lint, formatting, and package boundaries. - [x] Simplify publish component tests: share the tRPC test transport and use named Diagnostics options without losing behavior coverage. - [x] Replace the global fetch test stub with a scoped tRPC request interceptor for publish component tests. - [x] Simplify publish component tests again: share only reusable browser setup and interactions, remove duplicate scenarios and incidental assertions, and preserve behavior coverage. - [x] Review `trpc-interface` package exports and packed-package consumers. Keep the explicit source subpaths; no manifest change is needed. - [x] Review every test changed in this PR for avoidable module mocking; replace only clear cases without reducing behavior coverage. - [x] Update and validate the global testing skill with the decision learned from that review. - [x] Re-run focused tests and relevant checks for the module-mock cleanup. - [x] Finish non-visual CI on the current commit. - [x] Audit Builder-wide global fetch replacements and no-request spies; keep injected fakes and valid narrow spies. - [x] Replace backend-style global fetch stubs and the Storybook fixture override with scoped request handlers. - [x] Preserve success, HTTP/network failure, abort, cleanup, and no-request coverage with red/green checks. - [x] Run focused and broader Builder tests, typecheck, lint, formatting, and package-boundary checks for the fetch-test cleanup. - [x] Review docs impact of the test-only cleanup; no user-facing documentation changes are needed. - [x] Make user database tests verify ownership filters, inserted values, and workspace linkage. - [x] Make patch-service tests prove the intended patch was applied and remove vacuous cases. - [x] Add focused DomainCheckbox integration coverage while keeping useful helper cases. - [x] Make publish test transport fail on unexpected requests and distinguish protocol errors from network failures. - [x] Remove duplicate permission cases and run selected DOM-free tests in Node. - [x] Review documentation impact and run relevant red/green, test, type, lint, and config checks. - [x] Show the latest successful site publish and static export in their popovers with a See logs link to the Publish tab. - [x] Cover success, new-attempt reset, Free-plan access, and both flows in component tests. - [x] Review publishing docs and verify focused tests, types, lint, formatting, and diff. - [x] Review the three expected visual differences and approve the CI rerun; visual regression passed on a0c2ca73f. ## Verification Local: 177 publish tests passed after simplifying the component suites. Two duplicate scenarios were removed; the dedicated suites still cover network failures, paged logs, plan changes, and stale responses. The latest test cleanup removes 174 net lines. Builder production code is unchanged. The earlier test cleanup removed 135 net lines across seven files. Coverage increased from 84.2% statements / 83.3% branches to 88.63% / 86.98%. Builder core passed 1,698 tests with one skip. Builder typecheck, root lint, package-boundary check, formatting, and diff checks passed. Representative migrated tests were shown failing when project scoping, late-check isolation, session eviction, validation reset, or static download behavior was temporarily broken, then passing after restoration. The current commit passed the main workflow, lint, and submodule checks. Visual approval remains open for three previously identified story differences. The prior visual report had the same three known story differences; baseline approval remains open. The visual approval gate remains open for the previously identified story differences; no new local Storybook capture was run at the user's request. The agent evaluation suite remains 8/9 because of an unrelated Form-authoring failure; baselines were not changed. The Builder-wide test cleanup replaces 11 global fetch stubs and one Storybook override. It keeps two narrow no-send spies for a pure preview function. Focused checks passed (43 Node tests, 16 browser tests, typecheck, lint, formatting, package boundaries). Full local core and app runs each had one failure in an unchanged test; the app test passed alone, and the core failure reproduced in its unchanged file. CI will provide the full-matrix check. Local request-interception work remains; no product behavior changes. A follow-up review checked all 30 changed test files for module mocks. Two unnecessary wrappers were removed: the resource-preview call counter and the cross-origin guard fake. The real HTTP boundary and a cross-site request now carry those assertions. The narrow Email preview exception fake remains because malformed real inputs do not reach that catch reliably; seven older Preview-route mocks remain tied to auth, database, protected fetch, and environment setup. This test-only follow-up passed 41 focused tests, Builder typecheck, targeted lint/formatting, diff checks, and independent review. The global testing skill was updated and validated outside this repository. The previous commit's complete main CI passed; the visual baseline approval gate remains open. Commit |
||
|
|
23c81d64c9 |
perf: Speed up Builder E2E tests (#6689)
Builder E2E still takes too long. The goal is all 145 cases under 3 minutes end to end, with exactly ten shards and the same UI, MCP, and generated Preview checks. This PR has not met that goal. ### Measured results - Initial green CI run: 9m43s from build start to the last shard; slowest test step 439s. - Best green run after replacing repeated UI project setup: about 5m35s; slowest test step 250s. - Best green run ( |
||
|
|
207686a0d9 |
fix: Keep checkbox size stable on hover (#6698)
The checkbox’s hover border becomes visible over its transparent resting border, making it look larger. This PR removes that hover border change while preserving fixed dimensions, the dark-mode fill from #6697, and the keyboard focus indicator. - [x] Remove the hover border color change from the shared Checkbox. - [x] Add a focused browser check that measures unchanged dimensions on real hover. - [x] Update the existing contrast test to expect the unchanged transparent hover border; keep the focus indicator check. - [x] Verify the old hover-border expectation fails and the updated tests pass. Full design-system browser suite passes (288 tests). - [x] Run focused browser tests, typecheck, lint, formatting, and diff checks. - [x] Review `docs/`; this internal visual adjustment needs no documentation update. |
||
|
|
2969494b1e |
fix: Improve dark mode checkbox contrast (#6697)
The share popover’s checkboxes blend into dark backgrounds. The shared Checkbox now uses a lighter fill in dark mode and keeps its existing border treatment. Light mode stays unchanged. - [x] Improve dark-mode checkbox fill using existing theme colors. - [x] Preserve light-mode fill and original hover/focus borders. - [x] Keep disabled checked and indeterminate marks visible against the dark fill. - [x] Add browser coverage for light/dark, checked, disabled, hover, and focus states; verify the regression test fails before the fix. - [x] Run focused design-system and Builder browser tests, both typechecks, lint, formatting, and diff checks. - [x] Review `docs/`; this visual change needs no documentation update. CI note: Main workflow, lint, and submodule checks passed on the previous revision. Visual regression exceeded its 7-minute timeout. The updated revision is running CI now; focused browser tests pass locally. |
||
|
|
57e3a7e785 |
fix: remove Wrangler isbot import warning (#6695)
Wrangler warned that the generated Cloudflare server bundle checked for an `isbot` default export that does not exist. The Cloudflare template now uses the named export directly and keeps bot rendering behavior intact. No user-facing documentation changes are needed; this only changes the generated Cloudflare server entry. ## Checklist - [x] Trace the generated import to Remix's built-in Cloudflare entry and use the supported `isbot` export. - [x] Regenerate the Cloudflare fixture from the template. - [x] Verify the Cloudflare production build no longer emits the warning. - [x] Run the focused prebuild test, fixture typecheck, lint, formatting, and diff checks. - [ ] Review the final diff and worktree for unrelated changes. - [ ] Verify all required CI checks for the latest commit. ## Verification - Cloudflare Remix production build passed. - Wrangler Pages Functions build passed with unrelated, unbuilt workspace packages externalized; the `isbot` warning was absent. - Focused prebuild test, fixture typecheck, lint, formatting, and `git diff --check` passed. |
||
|
|
cdca13c755 |
fix: improve screenshot diagnostics and CSS validation (#6696)
## What changed - Report a safe generated script path and line number, plus the saved screenshot artifact, when a page exception makes screenshot capture fail. Private routes and non-script files are omitted. - Generate parenthesized `all` media conditions without extra wrapping so publish validation accepts single and compound conditions. ## Verification - CSS engine tests: 12 passed - Publish validation tests: 54 passed - Screenshot CDP tests: 62 passed - MCP preview tests: 50 passed - Typechecks, lint, and formatting passed Fixes #6671 Fixes #6691 |
||
|
|
35e77d845f |
fix: Omit 404 canonicals and ignore console logs in screenshots (#6685)
Generated 404 pages currently include a default canonical link in their server response. Screenshot capture also fails when a page calls `console.error`, even if Chrome reports no uncaught exception and the PNG was saved. This PR omits the default canonical on 404 pages and reserves screenshot failure for uncaught page exceptions. It keeps the existing exception and route-error checks. Ref #6672 Ref #6671 ## Tasks - [x] Recheck the final diff for removable code and rerun focused checks before merge. - [x] Reproduce the 404 canonical in the reported published project and add a regression that fails before the fix. - [x] Test successful, dynamic 404, and generic 404 generated responses. - [x] Check the reported published screenshot pages and confirm `console.error` is distinct from an uncaught exception. - [x] Update screenshot regression fixtures so navigation tests still use real exceptions. - [x] Review and correct the affected canonical documentation. - [x] Run fixture generation and inspect its diff; retain only the two generated route changes caused by this fix. - [x] Run focused tests, full screenshot tests, full CLI prebuild tests, MCP preview tests, typechecks, lint, formatting, and the CLI build. - [x] Run the approved full Luna/low agent evaluations and record the failures below. - [x] Review the staged diff and push the fix. - [x] Monitor required CI after the final simplification and resolve any review comments. ## Verification - CLI prebuild: 153 passed. - Screenshot browser: 60 passed. - MCP preview: 50 passed. - CLI and vision typechecks, lint, formatting, CLI build, and fixture pipeline passed. - The new 404 and console-error tests failed for the expected reasons before their fixes and passed afterward. - Full Luna/low agent evaluations: 6 of 9 fixtures passed. The agents missed native form mode, design-input, and Markdown references task requirements. Baseline comparison was disabled because stored baselines use a different model and reasoning effort. No baseline was changed. ## Limits The reported 404 page did not regain a canonical after hydration in my production browser check; the confirmed defect was in its initial HTML response. The regression test covers generated HTTP responses, not browser hydration. #6672 remains open for hydration verification. #6671 remains open for sanitized exception details, saved-artifact metadata, and Windows timeout recovery. |
||
|
|
b153fb3890 |
fix: Persist nested MDX heading edits (#6692)
Editing a heading inside a nested MDX template appeared in the canvas but was lost after refreshing the Builder. Explicit line breaks in copied headings also disappeared when text editing began, including in Design mode outside Content Blocks. This PR keeps Markdown block structure when serializing edits inside nested named templates, preserves inline formatting inside headings, and keeps existing `br` instances through text editing. Self-closing template instances continue using their defaults. Ref #6306 ## Checklist - [x] Reproduce the heading edit and refresh failure in the shared project. - [x] Add regression coverage for a heading nested through multiple templates and verify it survives serialization and reload. - [x] Add regression coverage for inline formatting in a self-closing heading template; confirmed the test failed before the fix. - [x] Preserve explicit `br` instances when entering and saving text editing in either Builder mode; confirmed the test failed before the fix. - [x] Review the authoritative Content Block documentation; the existing guidance already covers this behavior, so no documentation change is needed. - [x] Run the relevant tests, Builder typecheck, lint, and formatting checks. - [x] Review the final diff and worktree for unrelated changes. - [x] Wait for the PR Builder compatibility endpoint before fixture sync; fixture sync passed on Ubuntu and Windows. - [x] Verify all GitHub checks for the latest commit. ## Verification - Text editor interop and component tests: 21 passed. - Builder typecheck, focused lint, formatting, and `git diff --check` passed. - The new line-break regression failed before the fix and passed after it. - Latest CI passed: Main workflow, visual regression, lint, and staging fixtures on Ubuntu and Windows. |
||
|
|
ab82a5b634 |
fix: Load marketplace thumbnails without scanning copied assets (#6688)
Marketplace items fail to load in Builder because the thumbnail lookup times out. It filters by asset ID alone, and project copies reuse those IDs. In production, 39 thumbnail IDs match about 113,000 asset rows across projects. Database logs identify this exact PostgREST query as the canceled statement. ## Change - Fetch thumbnail names by exact asset and marketplace project pairs. This lets PostgreSQL use the existing composite asset index for each thumbnail. - Fetch only the fields needed for thumbnail names, and match each result to its own project. - Keep the marketplace view and database schema unchanged. ## Checklist - [x] Add a regression test that fails for the old lookup and copied asset IDs. - [x] Fetch thumbnails by exact project and asset pairs. - [x] Run targeted tests, Builder typecheck, lint, and formatting checks. - [x] Review Builder docs. No update is needed because behavior and instructions are unchanged. - [x] Review CI results for the final commit. - [ ] Required CI green. Visual regression is blocked by a repeatable, unrelated color picker screenshot difference. ## Verification - The new regression test failed against the old lookup and passes with the paired filter. All six marketplace tests pass. - A read-only production query using the current 39 thumbnail IDs and 40 project IDs took about 14 ms for the broad asset lookup and 1.7 ms for exact pairs in a warm-cache comparison. The broad query returned 1,000 rows at its PostgREST limit; exact pairs returned 39. Query times vary with load. - The production Postgres log records 63 statement timeouts for the old Asset query in the last 24 hours. The earliest visible event is November 12 at 12:33 UTC; this is only the available log window, not the first-ever failure. - All 39 thumbnails exist in their own marketplace projects. The marketplace view still loads the 40 item records; this fix removes only the broad asset lookup. The paired filter URL grows with the number of marketplace items. - Builder typecheck, targeted oxlint, oxfmt, and git diff checks pass. No fixture inputs or outputs are affected. Agent evaluations were not run because this does not change agent-facing behavior. - [Main CI workflow](https://github.com/webstudio-is/webstudio/actions/runs/43421159979) passed all 23 jobs. [Visual regression](https://github.com/webstudio-is/webstudio/actions/runs/43421159955) failed on a 0.043% difference in the Design System color picker story and failed identically on retry. This PR changes only the marketplace server query and its test. |
||
|
|
26408a274e |
fix: Open projects with cyclic page folders (#6687)
Projects with a saved page-folder cycle currently fail to open. Loading now repairs the cycle in memory and keeps its folders reachable. New folder cycles are still rejected on save. Closes #6686 ## Change - Visit the root folder first to preserve existing page paths. Remove only child links that close a cycle. - Visit detached folder trees before isolated cycles. Attach a repaired tree at its top folder so its pages remain visible. - Use one shared migration for current, serialized, and legacy page data. Loading does not write to the database; a normal save persists the repaired tree. - This adds 49 net non-test lines. The folder traversal is needed because the existing asset-folder repair handles database parent links and writes to a different store. ## Checklist - [x] Add regression tests for connected, detached, and self-referencing cycles in current, serialized, and legacy data. Confirm they fail before the fix and pass after it. - [x] Confirm new cycles remain rejected on save. - [x] Import the linked project's saved pages into an isolated local Builder project and open the Pages panel. The recovered folder appears. - [x] Review Builder docs. No update is needed: page-folder controls and normal behavior do not change. - [x] Review and simplify the repair. The final helper is seven lines shorter and handles a cycle below a detached parent folder. - [ ] Complete CI review for the final commit. ## Verification - Passed: project-migrations tests, typecheck, and build; project-build page tests and typecheck; Builder load-router tests and typecheck; project build-patch tests; SDK page-schema tests; repository lint; formatting and diff checks; fixture pipeline and a later fixture build. - The linked project's saved page data has 23 pages after legacy migration and two folders, including one self-reference. A local Builder E2E opened those pages and displayed the repaired folder. Other site content was synthetic because the share token cannot export the complete build. - Fixture sync pulled an unrelated remote change into two generated files. Those changes were stashed and excluded from this PR. - The approved full `pnpm evaluations` rerun exited 1: seven agent cases passed, two failed in unrelated form or guidance checks, and baselines were missing or incompatible. No evaluation files are included. - The production project still returns HTTP 500 until this change is deployed. |
||
|
|
d08dbcf827 |
fix: Improve Advanced styles feedback and search (#6682)
Trying to change a source heading in Advanced styles now explains that the heading identifies a style source. The centered Styles editor opens the shared search controls from a header button. ### What changed - Give protected source headings their own near-cursor message and screen-reader announcement. Read-only declarations keep their existing explanation. - Keep search state and navigation with the shared style block editor. The centered editor shows the controls in a popover, and Cmd/Ctrl+F opens search from either editor. - Start the centered search empty whenever the dialog opens. Local declarations remain editable while searching. ### Checklist - [x] Fix popover width, dialog-wide search shortcut, and query reset on close - [x] Show centered editor search in a header popover - [x] Replace vague “mixed” names with StyleBlockEditor and style source names - [x] Clarify editor state and callback names - [x] Use one style block editor for inline and centered views - [x] Reproduce and fix source-heading feedback in inline and centered editors - [x] Reuse the inline search controls in the centered dialog popover - [x] Verify navigation, Local editing during search, and empty search on reopen - [x] Review documentation impact: the existing Advanced guide already describes search in the code editor; no wording change is needed - [x] Run focused browser tests, Builder typecheck, lint, format, and diff checks - [x] Inspect the centered dialog in light and dark Storybook views - [x] Required CI checks ### Verification The 21 focused editor browser tests pass. New behavior tests failed before the changes and passed afterward. Builder typecheck, focused lint, formatting, and diff checks pass. The code cleanup also passed the 29 style block formatting tests. No fixture inputs or generated files changed. All required CI checks passed. One end-to-end shard initially failed because Chromium did not start in its MCP fixture; that shard passed on retry. The visual comparison showed only the intended search icon in the centered editor header and passed after approval. Storybook screenshots for the popover were skipped at the user's request. ### Known limitation The existing shared SearchField has no explicit screen-reader name. This PR reuses it unchanged in both views; adding new accessible copy needs approval. The header-click request in this issue was already merged in #6668. Closes #6659 |
||
|
|
9883a20742 |
feat: Show token suggestions on focus and reach Add more by keyboard (#6681)
Focusing the style source input now shows the available Tokens and Tag style without an extra keypress. If the user closes that list with Escape, it stays closed until they type or press an arrow key. Arrow navigation in a style source menu can now reach the Add more input. Ref #5657 ### Implementation - Open the existing combobox when its input receives focus. Focus on an adjacent source button does not open it. - Include Add more in the existing menu keyboard order, then move focus into its input. - No saved data, API, or migration changes. The production UI change is seven net lines; it reuses the combobox and menu behavior. ### Checklist - [x] Open suggestions on input focus and keep Escape behavior. - [x] Reach Add more with arrow keys and type in it. - [x] Add regression tests. Both new tests failed before the fix and passed afterward. - [x] Review documentation impact. Existing Style panel and Tag styles guidance remains accurate; no docs change is needed for these keyboard interactions. - [x] Review fixture impact. No fixture input or generated output is affected. - [x] Verify: 13 focused tests, Builder typecheck, targeted lint and formatting, and Storybook interactions in both themes. - [x] Resolve review: moving focus from the input to a source button no longer selects a highlighted suggestion. The regression test failed before the fix and passes now. - [x] Required CI checks pass on the latest commit. |
||
|
|
1910a267bb |
perf: Avoid rebuilding Navigator on first selection (#6680)
Selecting the first item on a large page rebuilt the whole Navigator, even though the root was already open. On a 2,000-item test page, that caused about 14,000 Navigator DOM mutations and recreated drag handlers for every row. The Navigator now expands only ancestors that can actually be collapsed. The root stays out of the expanded set. A regression assertion confirms that the first child selection keeps the existing flat tree. The recurring selection still takes about 0.55 seconds in this synthetic test. Its Navigator update touches only two rows, so this PR does not claim to resolve that remaining cost or the full end-to-end report. Ref #6678 ## Plan and checks - [x] Reproduce the first-selection tree rebuild and locate its cause. - [x] Skip the always-expanded root when revealing selected ancestors. - [x] Confirm the regression test fails before and passes after the fix. - [x] Run nearby Navigator tests, Builder typecheck, formatting, and lint. - [x] Review documentation impact: the Navigator guide needs no change for this internal performance fix. - [x] Confirm required CI checks pass. |
||
|
|
6ecd460326 |
fix: Release custom domains after their last project link is removed (#6676)
Removing a custom domain currently leaves Cloudflare routing active. This change releases the hostname before detaching its last project connection. Failed Cloudflare cleanup keeps the connection so the user can retry. Ref #6674 Depends on webstudio-is/webstudio-saas#679, already deployed to production. No database migration is required. Concurrent additions, verification, and removals of the same hostname remain outside this fix; there is no shared lock across requests. Existing orphaned production hostnames require separate approved cleanup. ## Checklist - [x] Remove the migration, schema additions, SQL tests, and operation locking. - [x] Preserve last-connection cleanup, retry behavior, and shared hostnames. - [x] Verify regression tests, typecheck, lint, and formatting. - [x] Review documentation impact: existing removal instructions remain accurate; no user-facing copy change. - [x] Push the simplified change and complete CI. - [ ] Verify with a real custom hostname. Local verification: 35 domain tests, domain typecheck, repository lint, formatting, and diff checks passed. Five regression cases fail against the original implementation. All CI jobs passed, including all ten browser shards and visual regression. No fixture inputs or outputs changed. No development or production database migrations were run. Live hostname verification remains pending. |
||
|
|
8454113d31 |
fix: Restore Tag selectors and speed up selection (#6679)
The Builder was stalling when selecting instances because Tag selector resolution repeatedly scanned and parsed project styles for every displayed property. This PR indexes that data when styles change, reuses style source suggestions, and avoids an unnecessary stylesheet rebuild on multi-selection. It also restores the documented `:hover .button` and `:hover > .icon` selectors, fixes their editing preview, and adds sharp light and dark Tag styles screenshots. Ref #5657 Closes #6678 ### Plan and tools - [x] Reproduce the selector rejection in shared validator and runtime tests. - [x] Restore one shared validation path for new and saved selectors. Keep CSS parsing through css-tree. - [x] Update Tag styles and States and selectors docs, navigation emoji, and paired Storybook screenshots. - [x] Measure the instance selection slowdown and remove repeated full scans while preserving source order. - [x] Audit the full selection path and reuse existing style indexes in state matching and style controls. - [x] Avoid redundant Tag CSS rebuild on multi-selection and test that real preview styles still clear. - [x] Fix descendant state previews for Token, Local, and Tag styles; verify live Tag editing. - [x] Run targeted tests, typechecks, lint, formatting, and inspect both screenshot themes. - [ ] Monitor PR checks and address failures. - [ ] Approve the new Storybook baseline after user review. Verification: CSS data 62 tests; project build styles 167 tests; Builder style panel/model 113 targeted tests; canvas selection and styles 89 targeted tests; CSS data/project build/Builder typechecks; lint; formatting. A local benchmark with 5,100 styles, 5,001 instance selections, and 100 property reads fell from 99 ms to 6 ms for reads after the second fix, plus 6 ms to build indexes when data changed. The original repeated style scan measured 716 ms for 100 reads with no instance selection map. These measure the affected calculation, not total Builder selection time. Two older selection-time style scans remain and cost about 0.1 ms each per 5,100 declarations in a synthetic Node scan; their output ordering needs a separate check before changing them. Previewing an unrelated Token or Local edit still rebuilds the Tag stylesheet, an editing-time cost outside the reported selection path. No fixture inputs or generated fixture bundles changed. Agent evaluations were not run because they require separate approval. |
||
|
|
ae5834867f |
fix: Match Share popover surface backgrounds (#6675)
## What changed The Share popover’s saved-link rows used the page background while the popover title used the floating surface. The rows now inherit the popover surface, and the Storybook example includes the actual Share title used in the Builder. ## Plan and todos 1. [x] Remove the saved-link row background override so it inherits the popover surface. 2. [x] Update the Share popover story to include the real title. 3. [x] Review the Share popover in light and dark themes. 4. [x] Run focused tests, Builder typecheck, lint, formatting, and diff checks. 5. [x] Review product documentation; no documentation change is needed for this visual fix. ## Verification - Share project browser tests: 11 passed. - Builder typecheck passed. - Focused lint, formatting, and diff checks passed. - Reviewed Storybook captures in light and dark mode. The change removes one production CSS declaration. |
||
|
|
b0d7cc2e7b |
fix: Show scoped Tag colors on selected descendants (#6677)
When an H2 gets its color from a Tag selector on its container, selecting the H2 can show black in the Style panel. The panel now shows the matching color. A Token or Local style on the H2 can still override the container's Tag selector. ## Plan and progress - [x] Reproduce the selected H2 showing the container color instead of its nested Tag color. - [x] Give descendant Tag selectors the intended CSS specificity in Builder and published CSS. - [x] Include matching ancestor Tag declarations in the Style panel's color calculation. - [x] Cover the selected H2 and regular and atomic CSS output with focused tests. - [x] Review documentation impact and update the Tag styles and selectors guides. - [x] Match the panel's competing ancestor Tag rules to CSS breakpoint and stylesheet order. - [x] Match the editing preview's selector specificity to the saved rule. - [x] Use the descendant separator directly when detecting nested selectors. - [x] Allow the same supported selector forms in Tag, Token, and Local sources. - [x] Match global Tag descendant styles in the editing preview and Style panel. - [x] Document nested Tag selector examples in the Tag styles guide. - [x] Explain supported selectors in Add more while its input is focused. - [x] Review and simplify nested state matching; preserve the entered selector text. - [x] Consolidate cascade declaration lookup and reuse the validated selector parse result. - [x] Align Builder and MCP selector entry with one validation rule; preserve saved selectors. - [x] Fix nested-selector source badges and preserve valid instance selection. - [x] Keep descendant conditions scoped to the matched element during inheritance. - [x] Match saved nested selectors regardless of tag casing or leading whitespace. - [ ] Verify both fixes, resolve review threads, and review CI. The panel model needs ancestor matching because it computes styles without querying the rendered element. The complete PR adds about 195 net non-test lines. The added work covers selector entry, active nested states, and matching Tag rules in the panel; the saved CSS output already supported nested tags. CSS generation uses `:where()` around the container selector so the nested tag can override the global tag style while the H2's own Token can override the nested tag style. No stored data changes. Checks passed locally: focused Builder style source, active state, panel model, and canvas preview tests; CSS data and runtime tests; Builder, CSS data, and project-build typechecks; lint, formatting, and `git diff --check`. The focused Add more menu was checked in Storybook in both themes. CI passed for commit `838cf4293f`; CI for `224f11e274` is pending. The full Builder app suite was started but stopped after it stopped producing results; the two affected suites passed independently. This follow-up adds 67 net non-test lines to track matching states by instance and match saved descendant selectors using the shared parser. No fixture inputs or generated fixture outputs changed. Ref #5657 |
||
|
|
2b9ce760bb |
feat: Add global styles with Tag styles (#6666)
## What this adds A developer can style an HTML tag once and have that style apply across every page, including content imported into Content Blocks. The selected element's matching **Tag style** appears first in Style Sources. Its chip is temporary; its saved styles remain global. ## Plan and todos 1. [x] Add a distinct `tag` style source with a fixed tag and ID. Create it on the first edit, without a migration or instance attachment. 2. [x] Emit Tag style CSS in the canvas and published output after presets and before instance styles. Keep normal CSS specificity and source order. Include global styles when collecting page assets. 3. [x] Show only the selected element's Tag style in the picker. Keep its temporary chip first and fixed, and identify it in the property source tooltip. 4. [x] Support scoped descendant tag selectors in ordinary tokens, while limiting Tag styles to states of their own tag. 5. [x] Regenerate the runtime contract and cover CSS output, selector validation, runtime updates, and style provenance with focused tests. 6. [x] Revalidate and version the eight stored fixture bundles for the renamed source type, then rerun fixture checks. 7. [x] Use the raw lowercase tag name as the Tag style label, use a singular picker heading, and fix scoped tag-state preview so only matching descendants are highlighted. 8. [x] Let Global root select and edit the `html` Tag style with the same temporary, fixed-first behavior as other tags. 9. [x] Name the feature Tag styles in the UI and code, and replace the draft-only saved type and ID. 10. [x] Rebase onto `main`, keep the publish CSS validation integration working, and move the PR to `5657.staging`. 11. [x] Review the new PR's CI and staging deployment. 12. [x] Make Tag styles discoverable through MCP, verify the existing edit path, and add focused coverage. 13. [x] Update Tag styles product docs and add paired light/dark screenshots. 14. [x] Pin the visual regression runner to supported Ubuntu and review the visual diff. 15. [x] Make the selected Tag style source distinct from unselected tokens in dark mode, review both themes, and refresh documentation screenshots. 16. [x] Copy and paste Tag styles through the style source menu, merging declarations into the matching tag with pasted values winning. 17. [x] Copy and paste Local styles into the selected instance’s Local source, merge with pasted declarations winning, and share one source-transfer command pair with Tag styles. 18. [x] Adjust the compact MCP schema size budget for the new source type input, then rerun the CLI schema test and CI. 19. [x] Add Tag style to the shared design-system style-source color and label variants, and use its shared color in the Builder. 20. [x] Restore the style source and input colors from `main`; use the Slot global color for Tag styles in Builder and design-system variants; refresh and review paired documentation screenshots. 21. [x] Monitor CI for `aba723fc0a` to completion. 22. [x] Address the four canvas cascade and live-preview review comments, add focused regression coverage, and verify the Builder and published CSS agree. 23. [x] Review documentation impact and monitor CI for the review fixes. 24. [x] Normalize the HTTP client paste-style-source result for Token clipboard data, preserve paste-design-token, and verify both response shapes. 25. [x] Use `tag` for Style panel items and verify the picker and menu. 26. [x] Check CI for the Style panel rename. 27. [x] Use `tag` across saved Tag style records, Builder items, and CLI and MCP inputs and results. Keep existing Tag style IDs and the CSS clipboard format. 28. [x] Regenerate runtime contracts and MCP docs, refresh fixture bundle versions, and verify the updated schema, CSS, and transfers. 29. [x] Check CI for the saved style source rename. 30. [x] Fix Select option descriptions clipping in narrow menus, allow wrapped descriptions to grow vertically, and review documentation impact (no docs update needed). 31. [x] Fix marketplace consent checkbox vertical alignment and keep checked and unchecked dimensions identical; add both states to Storybook and review documentation impact (no docs update needed). 32. [x] Resolve Tag-style review comments for selected-state cascade preview, active-state discovery, and html Tag CSS-variable clipboard dependencies. 33. [x] Describe Copy for Tag styles, disable copying empty sources, and keep the style source menu width stable while descriptions change. 34. [x] Increase the splash screen logo-to-progress gap by 8px in total. 35. [x] Align the style source menu to the chip’s left edge when space allows, and determine Copy availability from all saved declarations. 36. [x] Keep arrow-key navigation inside the open style source menu so it does not toggle the combobox. 37. [x] Move focus left and right across source chips, input, and Local at the matching caret boundaries. 38. [x] Preserve instance-style precedence while previewing ephemeral Tag-state edits. 39. [x] Synchronize temporary Tag style selection to the canvas so saved Tag-state previews render. 40. [x] Keep the selected Tag style in autocomplete and ensure keyboard events reach the combobox once. 41. [x] Show a 1px keyboard focus outline one pixel outside each style source chip, and open the focused source’s menu with Arrow Down. 42. [x] Preserve Tag-state preview precedence across breakpoints and include matching Tag states without requiring the temporary chip. 43. [x] Rename the autocomplete section labels to “Tag” and “Tokens.” 44. [x] Return focus to the input when Escape closes a style source menu. 45. [x] Rename Tag style color recipe and design-system variant keys from `tagStyle` to `tag`. 46. [x] Review and simplify style-source changes while preserving keyboard behavior. 47. [x] Simplify style source menu alignment offset arguments to numbers. 48. [x] Import React’s `KeyboardEvent` type directly without an alias. ## Deferred and blocked - **Agent evaluations:** Repository guidance requires separate approval before running them. ## Technical choices and compatibility Tag styles use the same global purple and contrasting text as Slot outlines. The style source field, inactive chips, and their hover behavior match `main`; the earlier neutral color experiments in this PR are superseded. Tag styles are saved with `type: "tag"` and an ID such as `tag-style:button`. Projects from released versions need no migration. Draft development records with `type: "tagStyle"` are incompatible with this revision. They emit CSS even when no instance uses them. Ordinary tokens still need an instance selection and can target descendants such as `.card p`. The CSS cascade decides conflicts; there is no custom priority rule. Token, Tag, and Local styles share the existing `copy-design-token` and `paste-design-token` MCP/CLI commands. Copy accepts `styleSourceId` and `sourceType` (`token`, `tag`, or `local`). The older `tokenId` input remains valid. The CSS clipboard payload identifies the source type on paste. Tokens still create a numbered copy. Tag styles merge into the matching global tag, and Local styles merge into the selected instance’s Local source, creating it when needed. Pasted declarations win for matching properties, states, and breakpoints. All three share asset and breakpoint transfer. The original Tag style feature added about 435 net non-test lines. This follow-up reuses the Token transfer path for Tag and Local styles and adds no new MCP/CLI commands. Older clients that do not recognize the new source type may need to update before editing a project that contains Tag styles. ## Verification - Imported React’s `KeyboardEvent` type directly; no alias is needed. Oxfmt and `git diff --check` passed. - Replaced `Pick<DOMRect, "left">` alignment-helper inputs with `number`, and updated the existing focused assertion. Oxfmt and `git diff --check` passed; tests were not run locally. - Style-source simplification reviewed by a Sol medium subagent: consolidated duplicate input arrow checks, removing 13 non-test lines. Oxfmt and `git diff --check` passed; tests were not run locally. - On `2a11120b69`: renamed Tag color recipe and Label/NestedIconLabel variant keys from `tagStyle` to `tag` without changing colors. The focus outline is 1px, offset outside the chip. Oxfmt and `git diff --check` passed; CI is running. - On `80803a5094`: moved the source chip focus outline one pixel outside its bounds and return focus to the input when Escape closes its menu. Oxfmt and `git diff --check` passed. Tests were not run locally; CI is running. - On `55681dda89`: formatted the keyboard handler with Oxfmt after CI caught the line wrap; `pnpm dlx oxfmt@0.58.0` and `git diff --check` passed. Tests were not run locally. - On `3b00225d33`: arrow navigation now traverses source chips in both directions, with the input between global sources and Local. `git diff --check` passed; local tests were not run. No documentation update is needed. - On `256ad1e797`: increased the splash logo-to-progress distance by another 4px (8px total from the original spacing). `git diff --check` passed. No documentation or tests changed. - On `4167ba4b85`: moved the keyboard focus ring from the inner label button to the full source chip edge. `git diff --check` passed; local formatting was unavailable because this worktree has no installed `oxfmt` executable. No documentation or tests changed. - On `4167ba4b85`: moved the keyboard focus ring from the inner label button to the full source chip edge. `git diff --check` passed; formatting was unavailable because this worktree has no installed `oxfmt` executable. No docs or tests are affected. - Passed on `3b4a2bc3ce`: style-source input tests (10), formatting, and diff checks. The autocomplete section labels now read “Tag” and “Tokens.” - Passed on `bb2c60d3e4`: canvas style tests (65), formatting, and diff checks. Tag state previews use lower selector specificity than instance styles across breakpoints, and matching Tag states participate even when the temporary Tag chip is absent. The full Builder typecheck uses a local shared dependency tree with unrelated stale color-variable declarations; CI is rerunning. - Passed on `7bac6f25cb`: style-source input tests (10), formatting, and diff checks. Keyboard focus now has a visible ring, and Arrow Down opens the focused source menu, including on an unselected source. - Passed on `11df83f889`: style-source input tests (10), formatting, and diff checks. Arrow-key autocomplete now retains the selected Tag style ahead of Tokens; the combobox key handler runs once per input event. The local Builder typecheck has only the pre-existing shared color-variable declaration errors; CI is rerunning. - Passed on `10060fac6c`: sync-store tests (15), formatting, and diff checks. Temporary Tag style selection now synchronizes to the canvas for saved-state previews. - Passed on `b775384f2f`: Builder canvas/style-source tests (75), formatting, and diff checks. Ephemeral Tag-state edits now respect the effective source reported by the style model when an instance declaration overrides them. CI is running. - Passed on `87d5f0529e`: style source input/menu tests (12), formatting, and diff checks. Arrow-key focus moves between the input, last global source, and Local source; open menu arrow keys no longer bubble to the outer combobox. CI is running. - Passed on `1e34af257f`: Builder style source menu tests (10), formatting, and diff checks. Menu aligns to the chip’s left edge, with viewport collision handling retained. Copy availability now checks saved declarations across states and breakpoints. CI is running. - Passed on `699bd8ee81`: formatting and diff checks. Increased the logo-to-progress gap by 4px using the next spacing token. CI is running. - Passed on `af8affb589`: style source menu browser tests (6), formatting, and diff checks. Copy now has a focused description, is disabled without declarations, and the menu keeps its 176px width when the description changes. CI is running. - Passed on `1485781bca`: focused HTTP-client tests (52), project-build token-transfer tests (27), and Builder canvas tests (67); formatting and diff checks passed. CI is running. Local HTTP-client typecheck passed. Project-build and Builder typechecks could not complete because the temporary shared `node_modules` links resolved workspace packages incompletely; errors were missing package exports/dependencies and color variable declarations. - Passed on `bae690edc4` (with Select fix `b1e49b1cfd`): checkbox browser regression (both states remain 14×14 px and align to the first label line), design-system and Builder typechecks, focused lint and formatting, and diff check. Reviewed the checked and unchecked Storybook example in light and dark themes. Docs review found no user-facing documentation change needed; no fixture inputs or outputs are affected. - Passed on `b1e49b1cfd`: the focused Select description browser regression passed in light and dark themes (2 tests); design-system and Builder typechecks, focused lint and formatting, and diff check passed. Reviewed the narrow Select dropdown story in both themes; the description wraps without clipping. Docs review found no user-facing documentation update needed. - CI on `ba274d0dec` passed, including Linux and Windows fixture sync and builds, staging and development deployments, and all ten Builder browser shards. Shard 6 passed on retry after Chromium failed to start in the original run. The approved visual rerun passed after comparison with `6f2404d987` confirmed all 272 story results and all 549 screenshots were identical. - Passed on `ba274d0dec`: focused SDK (14), project-build (353), Builder (78), CLI (168), protocol (15), and HTTP-client (51) tests. Builder, SDK, project-build, protocol, CLI, and MCP docs typechecks passed. The HTTP-client typecheck passed with an unrelated local test edit excluded. The SDK test for `type: "tag"` failed with the earlier schema and passed with the updated schema. Generated contracts and MCP docs, focused lint and formatting, package boundaries, and diff check passed. All eight validated bundles use `bundle-1u9ug3c`, and all eight local fixture builds passed. - CI on `6f2404d987`: 34 latest checks passed and 4 were skipped, including all ten Builder browser shards and the approved visual comparison. The five previously approved visual differences had identical screenshots. - Passed on `6f2404d987`: 16 focused Builder browser tests, Builder typecheck, focused lint and formatting, package boundaries, and diff check. Only the Style panel item value changes. No documentation, fixture, clipboard, or saved project changes. - Passed on `aba723fc0a`: design-system and Builder type checks, focused lint and formatting, package boundaries, and diff check. Restored main's field and inactive source colors; Tag styles now use Slot's `--background-accent-secondary` and matching foreground. Refreshed and reviewed the paired light/dark source screenshots; the menu screenshots were unchanged. All 51 check runs completed; the approved visual comparison and all ten Builder browser shards passed. The earlier unapproved visual comparison showed the intended color changes. - Passed on `bd39fb09e5`: Builder typecheck, focused lint and format, package boundaries, and diff check. The style source field keeps its default 8% neutral fill while no longer following the theme surface-contrast slider, so the track (4%), field (8%), chip hover (about 10%), and selected Tag style (14% light / 22% dark) stay ordered. The default-theme docs screenshots remain accurate; no documentation text changed. All CI checks completed. The approved visual comparison passed with the same six differences as the prior revision; all ten Builder browser shards passed after two shards were retried for CI Chromium startup errors. - Passed on `5c782e8d09`: design-system and Builder type checks, focused lint and formatting, package boundaries, and diff check. The shared Tag color now drives the Builder chip and label variants. Documentation review found no product behavior or screenshot change; the palette story now shows Tag. All 49 CI check runs completed: the approved visual rerun and all ten Builder browser shards passed. The initial unapproved visual comparison reported the expected story changes before approval. - Passed on `091dea695c`: Builder and design-system type checks, lint, package boundaries, formatting, and Storybook inspection of idle, hover, and selected sources in both themes. Refreshed the light docs screenshot; the dark idle screenshot is unchanged. - On `53826757d6`, CI completed: 43 passed, 5 skipped, and one superseded visual run was cancelled. The approved visual check and all ten Builder browser shards passed. - Passed on `53826757d6`: design-system and Builder type checks, lint, package boundaries, formatting, and paired light/dark Storybook inspection. The light screenshot is unchanged; the dark screenshot was refreshed. - Passed on `50bc57eb70`: the focused 11-test CLI schema file, formatting, and diff checks. The MCP handshake is 224,046 bytes with the three source type options; the budget is now 224,500 bytes. - Passed on `3c38222811`: focused runtime (270), Builder (3), CLI (5), and HTTP client (51) tests; five package type checks; lint; package boundaries; generated API and docs checks. The paired light/dark screenshots were reviewed. Local fixture inputs and outputs are unchanged by this follow-up. - Passed: workspace type checks, lint, package boundaries, generated contract regeneration, focused SDK/CSS-data/runtime/Builder tests, token-transfer and copy/paste tests, all local fixture builds, and fixture bundle tests. - Passed: CLI prebuild suite (152 tests) and the 54-test publish validation file after fixing its fixture. - Blocked: remote fixture sync reports a bundle-version mismatch against the development API. Agent evaluations require separate approval. - Passed on `38d1705f8a`: Builder app, project-build, CLI, core, and package CI suites; all ten Builder browser shards; Linux and Windows fixture checks; visual regression; and staging/development builds. Oxfmt and `git diff --check` passed locally. Local Vitest was unavailable because this worktree has no installed `node_modules`. Ref #5657 - Rebased onto `main` at `0589b18ce` and moved to `5657.staging`. Focused checks, five package type checks, generated API, lint, formatting, and package boundaries passed locally. On `9e38ff743b`, 38 CI checks passed, one was skipped, and visual regression found the intended Tag style color change. Staging deployment and all ten browser test shards passed. A focused Tag style story and paired light/dark documentation screenshots were reviewed. - MCP discovery and edit support passed focused project-build, protocol, CLI, type, lint, and generated-doc checks locally. The missing runtime cutover and HTTP client entries were fixed; both package suites now pass on the latest commit. - Tag styles docs now explain global application, temporary source selection, states, and CSS cascade. Two paired screenshots show the source and states menu; Storybook rendering, Builder typecheck, formatting, and relative links passed. Visual regression now passes on Ubuntu 24.04 with the reviewed change approved. - On `a8a3c27423`, all 44 CI checks completed: 39 passed and 5 were skipped. Visual regression and all ten Builder browser shards passed. Replaces #6663. - Review fixes on `f9af16d063`: canvas root presets now yield to `html` Tag styles; responsive Tag styles no longer displace instance styles in the style model; selected Tag states and descendant selectors update during live edits. The existing Tag styles documentation needs no change for these bug fixes. Builder focused tests (133), SDK CSS tests (11), Builder typecheck, lint, formatting, and diff checks passed locally. Each new regression test was verified against the old behavior. No fixture inputs or outputs changed. CI completed on `f9af16d063`: 35 latest checks passed and 3 were skipped, including all ten Builder browser shards and the approved visual check. 49. [x] Move the Tag and Token focus outline to the chip edge; no documentation update is needed. 50. [x] Return focus to the style source input when Escape closes its autocomplete; no documentation update is needed. 51. [x] Return focus to the style source input when Escape closes a source chip menu; no documentation update is needed. 52. [x] Add a regression test that Escape in a style source chip menu returns focus to the input; no documentation update is needed. 53. [x] Avoid duplicating an html Tag's own variables as root dependencies when copying it. 54. [x] Exclude descendant selectors from active-state matching. 55. [x] Preserve Tag state preview specificity over base styles and instance state precedence during saved and ephemeral previews. 56. [x] Restore the style source dropdown's default Radix placement from main; remove the custom chip offset. |
||
|
|
112505e854 |
fix: Restore whole section header toggle (#6668)
Clicking a Style panel section title expands or collapses it again. The chevron-only click target made the rest of the header inert. This restores the full-width trigger in the shared section header. Separate header controls and clickable property labels keep their own actions. Other sections using this shared header regain the same click target. ### Checklist - [x] Restore whole-header toggling while preserving separate controls - [x] Review documentation impact: the Style panel guide does not describe a specific click target - [x] Check the diff for unrelated changes and whitespace errors - [x] Pin the visual-regression runner to an Ubuntu version supported by the installed Playwright - [x] Required CI checks ### Verification `git diff --check`, PR lint, submodule checks, visual regression, and the full main workflow passed, including all ten Builder end-to-end shards. The first visual-regression run stopped before screenshots because Playwright 1.50.1 cannot install Chromium on Ubuntu 26.04; the pinned Ubuntu 24.04 run passed. Local tests and Storybook were not run. Ref #6659 Ref #6638 |
||
|
|
89ca46cd7f |
fix: Improve floating surface and menu selection contrast (#6670)
## Problem Autocomplete suggestions were hard to distinguish in dark mode. Dropdowns and dialogs did not have a clear depth order, and Select opened against its trigger. ## Result Floating surfaces become slightly darker in light mode and lighter in dark mode. Select opens 4 px below its control. Highlighted rows, intent colors, and disabled states remain distinguishable on the new surfaces. The theme still uses nine live inputs. Shared color recipes and a smaller CSS reader replace repeated calculations and authoring-policy checks. Missing references, cycles, duplicate definitions, and selector ownership are still checked during type generation. Components keep the same generated semantic color types. ## Plan and todos 1. [x] Define floating surface levels from the existing theme colors for both modes. 2. [x] Apply them to dialogs, menus, nested menus, popovers, commands, canvas controls, arrows, and borders. 3. [x] Keep highlighted menu, command, and inset-list rows visible. 4. [x] Remove the Builder spacing popover's base-background override. 5. [x] Add Storybook examples for dropdown over dialog, canvas toolbar, and badge. 6. [x] Add a 4 px gap to the shared Select used by Position and Display. 7. [x] Check primary, secondary, accent, error, and status contrast on floating levels. 8. [x] Document the palette rule in the design-system color guide. 9. [x] Review the selected light and dark stories listed in earlier validation. This was not an exhaustive UI-state audit. 10. [x] Run design-system tests, relevant typechecks, lint, formatting, package boundaries, and diff checks. 11. [x] Fix the audit's text, destructive-control, style-source, disabled-hover, and vivid-theme contrast failures. 12. [x] Review product documentation and fixture impact. 13. [ ] Monitor CI for the current commit and complete visual-difference approval. 14. [x] Replace floating-only intent colors with shared semantic colors. 15. [x] Make InsetList selection follow its actual containing surface. 16. [x] Consolidate color recipes and contrast-pair definitions while preserving rendered colors. 17. [x] Simplify CSS parsing and verify all nine theme controls in both modes. 18. [x] Remove redundant declaration collection while retaining exact validation behavior. 19. [x] Reproduce and fix the Grid generator contrast and CSS value footer reports in real Storybook compositions, cover missing open/hover/selected states in both modes, and record actual audit coverage and remaining gaps. 20. [ ] Audit every Builder, Dashboard, and design-system interface in light and dark mode: inventory components and reachable states, render all stories, exercise hover/focus/active/selected/disabled/open/error/loading/empty states, add missing compositions, inspect screenshots and actual contrast, and publish findings with evidence and unresolved coverage gaps. 21. [x] Soften floating-surface contrast in light and dark themes, align the Grid generator's preview outline with its grid lines, and verify focused stories, regression checks, and documentation impact. 22. [x] Make shared popover headers and bodies use one background color, check Grid settings and other callers in both themes, add regression coverage, and review documentation impact. 23. [x] Reduce the shared Grid generator and selector line contrast in both themes, keep the preview outline matched, verify visibility and Storybook states, and review documentation impact. ## Validation Palette-refactor validation below applies to `07d11239f5`. The Storybook coverage follow-up is `e38d25537d`. - All 284 design-system tests passed, plus design-system typecheck, focused lint, formatting, and diff checks. - A Chromium comparison found identical rendered RGBA values for 1,312 samples across both modes and 16 theme configurations before and after the recipe refactor. - All 50 contrast contracts remain. The new theme-control checks cover every generated public theme input in both modes. - Deliberate temporary mutations confirmed the new checks fail when the protected behavior breaks. - Independent Astra reviews found no new defects. The final cleanup matched exact outputs or errors for 167 valid and invalid parser inputs. - Current parsed source output and generated token types are unchanged. - Earlier Builder typechecks and package-boundary checks passed. This refactor changes no public component API. - No fixture inputs or generated fixture bundles are affected. The design-system README was updated; the product Craft documentation still matches the behavior. The latest commit removes 342 net implementation lines, excluding tests and documentation. The color parser is 152 lines, the stylesheet 253, and the contrast helper 127. CSS still performs all runtime color calculation; the parser supports type generation and Storybook. All non-visual CI checks passed for this commit. The visual-regression job was cancelled before producing its comparison report, so visual CI is not complete. The visual approval label has not been applied. ## Visual coverage correction The previous palette tests and selected screenshots did not establish that every Builder interface and state had been inspected. The Grid generator had no direct story, and the CSS fragment story did not open the dialog or render its shortcut footer. Both reported defects were reproduced in new open stories in light and dark mode. Both fixes are verified locally and included in `e38d25537d`. Grid open, selected, hover, preset-hover, and keyboard-focus states were captured; the CSS dialog was captured normal and maximized in both modes. The grid's weakest measured outline contrast is 3.176:1, up from about 1.1:1 against the panel. The footer no longer paints a base-surface strip inside the floating dialog. All 11 focused browser tests, Builder typecheck, six-file lint, formatting, and diff checks passed. Temporary old-style mutations made all four new light/dark regression cases fail; restoring the fixes made them pass. Independent review found no remaining defects in these fixes. Runtime code grows by five net lines; stories add 110 lines, including shared-store setup and restoration for repeatable rendering. No fixture bundles or product documentation are affected. The follow-up adds 217 story cases, including actual dialogs, canvas overlays, collection and resource loading/error states, confirmations, and editor states. Stories use real components and local HTTP responses. Builder and design-system typechecks, focused lint, formatting, and diff checks pass. No published-project fixture inputs or generated bundles are affected. The broader contrast audit remains in progress. Its source inventory covers 416 JSX interface files; the current Storybook scope is 427 stories in both themes. Render captures and interaction-state probes are tracked separately. Confirmed remaining problems include error-page heading contrast, collaborator labels, grid guides over different canvas colors, position dots, keyboard hints, pressed secondary labels, editor punctuation, and color-picker unit labels/surfaces. These findings are not fixed by this commit. Task 20 remains open until the remaining interactions and evidence review are complete. CI for `bd1d6349bc` is running; task 13 remains open pending required checks and visual review. ## Contrast follow-up Floating surfaces are softer in both themes, especially light mode, while keeping the intended light and dark surface directions. The Grid preview outline matches its internal lines except during visible keyboard focus. New browser regressions failed before the fix and pass afterward in both modes. Storybook captures of the open Grid generator and dialog with dropdown were reviewed in light and dark mode. Design-system tests (284), focused Builder tests (2), both package typechecks, focused lint, formatting, and diff checks pass. The Craft docs and design-system color guide still describe this behavior; no documentation or fixture input/output changes are needed. These changes are included in `5558d2ab12`, and task 21 is complete. ## Popover surface follow-up The Style panel passes its primary section background and sticky header setting into portalled Grid settings. The shared floating panel now marks its surface, and Builder sections inside it use the same floating background as the panel title and body. The Grid settings Storybook story reproduces the real Style panel context. New light and dark browser regressions failed before the fix and pass afterward. Reviewed Grid settings, a plain FloatingPanel, and a titled Popover in both modes; direct Popover keeps its raised surface. Design-system tests (284), focused Builder tests (4), both package typechecks, focused lint, formatting, and diff checks pass. No product documentation or fixture inputs/outputs change. These changes are included in `6839897bb2`, and task 22 is complete. ## Grid line contrast follow-up The shared Grid line mix is reduced from 75% to 60% foreground-secondary. In Chromium, gray selector and preset-cell borders now measure 2.323:1 in light mode and 2.550:1 in dark mode against their cell fills, down from 3.134:1 and 3.415:1. The preview line measures 2.803:1 and 2.964:1 against its surrounding body surface; its outer outline uses the exact same color. Selected and hover focus-color cues remain unchanged. These gray strokes are softer and remain visible, but their cell-border ratios are below the Craft guide's 3:1 target for meaningful non-text graphics. The focused browser regressions failed before the edit and pass afterward in both themes. Grid generator and selector Storybook states were reviewed in light and dark mode. Builder typecheck, focused lint, formatting, and diff checks pass. Product documentation and fixture inputs/outputs are unaffected. This change is included in `bd1d6349bc`, and task 23 is complete. |
||
|
|
0589b18ce2 |
fix: Keep unrelated Content edits working with shared Slots (#6664)
Editors can be blocked from saving unrelated text when a Content Block contains pre-existing shared Slot references. This PR keeps existing shared content intact while rejecting new duplicate references introduced by a Content-mode edit. Ref #6637 ## Tasks - [x] Reproduce an unrelated Content-mode text save being rejected by a pre-existing shared reference; the regression failed before the fix and passes afterward. - [x] Compare reference counts before and after a Content-mode edit. Builder and MCP already call this shared validator; no separate policy was added. - [x] Cover a newly duplicated reference, existing shared references, repeated text edits, and a link-prop edit in both Content scopes. The new-duplicate assertion failed when the guard was disabled and passed after restoration. A review regression also showed that moving a reference into a self-cycle passed before the follow-up fix; it is now rejected. - [x] Review `docs/university/core-components/content-block.md`; no docs change is needed because it already promises editable content inside Content Blocks and this restores that behavior. - [x] Finish local verification and final diff review. Focused tests, 2,729 Project Build tests, 12 Builder authorization integration tests, Project Build and Builder typechecks, lint, formatting, and package boundaries pass. The production change adds 20 net lines and reuses one validator. - [x] Check the other unlabeled reports: #6615, #6626, #6629, and #6636 were closed with exact missing replay evidence; #6635 and #6648 remain open with concrete next steps. - [x] Run the approved full Luna/low agent evaluation suite. Five of nine fixtures passed; failures are recorded below, and baselines were not updated. - [x] Monitor CI and resolve review comments before marking ready. All required workflows passed; there were no review threads. ## Verification The new Content-mode regression failed before the change and passes afterward (both `content` and `text-and-props`). It also covers a link-prop save and prevents a new third shared reference. Project Build: 97 files / 2,729 tests passed after the cycle guard. Builder patch authorization: 12 tests passed. Project Build and Builder typechecks, lint, and package boundaries passed. No fixture inputs or outputs changed. No live project data was modified. Full Luna/low agent evaluations completed at 5/9: managed-Form authoring missed `contactPage`; two Markdown fixtures missed `blogRouteEvidence` after `ENOENT` screenshot failures; MDX editing and saved-state checks passed, but its guidance check failed because `meta.guide` was called twice. Baseline comparisons are incompatible or missing for the Luna/low override; no baselines were updated. The suite is not claimed green. ## Known limits This does not yet claim to make every shared-reference layout editable. The regression target is an unrelated permitted save in a project that already contains shared references. |
||
|
|
f30bdb7679 |
fix: Keep malformed styles from blocking publish (#6665)
Malformed saved CSS can stop a site from publishing. This restores Vite's stylesheet pipeline with Lightning CSS and lets publishing continue when generated CSS is invalid. ## What changed - Save validation uses the shared CSS parser for touched declarations and now rejects malformed style state selectors. The CSS editor already reports malformed pasted declarations and omits them from saved styles. - Publish skips older malformed declarations and warns without including their values. - Generated CSS is imported by Remix, React Router, and Vike, so Vite processes the stylesheet and emits its asset. - Before Vite runs, the CLI checks generated CSS with Lightning CSS and esbuild. If the stylesheet cannot build, it warns and uses preset and font CSS; if that also fails, it uses an empty stylesheet. - The domain publish check parses the current project CSS and shows a warning without blocking publish. The parser catches the malformed cases reproduced with Lightning CSS and esbuild; the CLI's compiler check remains the final guard. It skips malformed declarations just as the CLI does. The early check reads assets and generates and parses CSS once more per validation. Content Block styles created during publishing and static template publishing are covered by the CLI fallback, but not by this early warning. - The temporary hashed public stylesheet path and its larger fixture size allowances are removed. The direct PostCSS dependency remains removed. ## Checklist - [x] Restore Vite CSS imports with Lightning CSS in every site template. - [x] Keep malformed CSS from failing publish and warn when fallback CSS is used. - [x] Test the reported escaped property in React Router and Cloudflare Remix builds. - [x] Test malformed CSS recovery in React Router and Vike builds. - [x] Verify the prerendered Vike page links to the generated CSS asset. - [x] Regenerate fixtures and review the diff. - [x] Review documentation impact: the existing publishing guide needs no change for this warning in the publish flow. - [x] Run CLI typecheck, lint, formatting, package boundaries, CLI build, and frozen lockfile check. - [x] Confirm CSS compiler failure cases with focused tests. - [x] Validate CSS-affecting inputs at save, including style states that bypass the editor picker. - [x] Warn in domain pre-publish validation when current project CSS fails compiler checks. - [x] Verify pasted CSS diagnostics and save behavior in the editor. - [x] Review the new diff and rerun relevant tests, typechecks, and Builder build. - [x] Remove the Builder runtime's native Lightning CSS dependency and test the known compiler failure cases with CSS-tree. - [x] Verify staging Builder and CLI workflows for the latest commit. - [ ] Verify a site publish on staging with a project compatible with this branch. The first attempt used a project with a style source type this branch cannot read. - [x] Reject CSS-tree recoverable parse errors in declaration validation and add a regression test. - [x] Keep project-build within its existing package entrypoints and rerun the affected checks. - [x] Monitor required PR checks to completion. ## Verification Local: affected tests, four package typechecks, Builder and CLI builds, root lint, formatting, package boundaries, and frozen lockfile check passed. The fixture pipeline passed for the earlier commit; this commit changes no fixture inputs or outputs. The new invalid-declaration regression test failed when its filter was removed, then passed when restored. The incomplete `rgb()` parser test failed before the review fix and passed afterward. Full css-data and project-build test suites passed. The Builder runtime uses CSS-tree for the early warning because Vercel omitted Lightning CSS's native binary from the deployed function; the CLI still runs Lightning CSS and esbuild during publishing. The replacement staging deployment, fixture checks, both CLI R2 workflows, main workflow, and all required PR checks passed. Staging publish attempt: CLI sync stopped at `build.styleSources[520]` before CSS generation. This branch accepts only `token` and `local` sources; open PR #6663 adds `tagStyle` and the CSS generation it needs. The failing record could not be read directly with the available share token, so the exact saved type remains unconfirmed. Use a project without Tag styles, or test a combined integration branch after an explicit scope decision. Replaces #6662. --------- Co-authored-by: Codex <codex@users.noreply.github.com> |
||
|
|
1b9ae61fa1 |
feat: Copy and paste tokens across projects (#6660)
Closes #5727 Copy a design token from its menu and paste it into another project or the style source input. Paste creates and attaches a new numbered token (for example, `Button copy 1`). It carries all breakpoint styles, referenced CSS variables, images, and fonts, and creates missing breakpoints. MCP offers the same copy and paste commands; `instanceId` attaches the token when supplied. The clipboard format is CSS with one `@webstudio/token-css/v1` comment. The old JSON format is removed. HTML and CSS use the same Webstudio pragma parser, and token CSS reuses the existing CSS declaration parser. Builder and MCP share token copy, parsing, paste, fragment asset import, and asset reference remapping. The latest cleanup also reuses the existing copy-name helper. Repeated Builder pastes reuse the existing content-hash asset deduplication path, including SVG and fonts. The source bytes still download and hash on each paste. MCP downloads and uploads asset bytes on each paste, using the upload path's deduplication; both projects must use the same Webstudio origin for assets. - [x] Implement CSS token copy and paste in Builder and MCP, including selection attachment and numbered names. - [x] Preserve breakpoint styles, variable dependencies, image and font assets, and missing breakpoints. - [x] Detect token CSS pasted into the style source input. - [x] Remove the JSON transfer format and update Builder and MCP documentation. - [x] Reuse CSS parsing, asset transfer, naming, and existing upload deduplication paths. - [x] Resolve review findings, including shorthand variables and selector state positions. - [x] Verify focused tests, typechecks, lint, formatting, package boundaries, and the approved Storybook visual check. - [x] Trace existing CSS editor and HTML paste flows; reuse their parser, declaration mapper, and CSS variable reference collector. - [x] Preserve breakpoint cascade order when copying equal media conditions; add a regression and resolve the review thread. - [x] Share CSS variable traversal between collection and renaming; preserve nested fallbacks and resolve the review comment. - [x] Discover and remap image URLs inside raw variable fallbacks; share the CSS value traversal and resolve the review comment. - [x] Preserve fallback variables in mixed shorthands and custom non-pixel breakpoint styles; add regressions and resolve review threads. - [x] Preserve combined width and custom media conditions in token CSS; add a regression and resolve the review thread. - [x] Preserve range-syntax custom breakpoints in token CSS; add a regression and resolve the review thread. - [x] Preserve negated custom and width media conditions; add regressions and resolve the review thread. - [x] Preserve boolean operators between width conditions; add a regression and resolve the review thread. - [x] Monitor required CI checks for the latest commit. - [x] Reuse the existing asset usage collector for copied token image and font dependencies; verify token and asset usage tests. - [x] Review documentation impact of this internal refactor (none; no user-facing behavior or contract changed). The reuse audit traced CSS editor, HTML paste, instance/page paste, asset usage, and MCP from input to state change. Token copy now uses the existing asset usage collector for image and variable-backed font dependencies. CSS parsing, declaration mapping, variable traversal, breakpoint matching, asset import/remapping, copy naming, and Builder/MCP token mutation also have shared owners. Fragment insertion may reuse tokens and merge overflow breakpoints; token paste must always create a numbered copy and report overflow. The regex-based rename path remains for arbitrary authored text; token transfer uses syntax-aware rewriting to avoid changing text outside `var()`. The asset collector refactor changes no user-facing behavior. The follow-up parser fixes keep fallback variables, non-pixel breakpoint styles, and combined media conditions, range syntax, negation, and width-condition operators intact when copied. No documentation or fixture inputs changed. Focused token, asset usage, HTML, and CSS parser tests, affected typechecks, lint, formatting, package boundaries, and `git diff --check` passed. Agent evaluations were offered and declined. |
||
|
|
ee277769ff | fix: Fix style panel layout border (#6661) | ||
|
|
44f0956579 |
fix: Address reported MCP failures and screenshot diagnostics (#6657)
A Form-only POST action was falsely reported as running when a page renders. The security audit now uses the same resource-selection logic as page generation, while still warning when the POST is also used for page content. This PR also shows editors the actual Content-mode save rejection instead of a misleading build-permission message. Patch commits stop waiting after two minutes. A lost response leaves the result uncertain and refreshes project state without resending the patch; completed version conflicts retain the same-transaction confirmation retry. Staging publish jobs now include the complete hosted URL, so agents do not have to guess the publisher host. Screenshot capture reports page JavaScript errors without including the page's error text or script URL. SVG content edits now keep their image type and dimensions; the reported HTTP 500 in #6615 remains unverified. It does not change the shared-Slot rule that caused #6637. Closes #6622 Closes #6620 Ref #6615 Ref #6637 Ref #6648 Ref #6635 The SVG revision fix changes one production line and reuses the existing asset-type detector. Screenshot error detection stays tied to the active page frame during navigation, so an outgoing page or embedded frame cannot be blamed for the next capture. Script URLs are omitted because their paths can contain private data or point to a logging call instead of the fault. ## Tasks - [x] Make timeout/reset commit handling safe when the original server request may still be running; add a regression test. - [x] Remove untrustworthy screenshot source locations; update regression tests and PR claims. - [x] Re-run focused checks, review the final diff, and monitor required CI after the merge-safety fixes. All four required workflows passed on `9d79ce052b`. - [x] Reproduce the SVG revision type loss in #6615's workflow; preserve image metadata and verify the uploaded bytes. - [x] Keep the reported HTTP 500 open: the original asset was identified from production data, but the failed PUT status/request ID is unavailable, so this PR does not claim a fix. - [x] Keep the approved generic screenshot error wording for #6635; verify the focused test and required CI. - [x] Reproduce #6635's missing JavaScript source location with a CDP fixture, then remove path reporting after review found it could expose private page data. Keep #6635 open for a safe diagnostic design. - [x] Review documentation impact for the screenshot diagnostic. The authoritative MCP guide documents screenshot inputs, not this error output, so no docs change is needed. - [x] Re-run focused tests, typechecks, and CI after the screenshot change. All required CI workflows passed. - [x] Reproduce #6620's initial connection reset and deadline failures, then verify uncertain-commit handling without an unsafe resend. - [x] Return the correct hosted staging URL for #6648; verify the current origin against the reported project without republishing. - [x] Check the other reports against production records and code paths; keep unverified causes open rather than claim fixes. - [x] Reproduce #6622 with a regression test that failed before the fix and passed afterward. - [x] Reuse the page-resource selection logic in the audit; cover an independently rendered POST and a connected Content Block. - [x] Reproduce the misleading Content-mode message with a failing test, then preserve the specific reason after checking edit permission. - [x] Review the authoritative docs; correct the native Form action instructions and regenerate MCP docs. - [x] Triage recent reporter issues: close #6634 as a duplicate of #6636 and #6630 as untestable without a project ID; keep the other project/environment-specific reports open. - [x] Run focused tests, typechecks, lint, package-boundary and generated-doc checks. No fixture inputs or outputs changed. - [x] Monitor required CI checks and fix failures. All workflows pass; the visual test now hides its blinking editor caret. - [x] Review the final diff and review threads. No unrelated files or open review threads. - [x] Run the approved full Luna/low agent evaluations and record the failures below. ## Verification - #6615: the SVG revision test failed before the one-line fix because storage received `file` instead of `image`; it passes now with SVG bytes, image metadata, and the same asset ID. All 314 asset-uploader tests and its typecheck pass. Read-only production checks found the original 4,292-byte SVG and later 4,457-byte replacement; both parse as 581×140 images, and no failed-update revision was saved. The original HTTP 500 remains unreproduced, so #6615 stays open. No fixture inputs or generated fixture outputs changed. The existing asset docs already cover SVG editing; no docs change is needed. - Audit: 41 tests pass (new test failed before the fix). - SDK resource generation: 71 tests pass. - Builder patch authorization: 10 tests pass (changed test failed before the fix). - Project-build, SDK, CLI, and Builder typechecks pass; lint and package-boundary checks pass. - Generated MCP docs are clean. All required CI workflows pass. - #6620: the reset/deadline tests failed before the merge-safety fix and pass now without a resend. HTTP client tests (50) and focused project-session tests (55) pass, as do the Project Build, Vision, and CLI typechecks, lint, and package boundaries. The patch request abort is exercised with a simulated deadline; no production mutation was made. - #6635: the published home page returned HTTP 200, produced a full-page Chrome screenshot, and had no current page JavaScript error. A synthetic Chrome page confirmed that both thrown exceptions and `console.error` can yield a script URL, but the URL path is not safe or necessarily the fault location. The capture now omits that URL while retaining page-frame error detection. Focused Vision tests (60), CLI preview tests (50), typechecks, lint, and package-boundary checks pass. The reported page fault itself is not reproduced today, so the issue remains open. - #6626: the reported published route now returns HTTP 404; the current home page has no images and a full-page Chrome screenshot succeeds. This does not recreate the image-heavy local preview or its DevTools disconnect. - #6648: the project’s reported staging builds are marked published; its current `.wstd.io` origin returns HTTP 200, while `.wstd.work` returns 404. New staging URL tests failed before the change and pass after it, including already-qualified and custom-only domains. Domain tests (17), Builder API router tests (53), Domain and Builder typechecks, lint, and generated API checks pass. The API still does not verify DNS at publish time, so this issue remains open. - Full Luna/low agent suite after the #6635 change: 6 of 9 fixtures passed. Both Markdown blog fixtures again failed at screenshot verification with `ENOENT`. The managed-Form authoring agent missed template discovery, audit, and responsive evidence in this run; that fixture passed in the previous run. The MDX fixture passed. The suite is not claimed as green. Existing baselines use incompatible or missing model settings and were not updated. Connected MDX inside the same Form remains a conservative audit case: the audit cannot inspect that document's resource references from Builder state alone. |
||
|
|
d9e3394c18 |
feat: Improve Advanced styles and CSS variables (#6638)
Closes #6470 Closes #4806 Closes #4392 Closes #4804 Closes #4616 Closes #4863 Closes #4912 Ref #1798 Advanced styles now uses a CSS block editor in the panel and a centered editor. Local declarations are editable. Cascaded or inherited, preset, and global declarations are grouped below them and are read-only. The editor suggests properties and values, highlights search matches, shows source details and color swatches, and previews valid local edits on the canvas. Keyframe CSS declarations use the reusable local block editor. The old Add styles field, property-row editor, declaration menu actions, and Navigator CSS Preview are removed. ### Delivery checklist - [x] Edit and validate local CSS declarations, including shorthand display and likely typo hints - [x] Show other style sources with source colors, tooltips, and read-only protection - [x] Add search navigation, color swatches, and the centered editor shortcut - [x] Reuse the block editor for animation keyframes and preserve transform controls - [x] Preserve uploaded background layers when editing gradients or reordering layers - [x] Remove superseded editor and Navigator UI - [x] Review and update the Style panel and Navigator guides - [x] Remove the outdated CSS Preview sentence from the Builder anatomy guide - [x] Rename the stale Code view test title to match the Advanced editor - [x] Regenerate fixtures and keep the Vercel build manifest through regeneration - [x] Resolve review threads and verify required CI ### Implementation notes Styles remain stored as individual properties; equivalent shorthand text is reconstructed for editing. Unknown property names become CSS variables unless they resemble a known property, in which case the editor warns and skips the typo. Editing is limited to the selected local style block; read-only source groups remain visible for reference. Existing uploaded image and hidden background layers are retained when neighboring layers change. No schema migration is needed. The Vercel manifest setting lives in the React Router template, so fixture regeneration produces a clean worktree. The shared template also generates the setting for the Docker fixture. ### Verification On commit `7fb44d358`, both fixture checks, `check-size`, the main workflow, all ten end-to-end shards, and the label-approved visual comparison passed. The fixture regeneration, Vercel build, Builder typecheck, focused lint, and formatting checks passed locally before the final documentation and test-title cleanup; `git diff --check` passed afterward. No local tests were run for the final cleanup, which changes no behavior. |
||
|
|
d4b5b328a4 |
fix: Resolve reproduced bugs reported on Discord (#6639)
## What this fixes This PR fixes the bugs from #6633 that we could reproduce: - Spacing reset no longer triggers canvas Delete; autocomplete selection is readable in both themes. - Breakpoint widths save on Enter or blur, without reordering while someone types. Typed addresses no longer reuse an old history suggestion. - Redirect edits use saved project state, and unchanged old redirects do not block unrelated edits. Client-side links now follow project redirects, including sites with a custom 404 page. A new publish keeps polling past an old failed build. - Editors can open older projects and edit supported Markdown bindings without changing protected styles or permissions. Older Code Text edits now survive save, reload, and a later Builder visit; Editors cannot replace Code Text bindings. - Form writes are sent once per submission, even when a response fails. Safe response redirects still work. - Published pages and Builder Preview restore scroll without unwanted smooth animation. Preview keeps smooth anchors, repeated anchors, Back/Forward positions, and page entry animations. - Large-page selection and paste avoid rerendering unchanged Navigator rows and rescanning unchanged asset references. Keyboard focus now follows a moved row when its new parent expands. ## Checklist - [x] Third deep review: verify the pending legacy Editor permission and remounted scroll-restoration fixes; simplify the 11 modified files and deleted hook; demonstrate regression failures and passes. - [x] Third review: review documentation and fixture impact; run affected tests, typechecks, lint, formatting, and package boundaries. - [x] Third review: commit only the pending changes, push to this PR, review hosted results, and pass required CI. - [x] Second deep review: check save permissions, redirects, scroll, and UI state; fix reproduced problems and rerun affected checks. - [x] Deep-review the full PR, simplify repeated code, fix verified problems, and rerun affected checks. - [x] Make project redirects work on client-side link clicks, including sites with a custom 404 page; add a failing regression test, verify both runtimes, and review documentation impact. - [x] Reproduce the changed behaviors; show regression tests fail and pass. - [x] Check Editor, Preview, Navigator, Form, redirect, publish, and theme behavior in focused tests and browser workflows. - [x] Review the full diff for correctness, duplication, and needless complexity. Simplify redirect validation and strengthen the cross-page anchor test. - [x] Inspect light and dark autocomplete screenshots and approve the one intended new visual story. - [x] Review documentation impact. Update the Form guide for uncertain delivery responses; other changes restore expected behavior. - [x] Complete independent review, package typechecks, lint, boundaries, generated API/docs checks, and fixture build. - [x] Run the approved full agent evaluation suite. Eight of nine scenarios passed; the remaining evaluator and baseline limits are below. - [x] Pass required CI on the earlier review commits; the third-review head is tracked above. ## Implementation notes Preview uses one navigation request between the Builder and canvas. It records scroll before a page changes and restores it before entry animations. Router keys are observed only in Preview. This adds 211 net production lines because shorter approaches failed repeated anchors, delayed navigation, and returns from Design. Navigator and focus changes add 87 lines; the shared published-page hook adds 40. The earlier cleanup added 427 net production lines; this review adds 43 net non-test lines. Legacy document bindings are normalized when loading a snapshot and checking Editor capabilities. Older Code Text content is normalized on reads without saving; the first edit removes its stale property in the same version-checked save. Direct Editor patches cannot add or replace Code Text expressions. Editor reads do not migrate the database. Read-only bindings and template styles remain protected. No schema, package, icon, or product copy changes are included. The visual harness has an opt-in focus setting for the autocomplete story. Its default blur behavior is unchanged. The test now mounts scroll restoration after the route content, matching the production Body; it checks an anchor found only on the destination page. ## Review follow-up The review found two reproducible bugs. Older Code Text edited by an Editor could be overwritten by the legacy `code` property on a later Builder visit. A Navigator row moved into a collapsed parent could lose keyboard focus. Both are fixed with regression tests. The review also removed one duplicate parser, a repeated autocomplete color check, and an unnecessary prop scan on page-only saves. The Remix scroll test now mounts restoration in the same order as production. The legacy Code Text test covers literal and expression content, direct patch permissions, save retries, undo/redo, and Editor → reload → Builder → reload. The local end-to-end test passed. The other focused tests, affected package typechecks, lint, formatting, package boundaries, generated API/docs checks, and fixture build passed. A fixture sync picked up unrelated remote sitemap data; that generated drift was removed from this PR. The full agent evaluation was not rerun for this follow-up. ## Client-side redirects The root loader now checks redirects when the path changes, even when a custom 404 route matches. A generated yes/no flag in its own file avoids extra navigation requests on projects without redirects; the browser does not receive the redirect list. Projects with redirects pay for a root-loader check on each path change. Query-only navigation keeps the router's normal revalidation behavior. The new test reproduced the custom-404 failure before the fix and passes afterward. Both React Router and Remix templates, generated fixtures, typechecks, production builds, and the redirect-settings browser test pass. Existing redirect docs already describe this expected behavior, so no docs change is needed. ## Performance With 3,000 styled elements, median selection fell from 986 ms to 413 ms in a controlled local browser test. Full page paste including save measured 3.4 seconds afterward; the earlier run varied from 4 to 15 seconds, so that is not a reliable whole-paste speed multiplier. Skipping an unchanged asset-reference rewrite reduced that isolated step from 1,500 ms to 7 ms with 200 assets, 3,000 properties, and 12,000 styles. The browser still downloads and syncs project data, traverses the tree, validates and imports assets, inserts content, renders, and saves. Cross-project imports can still transfer assets. ## Second review follow-up Changing a breakpoint from Min width to Max width (or back) now saves the type and width together. A mixed Builder/Editor save now checks each Editor change against the Builder changes before it, including older Code Text bindings and changes to Content block boundaries. If an earlier save fails, later entries do not run against a state that was never saved. A full page reload now restores its saved scroll position without animating through the page. Client navigation still uses the existing hook. The two early scripts add no network request; they run next to the router's restore script, then restore the page's smooth-scroll setting. A nonce on Body is passed to all three scripts. Rebuilding Editor permissions costs a fresh scan only for mixed-permission batches; all-Builder batches keep the fast path. Focused checks passed: 40 patch authorization/save tests, five breakpoint browser tests, two early-scroll browser tests, 12 router navigation browser tests, four package typechecks, lint, formatting, and diff checks. The real SSR test also passed with delayed hydration and a nonce-only script policy, with no scroll animation or hydration warning. The full agent evaluation was not rerun; the earlier 8/9 result and its known evaluator limit remain unchanged. Documentation impact was reviewed again; these changes restore expected behavior and need no new user guide. On commit `b61c3aaf07`, the main workflow, all ten Builder browser shards, lint, submodule checks, and the approved visual rerun passed. The first visual comparison still records the already reviewed autocomplete difference; its approval rerun passed. ## Third review follow-up The pending changes close two Editor permission gaps. IDs hidden by read-time Code Text normalization remain reserved, so an Editor cannot reuse one to overwrite a protected saved prop. New Code Text accepts literal content but cannot introduce expressions. A Builder can deliberately replace a legacy prop and leave the replacement editable. Scroll preparation now runs after the destination DOM is inserted and before the router restores scroll. This preserves smooth anchors when restoration remounts with a page. The shared component replaces the separate hook. The navigation test now covers all six cases with and without remounting, removing the duplicate remount setup. The patch adds 51 net non-test lines, close to the 50-line estimate; the extra state records hidden saved IDs, and the extra component orders the three layout effects. Regression checks reproduced the hidden-ID overwrite, new expression insertion, copied-prop ID reuse, and instant remounted anchor before the fixes. They pass with the fixes. Local checks passed: all 2,677 project-build tests, 48 patch tests, the three SDK package suites (including 219 SDK React tests with one existing skip and 46 React Router tests), all five affected package typechecks, lint, formatting, package boundaries, generated API/docs checks, and fixture regeneration. Two Form tests timed out in the first parallel SDK run; both passed in isolation, and the complete SDK suite passed with one worker. Fixture regeneration used the existing local snapshots and downloaded required assets; it produced no tracked fixture changes. Remote fixture synchronization was not rerun. The Code Text, Content Block, share-link, and Link docs already describe the intended behavior, so no docs change is needed. The full agent evaluation was not rerun; its earlier 8/9 result and baseline limits still apply. A separate local model review was unavailable. Hosted automatic code and security reviews completed on `472dbc103e`; neither posted findings, and there are no unresolved review threads. Committed and pushed as `472dbc103e`. The [main workflow](https://github.com/webstudio-is/webstudio/actions/runs/42071262279) passed, including all ten Builder end-to-end shards, both package/CLI/core/app environments, typechecks, lint, generated checks, migrations, and size checks. Development preview fixture checks passed on Ubuntu and Windows. The [visual approval rerun](https://github.com/webstudio-is/webstudio/actions/runs/42071810156) passed. Its initial run flagged only the previously approved autocomplete story; all 267 stories were compared, with no other differences. The story was unchanged by this commit, so its existing approval was reapplied. The worktree is clean, and the remote branch matches the local commit. The excluded issues and other worktrees were not changed. No production deployment was initiated. ## Remaining follow-ups - #6645: The measured asset-remapping slowdown is fixed here, but the reported 30-second end-to-end paste remains unverified. Closed as not planned until the reporter shares a reproducer. - #6646: MCP can now inspect Global root defaults, but the reporter's original AI run remains unverified. - #5379: The broader proposal to remove the root grid remains open; this PR fixes the narrower overflow bug #6070. - #6644 was closed as not planned after local tests passed. The bad SSL report and unrelated feature requests are outside this PR. No shipped-fix announcement or production release is included. ## Verification The previous commit passed the main workflow, all ten browser shards, lint, submodule checks, and the approved visual rerun. The review commit passed the main workflow, all ten Builder browser shards, lint, submodule checks, and the visual-approval run. The initial visual check flagged the already-reviewed new autocomplete story; the approval run passed without a visual code change. An earlier browser run caught a generated-file format change; the follow-up kept that format intact and passed the same test. The full agent evaluation suite was not rerun for this redirect follow-up; Oleg asked to run it once all remaining work is fixed. Local: 2,675 project-build tests, 1,522 Builder core tests (one existing skip), 40 React Router tests, eight affected-package typechecks, lint, format, boundaries, generated API/docs checks, and fixture build passed. The earlier head also passed the Builder app, SDK, component, CLI, Editor/Preview/Navigator browser tests. On the final commit, all ten hosted browser groups, package and app checks, fixtures, migrations, and the approved visual run passed. The first Builder core job hit its seven-minute CI limit without an assertion failure; its single-job retry passed. The first visual job listed the already reviewed new autocomplete story; its approval rerun passed. The complete Sol/high agent suite finished with **8/9 scenarios passing**. The remaining native Form authoring evaluator rejects a plain HTML action URL as though it were a managed Webstudio Action. That fixture did not test actual browser submission, so no runtime claim is made. The comparison gate remains non-green: five baselines use another model and four fixtures have no accepted baseline. No baseline or validator was changed to hide this. The MCP Form result fix for #6640 is now included below. A fast redirect no longer leaves MCP without the Form result. The older local source failure helped reproduce this case. Closes #6633 Closes #6640 Closes #2439 Closes #6642 Ref #6645 Closes #6641 Closes #6643 Ref #6644 Ref #6646 Closes #6647 Ref #5379 Closes #6070 Ref #980 Ref #4309 Ref #6573 ### Consolidation of follow-up fixes - [x] Include and verify the Resource body, expression Tab, and 404 starter fixes from #6649, #6651, and #6650. - [x] Include and verify the root overflow, Navigator lag, and asset-paste fixes from #6652, #6653, and #6654. - [x] Include the Global root MCP inspection fix from #6655, with its discoverable example. - [x] Review `docs/` and fixture impact for the combined changes. - [x] Pass final CI on the combined branch. - [x] Close the superseded PRs after their changes were verified here. The 30-second end-to-end paste report is closed in #6645 until the reporter shares a reproducer. The original MCP agent outcome in #6646 is still unverified. Oleg approved keeping the public MCP example. The fix from #6656 is now included in this PR. The combined branch passed 236 focused tests, Builder/SDK/project-build typechecks, lint, formatting, package boundaries, generated API and MCP-doc checks, and the fixture pipeline. The fixture sync fetched an unrelated live-project change; rebuilding from the checked-in data restored a clean worktree. All nine agent evaluation scenarios passed, but the comparison gate remains non-green because saved baselines are missing or use a different model. The [main workflow](https://github.com/webstudio-is/webstudio/actions/runs/42090765144) passed all jobs, including ten Builder browser shards. The [approved visual rerun](https://github.com/webstudio-is/webstudio/actions/runs/42091462930) passed; its first run flagged only the already-reviewed new autocomplete story. PRs #6649–#6655 were closed as superseded, with their changes retained here. ### Final MCP Form consolidation - [x] Include the tested MCP Form redirect fix from #6656 without changing submission count or result limits. - [x] Run focused Vision/CLI tests and review the combined diff. - [x] Review `docs/` and fixture impact for this fix. The change is limited to Vision's Form result capture and tests; no docs or fixture update is needed. - [x] Pass CI on the new combined head. - [x] Close #6656 once its change is verified here. The user clarified that all bug-fix PRs from this work should be one PR. The MCP Form redirect fix belongs here too. The two Vision files match #6656 exactly. All 121 Vision tests, Vision and CLI typechecks, formatting, and the 59 focused Form capture tests passed. In the full local CLI run, 1,304 tests passed and two unrelated tests failed under parallel load; both passed in a single-worker rerun. The [main CI run](https://github.com/webstudio-is/webstudio/actions/runs/42093902295) passed, including all ten Builder browser shards. The [approved visual run](https://github.com/webstudio-is/webstudio/actions/runs/42095225165) passed. The initial visual run flagged only the previously approved autocomplete story. #6656 is closed as superseded by this PR. No production release was started. ### Large-project Navigator follow-up - [x] Import the provided large project into an isolated local Builder and measure selection-to-Style-Panel time with the tree expanded. - [x] Measure Navigator scrolling and confirm whether the current scroll path is native. - [x] Fix only the reproduced bottlenecks, with regression checks that fail before the change and pass afterward. - [x] Review `docs/` and fixture impact; run focused tests, typecheck, lint, and browser checks. - [x] Open the fixed local Builder for Oleg's manual check, then pass final CI. This follows the original large-page Navigator report in #6641. The separate 30-second paste report #6645 remains closed because it describes a different action and has no paste reproduction yet. The imported project has about 1,244 visible Navigator rows on the measured page. With the tree expanded, selection took roughly 0.9–2.2 seconds before this change and roughly 0.5–1.3 seconds afterward in local browser runs. Browser style recalculation fell from about 0.4–1.0 seconds to about 0.1–0.3 seconds per selection; times vary by run. The Navigator now uses native scrolling and lets the browser skip layout for rows off-screen. Horizontal wheel scrolling was restored and checked after Oleg spotted a regression. A focused regression test failed before the change and passes now. The Navigator tests, Builder typecheck, lint, formatting, diff check, and local browser selection/vertical/horizontal scrolling passed. The `docs/` guide and fixtures need no change because the interaction stays the same. Oleg reports that performance feels good in the local Builder. The [main CI run](https://github.com/webstudio-is/webstudio/actions/runs/42103807815) passed, including all ten Builder browser shards. One unrelated design-system browser test timed out on the first run and passed on retry. The [visual approval run](https://github.com/webstudio-is/webstudio/actions/runs/42105155951) passed after review of tiny Navigator text-pixel differences and the previously approved autocomplete story. No production release was started. ### Final review: Navigator drop marker - [x] Reproduce the clipped marker with a focused regression test. - [x] Keep the marker visible without losing off-screen-row performance. - [x] Review `docs/` and fixture impact, run focused tests, typecheck, lint, formatting, and browser checks. - [x] Push this fix to the same PR and pass required CI. The regression test failed before the fix (`auto` instead of `visible`) and passed afterward. A sortable row now marks when it has a drop target; only that row skips the off-screen containment rule, so its marker can cross the row edge. Other rows retain containment. Navigator and tree browser tests, both typechecks, lint, formatting, and diff checks passed locally. The Navigator guide still describes the same drag-and-drop behavior; no docs or fixture update is needed. This adds two net non-test lines, matching the small-change estimate. The [main CI run](https://github.com/webstudio-is/webstudio/actions/runs/42109032555) passed all 23 jobs. Two MCP Form browser shards first returned an unexpected `unknown` form status, then passed on rerun without a code change. The [visual approval run](https://github.com/webstudio-is/webstudio/actions/runs/42109658799) also passed. No production release was started. ### Drop marker color follow-up - [x] Remove the white outline and white fill so the marker is blue with a transparent center in both themes. - [x] Add a browser regression check that fails before the fix and passes after it. - [x] Review `docs/` and fixture impact; run focused tests, typecheck, lint, and formatting. - [x] Push to this PR and pass required CI. The old styles failed the new light/dark browser test because the line had a white outline. After removing the outline and the white circle backing, all 20 focused indicator/tree tests pass. Design-system typecheck, lint, formatting, and diff checks pass. The Navigator guide describes behavior, not marker colors, so docs need no update. No fixture input or output changes. The [main CI run](https://github.com/webstudio-is/webstudio/actions/runs/42115118863) passed all 23 jobs. Three MCP Form browser shards first returned an unexpected `unknown` status and passed on rerun without a code change. The [approved visual run](https://github.com/webstudio-is/webstudio/actions/runs/42115696559) passed after GitHub cancelled its first attempt. The intentional indicator difference and the two previously reviewed Navigator text differences were approved. No production release was started. ### MCP Form status follow-up - [x] Review the old first-attempt failures and compare the new first-pass Form CI results; the old reports did not expose which layer failed. - [x] Stop masking pre-submission browser errors as uncertain Form outcomes; confirm the regression test fails before and passes after. - [x] Review `docs/` and fixture impact; run focused tests and package checks. - [x] Push the fix to this PR and pass required CI. The CLI had returned `unknown` for every browser error, including startup failures before any Form submission. It now lets those errors surface. The browser observer still returns `unknown` if a submission may have happened, and neither path retries it. This removes 8 net production lines. The regression test failed before the fix and passes afterward. All 50 CLI preview tests and 59 Vision browser tests passed, as did CLI/Vision typechecks, lint, formatting, and the diff check. No docs or fixtures changed. The approved full agent evaluation ran: 8/9 scenarios passed; the existing managed-Form authoring `contactPage` check failed, while the Form runtime scenario passed. The comparison gate is also non-green because saved baselines are missing or incompatible. Commit: `a2ff0822ad`. The intermittent CI cause still needs a first-attempt check. [Main CI on the new head](https://github.com/webstudio-is/webstudio/actions/runs/42123770480) passed all jobs, including all ten Builder browser shards on their first attempt. The Form-heavy shards 1, 5, 6, 9, and 10 passed. The [approved visual run](https://github.com/webstudio-is/webstudio/actions/runs/42124446769) passed; its initial run showed only the four previously reviewed UI differences, none from this CLI-only patch. The older flaky `unknown` results cannot be attributed to startup versus post-dispatch observation from their logs, so this fix addresses a proven masking bug and adds regression coverage, but does not prove every possible intermittent observer failure is gone. No production release was started. |
||
|
|
c755578dbe |
fix: Clarify enabled switch colors (#6631)
In dark mode, an available but unchecked Builder switch in the share dialog looked less available than the disabled Editor and Admin switches. The shared Switch now uses the lighter track for available unchecked controls and the darker track for disabled controls. The blue checked color, label emphasis, and permission behavior are unchanged. - [x] Swap available unchecked and disabled Switch track colors - [x] Verify all three switch states in light and dark themes with a browser test - [x] Capture and review light and dark Storybook screenshots of the Switch and share permissions - [x] Review documentation impact (the docs do not specify switch track colors; no update needed) - [x] Run design system and share dialog tests, design system typecheck, targeted lint, formatting, and diff checks - [x] Verify required PR checks, including the approved visual change The browser test failed with the old colors and passed with the change. Design system: 256 tests passed. Share dialog: 11 tests passed. The main workflow passed after an unrelated MCP Email end-to-end test passed on retry. The approved visual regression rerun passed. No data, permissions, fixture inputs, or generated outputs change. The non-test diff swaps two color values with no net line increase. |
||
|
|
410fedbe83 |
fix: Allow self-hosted Node forms to reach sibling APIs (#6627)
Docker and Coolify exports still reject a Form Resource on a sibling API host. The Node generator denies the entire registrable domain, so `webstudio-demo-john.stauferth.de` cannot submit to `cms.stauferth.de`. This follow-up will allow public sibling API hosts while keeping DNS address validation and stopping Resource requests that return to the same project through an alias. Ref #6623 ## Plan - [x] Reproduce the Node export rejection and add a failing regression test. - [x] Restrict the Node hostname deny rule to the site's known hosts. - [x] Mark outbound Node Resource requests and reject same-project reentry before page data loads. - [x] Verify public DNS pinning, redirects, other-project requests, and existing Cloudflare behavior. - [x] Review the Builder product docs for Node self-hosting and update them if needed. - [x] Run targeted tests, typechecks, lint, fixture generation, and required CI. All checks on `fb283ea4b6` passed, including the main workflow, visual regression, lint, submodules, and staging deploy. Expected production change: roughly 30–50 net lines across the generator, Node transport, and route templates. No new package, service, or user-facing error text. A CLI release and republish will be required to update existing exports. ## Verification - Reproduced the Node rejection for `cms.stauferth.de` from `webstudio-demo-john.stauferth.de`; the new generator test failed before the fix and passed after it. - SDK marker test failed without the marker assignment, then passed. Focused SDK tests: 27 passed. CLI prebuild: 144 passed. - SDK and CLI typechecks, SDK published types, root lint and package boundaries, fixture generation, Docker fixture typecheck and production build passed. - The built Docker fixture returned 508 for marked same-project GET and Form POST requests and 200 for another project's GET. - The Node connector still vets and pins public DNS answers on each hop. A reverse proxy must preserve the marker header for unknown-alias reentry detection. No live customer deployment was tested. - Actual source change: 59 net non-test lines, plus 268 generated fixture lines. Both legacy and React Router route templates need entry checks because Node exports lack a Worker entrypoint. |
||
|
|
7cab28b633 |
fix: Allow Form Resources to reach sibling API hosts (#6623)
A Form on `site.example.com` can now send a Resource request to `api.example.com`. Cloudflare fetches use public routing, while requests back into the same app are stopped even when they arrive through a different hostname. ## Checklist - [x] Enable public `fetch()` routing in the self-hosted Cloudflare Worker and Pages templates. - [x] Narrow Cloudflare Form Resource hostname checks to site hostnames, including published aliases; keep the Node transport policy intact. - [x] Explain the routing and recursion boundary in code comments. - [x] Add focused regression tests and verify they fail before the fix and pass afterward. - [x] Reject Cloudflare Resource requests that re-enter the app through an alias, and verify both Worker and Pages paths. - [x] Run relevant package tests, typechecks, lint, and fixture builds. - [x] Review the authoritative `docs/` content. No user guidance currently describes this hostname policy, so no docs change is needed. The `global_fetch_strictly_public` flag affects all Cloudflare `fetch()` calls in the generated app. It routes same-zone requests through the public front door. The known site hostnames are blocked before fetch; a reserved request marker carrying the originating project ID stops direct reentry through any additional self-hosted alias while allowing other projects. The marker is set on every redirect hop. Verification: SDK suite (914 tests), CLI prebuild suite (143 tests), SDK and CLI typechecks, published types, lint, package boundaries, formatting, full fixture pipeline, and both Cloudflare fixture typechecks/builds passed. The new marker test failed before the fix and passed afterward. Local Pages returned 508 for a marked request and 200 for an ordinary request. Local Worker returned 508 for a marked request; an ordinary local request hit a fixture-only `assets/process` module error. The optional local fixture-size check lacked the unrelated React Router Netlify built client artifact; the prior PR CI fixture-size check passed. Staging test: moved from #6621 to `frm.staging`. The Builder deployed at https://frm.staging.webstudio.is/ and the Cloudflare template artifact build and validation passed. - [x] Publish the test site from staging and verify a Resource call to a sibling API hostname, plus recursive-call protection. Live staging verification: Published `ee-trpc-test-ivan.wstd.work` from Builder commit `35d22fc8a`. A temporary Resource to `api.wstd.work` produced that host's HTTP 401 response in published page data, confirming the request reached the sibling host. A marked request initially returned 200 because the SaaS publish Worker uses a separate entrypoint. The matching guard is in webstudio-is/webstudio-saas#673; deploying that branch made the marked request return 508 while an ordinary request returned 200. The temporary Resource and binding were removed and the clean build was republished with the SaaS fix. ## Resource response limit follow-up - [x] Enforce 1 MiB (1,048,576 decoded bytes) for all HTTP Resource responses, including page Resources, dependencies, Form actions, and cache hits; reject before cache writes. - [x] Cancel oversized responses and report `RESPONSE_TOO_LARGE` without retrying. Show: “Resource response exceeds 1 MiB. Request fewer fields or use pagination.” - [x] Verify exact boundaries, streamed overflow, compressed responses, cache behavior, and Form/loader error propagation with regression tests. - [x] Update Resource and Form documentation to explain the limit and recovery. - [x] Monitor CI after pushing the verified implementation. All checks passed for `f59b770d45112581514eaa8bc42f57b7f27d290b`, including all ten browser E2E jobs, visual regression, Linux/Windows fixtures, and staging builds/deployments. Verified locally: all 926 SDK tests, SDK typecheck and published types, lint, package boundaries, Form browser boundary, formatting, full fixture pipeline, and Cloudflare React Router fixture typecheck/build passed. All 12 new tests and the updated transport test failed against the previous implementation; disabling only the retry guard also reproduced a duplicate attempt. A local Cloudflare runtime test with gzip accepted exactly 1 MiB of decoded data and rejected one byte over. The full fixture sync pulled an unrelated saved-project text change; the original fixture source was restored and regenerated, leaving no fixture diff. The response limit is enforced before JSON parsing and before Resource cache writes, and checked again when loading cache hits. Oversized responses return `RESPONSE_TOO_LARGE` with `retryable: false`; the graph honors that flag. System and Email Resources retain their own limits. The implementation adds 59 net non-test code lines plus 5 documentation lines, below the 70–100 estimate. Browser E2E passed in CI. Agent evaluations were not run; they require separate permission and were not needed for this transport change. ## Simplification follow-up - [x] Reuse Content Engine's bounded byte reader for Resource bodies and Form uploads; remove duplicate accumulation and cancellation loops (estimate: about 40 fewer production lines). - [x] Preserve response limits, request limits, cancellation, error messages, and retry behavior; run existing SDK and Content Engine coverage plus package/build checks. - [x] Review documentation impact; behavior and approved copy should remain unchanged. - [x] Push the simplification and verify CI. All checks passed for `755ec4210a7858fe298ad4d3a725a0167fb5bb26`, including all ten browser E2E jobs and staging deployment checks. The simplification removes 37 net non-test lines, reducing the response-limit implementation from 59 added lines to 22. Content Engine now exposes its existing byte-stream module directly and accepts a caller-provided limit error. Resource bodies and Form uploads reuse that reader. Native Response construction also replaces redundant status/header copying. All existing tests remain. Verification: 926 SDK tests and 655 Content Engine tests passed, along with both packages' typechecks/builds, published types, lint, package boundaries, Form browser boundary, formatting, the full fixture pipeline, and a Cloudflare fixture build. Local Cloudflare runtime checks passed for gzip at/over the limit and empty 204/205/304 responses. The generated fixture vendor change is limited to the shared reader's optional error argument. Documentation and approved copy remain accurate and unchanged. ## Response handling cleanup - [x] Share bounded response reconstruction between protected fetches and the cache; remove stale encoding/length headers after decoding (estimate: 5–10 fewer non-test lines). - [x] Reproduce the protected-response header bug, then verify the fix, limits, empty responses, and existing SDK coverage. - [x] Review documentation and comments for accurate scope; preserve approved user-facing copy. - [x] Run relevant checks, regenerate fixtures, push, and monitor CI. The shared response reader fixes stale compression and length headers in protected fetches and removes four net production lines (slightly below the 5–10 estimate). All 927 SDK tests, types, published types, lint, package boundaries, and Form browser boundary passed. The new regression test failed on the old code and passed after the fix. Cloudflare runtime checks passed for decoded bodies and empty 204/205/304 responses. The existing Resource/Form documentation remains accurate; approved copy is unchanged. The reentry marker now carries the originating project ID. A different project can serve the request; the same project rejects direct reentry through any hostname. This is cooperative loop detection, not a sandbox for arbitrary code. - [x] Reproduce and fix overflow and redirect hangs when a response has an unread clone; preserve stream cancellation and error handling for all shared-reader callers. The clone regressions failed before the fixes and passed afterward. Cancellation still starts immediately and releases the reader lock, but no longer waits for an unread tee branch. Both overflow rejection and redirect following are covered. All 929 SDK tests and 655 Content Engine tests passed, along with both typechecks and lint. A local Cloudflare runtime also rejected a cloned oversized response promptly. Combined with response reconstruction reuse, this cleanup removes five net production lines. Fixture regeneration changes only the bundled cancellation logic. Final verification for `7761f67d6d1e0a853a6ef239f482ebaf9d70c1ae`: all CI checks passed, including all ten browser E2E shards, visual regression, package/Builder/CLI tests, size checks, Linux and Windows fixtures, and staging deployment workflows. Full fixture regeneration and the Cloudflare fixture build also passed locally. No agent evaluations were run; they require separate permission and were not needed for these fixes. ## Scope reentry protection to the project - [x] Replace the global marker with the originating project ID and compare it with generated project metadata before handling requests, including cached requests. - [x] Cover unrelated sites, same-project aliases, and redirects with regression tests; demonstrate failure before the fix. - [x] Review documentation and clarify that this is cooperative loop detection, not a sandbox for untrusted code. - [x] Regenerate fixtures, run relevant checks, push, and monitor CI. Estimate: 20–30 implementation lines across both repositories, plus generated metadata and tests. Implementation: reuse the project ID already exported by the generated home-page module; no new metadata file or package. The generated Cloudflare Resource adapter passes the same ID to the SDK factory, which now requires it. Guards compare that ID before rendering or cache lookup. SDK and generated-adapter regression tests cover another project returning 200 and an unknown same-project alias returning 508. Hosted Worker tests verify the guard runs before the cache and permits another project's cached response. The original guard and a blanket-guard mutation fail the regressions. A local Cloudflare runtime reproduced the expected 200/508 behavior. No user-facing copy or documentation changes are needed; code comments state the cooperative boundary. The fix adds 19 implementation lines across both repos, below the 20–30 estimate, plus tests/configuration and regenerated fixtures. Existing deployments require republishing with the updated sender and guard to use project-specific markers. Final project-specific reentry verification: 930 SDK tests, 143 CLI prebuild tests, and 41 hosted-template tests passed. SDK/CLI types, published SDK types, lint, package boundaries, full fixture regeneration, both Cloudflare fixture builds, and the Pages function bundle passed. The actual Pages function returned 200 for another project's marker and 508 for its own marker through an unknown alias in a local Cloudflare runtime. All CI checks passed for Builder `433f9a359d469ca3669e383c4516c3e805ea22a1`, including all ten E2E shards and staging workflows; companion SaaS `3e28e7e33813dd968f33caac35dbbba52a3847d3` checks and preview deployment also passed. Agent evaluations were not run because they require separate approval; no evaluation changes were needed. |
||
|
|
c94e5a94c1 |
fix: stop evaluating page settings for sitemaps (#6614)
## Problem A saved page setting could run as code when the Builder or CLI generated a sitemap. ## Change Read the sitemap setting as a literal value instead of executing it. This PR does not change how expressions are compiled for published sites. ## Tasks - [x] Reproduce sitemap execution on the unpatched code - [x] Reproduce page metadata execution during static prerendering on the unpatched code - [x] Stop evaluating sitemap settings - [x] Remove the publish-time expression guard and its tests - [x] Run the relevant checks and review the diff - [x] Review Builder documentation impact: no documentation change needed - [x] Push the simplified fix - [x] Confirm required CI checks pass on the final commit ## Verification On the unpatched code, a saved `excludePageFromSearch` expression ran in the CLI process during sitemap generation. A separate saved page-description expression ran during static prerendering. This PR addresses the sitemap path only; the static prerendering path remains a separate issue. The hosted service was not tested. On this commit, 19 sitemap tests and 141 CLI prebuild tests passed. SDK and CLI typechecks, root lint, formatting, package boundary checks, and `git diff --check` passed. All 23 main-workflow jobs passed, along with visual regression, PR lint, and submodule checks. The final diff has two files: the sitemap helper and its regression test. |
||
|
|
6bfc8a80a7 |
feat: Allow owners to use Content mode (#6619)
A Free project owner could not switch to Content mode directly, but could open a free Builder share link and use Content mode there. Owners can now use the switch on any plan. Share-link visitors can use it only when the project plan includes Content mode. ## Changes - Keep Content visible in the mode menu. When it is unavailable, disable it and show a Pro badge instead of the shortcut. - Let project owners use Content mode on any plan. - On Free projects, disable Content mode for every share-link permission. A Content-only link opens in Preview; a Builder link still opens in Design. ## Checklist - [x] Keep the Content menu row visible and test its badge and shortcut. - [x] Update the permission rule and tests for Free owners, Free share links, and Pro share links. - [x] Verify a Free Content-only link falls back to Preview mode. - [x] Review Builder docs. The Modes guide already says owners can try Content mode, and the Share links guide says Content-only links require Pro. No copy change is needed. - [x] Run focused tests, Builder typecheck, and lint after the permission change. - [x] Review the non-test diff for redundant code. - [x] Set a paid plan only in E2E tests that open Content mode through an Editor share link. Keep unrelated fixtures on their original plan. - [x] Fix the Design-mode fallback for Free Content-only links and add a regression test. - [x] Confirm required CI checks pass on the latest commit. ## Verification - Builder typecheck: passed. - Oxlint on changed code: passed. - Focused tests: 66 passed across mode, permission, and state suites. The two new Design-entry cases failed before the fix. - Latest-commit CI: Main workflow, Visual regression, Check submodules, and Lint PR passed. Every E2E shard passed. - Manual Storybook screenshots were not run because approval was not received. ## Known limit The Share dialog blocks Content-only links on Free plans. Token creation and update do not enforce that plan limit on the server. This PR controls which Builder mode a share-link visitor can enter; it does not change token issuance. Closes #6618 |
||
|
|
283929bb49 |
fix: Make Form progress text editable (#6617)
A new Form’s Progress message shows “Submitting…”, but Builder cannot edit that text because it sits directly beside the nested byte summary. The template now gives the message its own Span. Adding an element to an existing text container also wraps its existing text, using the same guard for Builder and MCP insertion and Builder moves. Closes #6616 Ref #6605 Ref #5992 ## Plan - [x] Reproduce the new Form structure through template, Builder, and MCP insertion. - [x] Give the submission text its own editable element while preserving the bound summary. - [x] Add Form regression tests, update docs, and verify the first change. - [x] Reproduce insertion into an existing text container through the shared runtime and MCP. - [x] Share destination-parent normalization across insertion and move, preserving authored fragment internals and replace behavior. - [x] Add regression coverage for editable text, rich text, undo, and insertion results. - [x] Review documentation impact of the shared guard. - [x] Run targeted tests, typecheck, lint, and applicable broader checks. - [x] Confirm required CI for the final commit. ## Scope and compatibility The guard acts on existing content in the destination parent when inserting an element. It does not rewrite descendants inside the inserted fragment, so intentionally mixed rich text remains as authored. Indexed replacement wraps surviving text; full replacement leaves no old wrappers. Generated spans and the parent rewrite are committed together, so undo and redo restore the original structure. Existing saved Forms keep their structure; no migration is included. The submission wording and bound byte summary stay the same. The shared runtime change adds 88 net non-test lines, above the 45–65 line estimate. The extra lines cover the two position formats used by moves and insertions, atomic parent patching, indexed replacement, generated ID checks, and insertion results. No schema, package, or production data changes. ## Verification Local: project-build 2,667 tests passed; Builder insertion 45 tests passed; project-build and Builder typechecks passed; targeted oxlint, oxfmt, and git diff checks passed. An independent Astra review found no blocking defects. Agent evaluations require separate approval and were not run. Required CI for the final commit passed: 35 successful checks and one skipped check. Builder end-to-end shard 8 failed once during generated Preview submission with status “unknown”; its targeted rerun passed without source changes. |
||
|
|
c9f6435aba |
fix: Allow ECMAScript module asset uploads (#6613)
A `.mjs` file currently fails to upload with HTTP 500, so the CLI retries the same unsupported format and reports a retry-exhausted error. This PR lets people upload ECMAScript modules as JavaScript assets. Files with unsupported extensions now get HTTP 400 and the CLI does not retry them. Closes #6612 The existing asset-type registry now includes `.mjs` with the same MIME type and editor as `.js`. Filename validation uses a typed error so the Assets API can return 400 without inspecting error text. Transient server failures still retain the existing retry. The upload still transfers the file and checks its size and content; this change does not remove those costs. - [x] Reproduce the `.mjs` rejection locally and show new tests fail before the fix. - [x] Accept `.mjs` in upload detection, serving MIME lookup, and the Assets panel Code filter. - [x] Return HTTP 400 for unsupported extensions. - [x] Stop the CLI after a non-retryable upload response. The regression test failed with two requests before the fix and passes with one afterward; HTTP 500 still retries. - [x] Review documentation impact and add `.mjs` to the authoritative Assets guide. The retry behavior needs no further docs change. - [x] Verify fixture impact: no fixture asset has format `mjs`; no generated fixture input or output changes. - [x] Run focused tests (SDK 133, asset uploader 8, Builder Assets API 23), then full SDK (910) and asset-uploader (313) suites. - [x] Run SDK, asset-uploader, Builder, project-build, and HTTP-client typechecks; lint, package-boundary check, formatting, and diff check. - [x] Verify required CI checks after the retry fix: main workflow (including all ten Builder E2E shards), visual regression, staging build, lint, and submodule checks passed. The reporter’s exact package file was not available. The regression uses a small valid `.mjs` file and verifies the same upload-validation path. The full agent evaluation suite was not run, as requested; focused tests were used instead. |
||
|
|
9a8ae2dc8f |
feat: Customize Form progress feedback (#6606)
Closes #6605 New Forms show editable feedback while Resource actions run. The `formProgress` variable starts with `status: "idle"`, `loaded: 0`, `total: 0`, and `files: []`. It becomes pending during submission, then returns to idle. The existing `formState` still reports only initial, success, or error. The Progress container says “Submitting…” and adds measured whole-request bytes when the total is known. Files include ID, field name, name, size, and type. The browser cannot measure reliable per-file transfer bytes in the single multipart request. The binding editor suggests one example file to reveal those fields; the example never enters the actual Form value. Saved Forms retain their existing bindings and submission message. ## Checklist - [x] Keep the existing Form outcome variable and add upload activity, byte counts, and file details. - [x] Show zero byte defaults on insertion, new submissions, cancellation, and Preview reset without fake runtime files. - [x] Suggest file fields in Form and Resource bindings while evaluation, reset, rendering, and stored values use real data. - [x] Preserve Builder Preview headers, authentication, response checks, and cancellation. - [x] Keep existing success/error feedback and saved-Form fallback. - [x] Reset external progress when an active published Form unmounts. - [x] Update Form, Variables, and MCP/CLI guides; clarify the older screenshot and final-only simulation. Generated MCP docs check passes. - [x] Audit Form and Variables docs against final progress behavior; clarify the older Variables screenshot. - [x] Cover lifecycle, transport, repeated submission, cancellation, unmount, Preview, template, MCP binding/style, and editor completion with focused tests. - [x] Run relevant typechecks, lint, formatting, fixture generation, and independent review. - [x] Required CI checks pass on the latest commit. ## Verification Local focused Form browser tests (25), Form template tests (12), Builder Preview and Form context tests (14), and mounted editor example/reset tests (6) pass. Builder, SDK React, SDK registry, and project-build typechecks pass, as do lint, formatting, and fixture generation. The fixture sync regenerated two unrelated linked-project site paths; those outputs were restored before commit. Independent review found no remaining issues. All latest-commit checks passed; E2E shard 9 passed on a targeted rerun after its two Form tests also passed locally with 11 related tests. This follow-up adds 162 net non-test lines, more than the initial estimate. The extra code identifies the actual callback-bound variable by ID, even when renamed, and gives autocomplete a separate example scope so it cannot affect actual values. One provider covers Form fields and Resource editors. No schema or package was added. The existing Variables screenshot predates `formProgress`; its explanatory text is current. The React Router fixture's built browser client grew by 4 KiB on Linux CI (376 → 380 KiB), and its checked limit matches that measured output. Multipart transfer remains one whole request. Browser submission supplies live progress. MCP can discover `formProgress`, bind the Progress container, and style it; server simulation reports final outcomes and does not measure browser uploads. |
||
|
|
de166827bc |
fix: Build existing previews from the isolated directory (#6609)
`webstudio preview --generate false` now rebuilds the generated app from `.webstudio/preview`. A linked project does not need a root `package.json`, and the command still skips regeneration. Closes #6608 The fix changes the working directory returned by the existing preview preparation path. It adds no new state or fallback path. The regression test creates a linked project without a root package file, then runs a real build script from the isolated preview directory. It failed before the fix and passes after it. - [x] Reproduce the reported failure on current `main`. - [x] Fix the preview directory with one production-line change. - [x] Add a red/green regression test that builds without a root package file. - [x] Run focused preview and preview-server tests (48 passed), CLI typecheck, lint, and formatting. - [x] Review docs impact: existing help and `docs/` already say generated preview files and dependencies live in `.webstudio/preview`; no docs change needed. - [x] Review fixture impact: no fixture inputs or outputs are changed. - [x] Run full Luna/low agent evaluations: 6/9 fixtures passed; three form fixtures missed goals unrelated to this path. - [x] Verify required CI on the final commit (all workflows passed). Full Luna/low agent evaluations failed overall: `managed-form-authoring-v1` missed `contactPage`, `managed-form-runtime-v1` missed `runtimeFormAction`, and `form-modes-authoring-v1` missed three form-mode checks. The changed `--generate false` branch is not used by these MCP fixtures; `mcp-preview` always generates. Accepted baselines use another model, so no compatible baseline comparison or baseline update was made. |
||
|
|
59e0e1111f |
fix: Publish uploaded fonts used through CSS variables (#6604)
## What changes Uploaded fonts used through CSS variables now reach the published site. Previously Builder could render them, but publishing filtered them out and emitted no `@font-face` rules. This fixes root font variables used by body and heading tokens with either quote style. The asset manager also protects those uploaded fonts from being deleted as unused. Closes #6603 ## Implementation The published bundle follows variables used by `font-family`, parses their values as font stacks, and handles nested variables without looping on cycles. Asset usage now uses the same lookup, records each referring style, and counts every uploaded weight in a family. Replacing a font used through a variable is blocked because the variable value cannot be rewritten by the current asset replacement path. Visitors still download each font file that the page uses; this change makes those files available rather than falling back to system fonts. ## Checklist - [x] Reproduce missing font assets in a published project bundle. - [x] Keep uploaded fonts referenced by root CSS variables and heading tokens. - [x] Verify both single and double quotes; exclude unrelated fonts. - [x] Verify regression tests fail before the publishing fix and pass afterward. - [x] Keep fonts referenced through CSS variables out of the unused-assets list and block deletion. - [x] Protect every uploaded weight in a used family and block unsafe font replacement. - [x] Verify the asset-usage regression tests fail before each fix and pass afterward. - [x] Run targeted Builder, project-build, SDK CSS, and CLI prebuild tests. - [x] Run Builder, project-build, and CLI typechecks, lint, formatting, and diff checks. - [x] Review `docs/`: existing custom-font and CSS-variable guides already describe the supported behavior; no text change is needed. - [x] Check fixture inputs and outputs: no fixture contains font variables, so regeneration is not needed. - [x] Push the tested changes. - [x] Monitor required CI checks and fix any failures. - [x] Simplify font family collection and asset usage without changing behavior. - [x] Re-run focused tests, typechecks, and CI after the cleanup. The cleanup removes a second per-style deduplication map. The collector now reports each family once per declaration. Production code shrank by four net lines; the remaining callback and variable map preserve each style's usage and protect asset deletion and replacement. - [x] Fix the fixtures diff check after submodule setup moves to current main. - [x] Verify the check still catches generated files and edits inside the submodule. - [x] Push the CI fix and monitor both PR and push workflows. ## Verification - Before the publishing fix, both quote variants produced an empty font asset list in the published bundle. Afterward, both include Inter and Playfair Display while excluding an unused uploaded font. - Asset usage tests failed before the follow-up fix for both quote styles, repeated references, multiple uploaded faces in one family, and unsafe replacement. They now pass. - Project-build asset and style utility tests: 95 passed. - Builder bundle tests: 11 passed. - CLI prebuild tests: 141 passed. - Builder, project-build, and CLI typechecks: passed. - Changed-file lint, formatting, and `git diff --check`: passed. - Local agent evaluations were not run because they require separate approval. - CI: Lint PR, Check submodules, Visual regression, and Main workflow passed. One unrelated Form E2E test failed on its first run; shard 10 passed on rerun. - Cleanup checks: 95 project-build tests, 11 Builder bundle tests, and 141 CLI prebuild tests passed. Project-build, Builder, and CLI typechecks, changed-file lint, formatting, and diff checks passed. - Cleanup CI: Lint PR, Check submodules, Visual regression, and Main workflow passed; all ten Builder E2E shards passed. - CI fix: a local Git reproducer confirmed pointer movement passes while tracked changes in the parent or submodule fail. YAML parsing and `git diff --check` passed. The staging push workflow, Linux and Windows fixture jobs, and all PR checks passed. |
||
|
|
659e953869 |
fix: Preserve transitions and animation preview behavior (#6602)
Transition variables no longer get copied into unrelated timing fields. Generated Text/Stagger animations use the saved `slidingWindow` prop, while older `charWindow` configurations still work. Easing moves in the expected direction. Windows preview-install reports include the process failure code when available. Closes #6598 Ref #6593 Ref #6599 Ref #6594 The animation runtime lives in [sdk-components-animation #38](https://github.com/webstudio-is/sdk-components-animation/pull/38). The private PR is merged; this PR points to its merged commit. #6593 was tested on its exact saved project in headless Chromium and closed as not reproducible; the confirmed prop leak is fixed here. #6594 was closed after a documented local repro attempt; this PR improves the next report. ## Work - [x] Reproduce the transition bug; add regression coverage in parsing and generated CSS. - [x] Preserve unresolved `transition` shorthands for the browser to resolve. - [x] Keep old `charWindow` values working in Text and Stagger animations, with a red/green regression test in the linked private PR. - [x] Reproduce and fix the saved animation prop mismatch in generated helpers. - [x] Verify text/stagger easing in unit tests and Chromium/Firefox. - [x] Add safe preview-install process details for future Windows reports. - [x] Update Builder property help and both animation docs pages. - [x] Run focused animation tests, typecheck, lint, package build, and animation fixture build after the compatibility fix. - [x] Point the animation submodule to the merged #38 commit. - [x] Verify required CI on the final commit (all workflows passed; one unrelated E2E shard passed on rerun). - [x] Find the production share token and build #6593’s exact project with its reported 0.307.0 packages. - [x] Compare intermediate scroll styles on #6593’s exact project. Visible targets animate in both builds; the leaked attributes disappear with this fix. Known limit: the reported static-target symptom in #6593 and the Windows environment in #6594 were not reproduced. The confirmed animation prop leak and reporting gap are fixed, without claiming the unreproduced symptoms are solved. |
||
|
|
9feb53248c |
feat: Explain an empty Content mode Navigator (#6601)
## Problem and result A page without a Content Block leaves the Navigator blank in Content mode. The approved warning now explains how a designer can make page areas editable. Closes #6600 ## Checklist - [x] Show the warning only when a selected page has no visible Content Block in Content mode. - [x] Keep the warning out of Design mode, loading states, and pages with a Content Block. - [x] Add a focused regression test; it failed on the missing warning before the fix and passed afterward. - [x] Keep the regression test independent of incidental warning copy. - [x] Run the relevant Builder tests, typecheck, lint, formatting, and diff review after the test update. - [x] Review the authoritative `docs/` content. The Content Block guide already explains how designers set up editable areas, so no documentation change is needed. - [x] Verify required CI checks to completion after the test update. ## Implementation notes The Navigator uses its existing visible tree state and a warning PanelBanner. No data model, migration, fixture, or generated output changed. The shared Webstudio `AGENTS.md` was also updated locally to discourage matching incidental UI copy in tests; that file is outside this Git repository and is not part of this PR. ## Verification - The revised test failed with the warning temporarily disabled and passed when it was restored. - Navigator browser tests: 22 passed. - Builder typecheck, repository lint, changed-file formatting, and `git diff --check`: passed. - CI for commit `127344428a4f562a9d7e505088365b26517ed2f3`: 29 checks passed, 7 skipped, none failed. - Storybook screenshots were not run; they require separate permission under the repository testing guide. - No fixture input or output is affected. CI fixture checks passed on Linux and Windows. |