Commit Graph
6856 Commits
Author SHA1 Message Date
Oleg Isonen e2784fa6f7 fix: show current publish findings and readable status notices 2026-11-15 16:14:42 +00:00
Oleg Isonen d206589a7b Merge branch 'main' into pub.staging 2026-11-15 16:14:42 +00:00
Oleg Isonen 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 (393e51c): about 4m59s; slowest test step 201s. The
two-file rebalance reduced the prior green run by about 50s. The
3-minute goal remains unmet.
- Latest green run (de2f4ed): about 5m56s; slowest test step 257s. All
ten shards and required workflows passed. The preceding green run took
about 6m09s, showing substantial run-to-run variation.
- The 119 content-mode project setup calls fell from 599s to 23.5s of
aggregate worker time by using the app's dev login and project creation
API. The sum of shard test steps fell from 2,178s to 1,721s in the first
run with this change. Per-shard wall time still varies substantially
between runs.
- The shared build takes about 85s, including roughly 30s of setup and
51s of Builder compilation. During tests, the four-CPU shard runners
showed 27–52% CPU scheduling pressure and 0% memory pressure; peak
memory was unavailable.

### Changes
- Cache the test schema and share one Builder build artifact across ten
shards. Shard setup overlaps the build; each shard still starts an
isolated database.
- Keep real MCP and browser sessions alive for repeated Preview
submissions, and reuse generated Previews where checks can share one.
- Give independent cases separate projects and run them within the
existing shard workers. Keep exactly ten shards.
- Create content-mode fixture projects through the app's normal login
and project API, using its CSRF token. Dedicated UI project creation
remains in the Builder project fixture.
- Capture managed Form responses before fast redirects discard their
bodies. Fix drag targeting and unique drag fixture IDs.
- Report CPU and memory pressure for every shard. Allow the MCP browser
startup enough time under CI load. An earlier shard rebalance worsened
the run and was reverted; a measured two-file rebalance improved the
slowest shard without changing test logic.

### Verification and remaining work
Focused local runs passed for a single project, three projects sharing
one session, a paid-plan MCP project, and the MCP Preview form case.
Builder and Vision typechecks, lint, formatting, the ten-shard matrix
check, and Vision regression tests passed. All required workflows passed
on de2f4ed. The latest review fix also passed all 63 Vision tests,
Vision typecheck, lint, and formatting locally.

- [x] Profile the full suite and measure complete ten-shard CI runs.
- [x] Remove repeated UI project setup from the shared fixture.
- [x] Measure CPU and memory pressure in CI.
- [ ] Reduce Builder interactions, generated Preview work, and build
time enough to finish under 3 minutes.
- [x] Resolve five review threads and verify the affected paths.
- [x] Check authoritative Builder documentation; these test harness and
capture fixes do not change user-facing behavior or documentation.

CI still checks out and installs dependencies, builds Builder, uploads
and downloads its artifact, starts a database for each shard, and runs
real browsers and generated production Previews. Warm caches remove
downloads and schema generation, but do not remove setup, compilation,
browser work, or cache transfers. No product behavior or authoritative
documentation changed.
2026-11-15 17:10:10 +01:00
Oleg Isonen 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.
2026-11-15 17:01:53 +01:00
Oleg Isonen 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.
2026-11-15 16:25:51 +01:00
Oleg Isonen 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.
2026-11-15 14:59:01 +01:00
Oleg Isonen 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
2026-11-15 14:58:05 +01:00
Oleg Isonen d340a52252 feat: show successful publish and export reports 2026-11-15 13:43:38 +00:00
Oleg Isonen 2418f9005a test: exercise real preview request boundaries 2026-11-15 12:53:13 +00:00
Oleg Isonen 47ad159370 test: scope Builder HTTP fixtures to their requests 2026-11-15 12:40:00 +00:00
Oleg Isonen 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.
2026-11-15 12:24:07 +00:00
Oleg Isonen cdb1a52b0e test: simplify publish component scenarios 2026-11-15 12:15:01 +00:00
Oleg Isonen 8c861628c2 test: exercise publish requests through scoped interception 2026-11-15 11:59:53 +00:00
Oleg Isonen c322938c97 test: wait for publish report controls 2026-11-15 11:36:39 +00:00
Oleg Isonen e0fb3e32d6 test: simplify publish diagnostics coverage 2026-11-15 11:32:52 +00:00
Oleg Isonen ea3c6175bd refactor: simplify publish diagnostics UI 2026-11-15 11:16:08 +00:00
Oleg Isonen 0fc46b6ad8 refactor: clarify publish diagnostics names 2026-11-15 10:29:09 +00:00
Oleg Isonen 409b8803d2 Merge branch 'main' into pub.staging 2026-11-15 10:20:35 +00:00
Oleg Isonen 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.
2026-11-15 11:07:56 +01:00
Oleg Isonen 3ce59b6720 Clarify publish validation and static failure reports 2026-11-14 11:35:00 +00:00
Oleg Isonen 2d021f406e Simplify publish diagnostics and preserve failure reports 2026-11-14 11:28:59 +00:00
Oleg Isonen ba0212cfb7 Simplify publish diagnostics status and scrolling 2026-11-14 10:39:14 +00:00
Oleg Isonen 9d69e71806 fix: simplify publish log presentation 2026-11-14 09:38:43 +00:00
Oleg Isonen 77a19e9bdc fix: separate publish domains with commas 2026-11-13 23:45:44 +00:00
Oleg Isonen 8302d2f5ab fix: expand and align publish diagnostics 2026-11-13 23:39:05 +00:00
Oleg Isonen d50d7e7ed0 fix: show clean validation in the publish popover 2026-11-13 23:29:02 +00:00
Oleg Isonen cbd90e1f24 fix: keep publish results in the popover until opened 2026-11-13 23:23:05 +00:00
Oleg Isonen fe5bbb7a8c fix: show free log upgrade and order publishes chronologically 2026-11-13 22:46:03 +00:00
Oleg Isonen 904763c67d fix: show publish log action inline with failure 2026-11-13 22:43:16 +00:00
Oleg Isonen c67e693d94 fix: group diagnostics by complete publish 2026-11-13 22:22:11 +00:00
Oleg Isonen 75e615b126 feat: separate publish step logs in diagnostics 2026-11-13 22:18:56 +00:00
Oleg Isonen 686e6ab092 docs: explain scoped publish logs 2026-11-13 22:05:13 +00:00
Oleg Isonen f8023e176c test: open publish options without viewport click 2026-11-13 21:22:15 +00:00
Oleg Isonen b9914b387b fix: make publish diagnostics actionable and complete 2026-11-13 21:16:19 +00:00
Oleg Isonen 7fd14db3e8 feat: show publish logs inline with start time 2026-11-13 20:48:10 +00:00
Oleg Isonen 24bda80aa4 feat: add activity icon to publish diagnostics 2026-11-13 20:44:42 +00:00
Oleg Isonen 6603134710 chore: refresh staging Builder config 2026-11-13 20:39:04 +00:00
Oleg Isonen ebb2c83bed fix: keep publish diagnostics in the menu 2026-11-13 20:35:56 +00:00
Oleg Isonen 604f7786ef feat: open publish diagnostics from menu 2026-11-13 20:27:56 +00:00
Oleg Isonen b3570427d2 fix: hide empty publish diagnostic tabs 2026-11-13 20:19:23 +00:00
Oleg Isonen 381c044469 ::migrate::apply publish build snapshot to staging 2026-11-13 20:17:41 +00:00
Oleg Isonen 6ad10d482c test: align publish log examples and permission checks 2026-11-13 19:38:07 +00:00
Oleg Isonen d7d0d633c7 feat: show session publish logs in Builder, CLI, and MCP 2026-11-13 19:30:32 +00:00
Oleg Isonen 46bf00e06b test: cover publish wait in CLI schema checks 2026-11-13 17:06:42 +00:00
Oleg Isonen fece298b28 feat: show session publish results and add CLI wait 2026-11-13 16:59:26 +00:00
Oleg Isonen 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.
2026-11-13 16:03:40 +01:00
Oleg Isonen 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.
2026-11-13 01:24:41 +01:00
Oleg Isonen c10359da91 fix: keep publish diagnostics tied to saved attempts 2026-11-12 22:59:53 +00:00
Oleg Isonen 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
2026-11-12 15:47:50 +01:00
Oleg Isonen 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.
2026-11-12 15:10:23 +01:00