Skip to content

test: run the zoom and fit browser tests without a backend - #491

Merged
kgoedecke merged 1 commit into
mainfrom
kgoedecke/browser-tests-without-server
Nov 10, 2026
Merged

kgoedecke merged 1 commit into
mainfrom
kgoedecke/browser-tests-without-server

Conversation

@kgoedecke

Copy link
Copy Markdown
Collaborator

Stacked on the built fixtures.

Why

zoomToolBrowser and fitSelectionBrowser each started a real server, signed a user up and created a canvas to test things that happen in the browser.

What changes

  • Both mount the real CanvasPage from a new fixture, tests/fixtures/canvasPage.html, through tests/canvasPageFixture.ts: the socket is stubbed and the session and API are answered by the test. Assertions are unchanged; only navigation and setup differ.
  • pageControlsBrowser keeps its server on purpose: its subject is room broadcasts racing HTTP responses, the names the server gives pages, and undo against stored pages.

Measurements (two-CPU Linux container)

  • zoomToolBrowser: 8.5s to 1.2s. fitSelectionBrowser: 11.0s to 3.4s.
  • With the whole stack, the four shards take 123 / 133 / 131 / 161s; before the stack the slowest was 322s in the same container.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Moves the zoom and fit browser tests onto a shared fixture that mounts the real CanvasPage without a backend.

  • Zoom and fit browser tests use a seeded canvas page.

No actionable issues found. Tests were not run.

Reviews (2) · Last reviewed commit: "test: run the zoom and fit browser tests..." · Reviewed by Greptile

@kgoedecke
kgoedecke force-pushed the kgoedecke/built-test-fixtures branch from 32977a8 to ac8c403 Compare November 10, 2026 09:29
@kgoedecke
kgoedecke force-pushed the kgoedecke/browser-tests-without-server branch from 63aa5b8 to 5639361 Compare November 10, 2026 09:29
@kgoedecke
kgoedecke force-pushed the kgoedecke/built-test-fixtures branch from ac8c403 to b6a1058 Compare November 10, 2026 09:38
@kgoedecke
kgoedecke force-pushed the kgoedecke/browser-tests-without-server branch 2 times, most recently from e61331c to 76be192 Compare November 10, 2026 09:40
@kgoedecke
kgoedecke force-pushed the kgoedecke/built-test-fixtures branch from b6a1058 to 4eddddd Compare November 10, 2026 09:40
@kgoedecke
kgoedecke force-pushed the kgoedecke/browser-tests-without-server branch from 76be192 to dbc029c Compare November 10, 2026 10:27
@kgoedecke
kgoedecke force-pushed the kgoedecke/built-test-fixtures branch 2 times, most recently from 67bc94f to f6b144c Compare November 10, 2026 10:34
@kgoedecke
kgoedecke force-pushed the kgoedecke/browser-tests-without-server branch from dbc029c to ee519fe Compare November 10, 2026 10:34
The Zoom tool and zoom-to-selection tests started a real server, signed
a person up and created a canvas, to test what the page does with keys,
the pointer and its panels. They now mount the real CanvasPage from a
fixture (tests/fixtures/canvasPage.html through
tests/canvasPageFixture.ts): the room's socket is stubbed, the session
and the API are answered by the test, and the canvas is handed to the
store as the room would have sent it. The assertions are unchanged.

The page controls test keeps its server. Its subject is the server's
side of the page list, which is the room's broadcasts racing the HTTP
responses, the names the server gives pages, and undo against what it
stored. The sign-up form test already ran from a fixture.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kgoedecke
kgoedecke force-pushed the kgoedecke/browser-tests-without-server branch from ee519fe to 0cf9276 Compare November 10, 2026 10:41
@kgoedecke
kgoedecke changed the base branch from kgoedecke/built-test-fixtures to main November 10, 2026 10:41
@kgoedecke

Copy link
Copy Markdown
Collaborator Author

@greptileai

@kgoedecke
kgoedecke merged commit 9722b13 into main Nov 10, 2026
12 of 21 checks passed
@kgoedecke
kgoedecke deleted the kgoedecke/browser-tests-without-server branch November 10, 2026 10:50
kgoedecke added a commit that referenced this pull request Nov 16, 2026
* fix(components): queue a standalone main's frame rename with its others

The companion frame write now goes through renameFrame's per-frame queue with
no undo step, so overlapping failed saves roll back to the last saved name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(components): name an instance's layer from its Layers row, as Figma does

A double-click on an instance's row now names that layer alone. The name is a
data-doop-name the instance keeps as an override, so it stays linked and the
name survives changes to the main; an unnamed instance still shows the
component's name. The main's row keeps renaming the component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(components): show the component's name on an instance that only inherits a layer name

An instance inherits the data-doop-name its main carries, so a main named as a
layer before it became a component made every unnamed instance show that stale
name. A name now counts as the instance's own only when it differs from the
main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(components): read an instance's own name from its saved overrides

Comparing with the main's layer name hid an instance's own name once the main
took the same one. The Layers tree now asks the instance root's overrides
whether they name it, which is what the server keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(components): find an instance's own name under its component's root key

A nested instance's part attribute names its place in the outer component,
which need not be its own root's key, so the name override is now looked up
under the root key read from the instance's component template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2254225215628be63847b1a57baae8109a0d5891)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant