Repository navigation
fix(web): keep the tools panel still when a cue is picked, and wait for hydration in e2e - #449
Merged
Merged
Conversation
…or hydration in e2e At iPhone width a cue with a longer line moved the page 28 px, because the panel reserved room for the capture but not the words. Every cue's words now share one cell, as tall as the longest. The rest of the WebKit and phone failures were the tests. WebKit fires load without waiting for the app's module imports, so clicks reached a page that hadn't hydrated. Holding scripts back meant load never came. An approval now outlives sign-out, so the report test needs an account per browser. The verifications list is cards on a phone, not a table.
bnb
approved these changes
Nov 5, 2026
bnb
approved these changes
Nov 5, 2026
Coverage Report for apps/web
File Coverage
SizeCompared with main. KiB are 1,024 bytes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Fixes LOC-173.
On a Mac, 14 of 62 end-to-end tests failed on
mainin the WebKit and iPhone projects. There were five causes, one of them in the app.The tools panel moved.
each tool shows itself at worksays picking a cue moves nothing on the page. On an iPhone 14 the panel went from 799.97 px to 827.86 px picking another cue, after fonts had settled. HotCues.svelte gave the capture a fixed stage but sized the words to the selected cue. A cue whose line wraps to one more line pushed everything below it.Scripts held back meant no
load.beforeHydrationholds the page's scripts, then callspage.goto, which waits forload. WebKit on macOS holdsloadfor those scripts, so 8 failures were a 60 s timeout there. Waiting fordomcontentloadedis what the helper needs.Clicks before hydration. WebKit fires
loadwithout waiting for the app's module imports, and on the dev server each module is a request of its own. A click could reach ause:enhanceform or a link before any script took it over, and leaving the page cancelled the imports (TypeError: Importing a module script failed), after which SvelteKit's fallback sent the browser back. This is theVerify chain,Ask for accessandManagefailures. The file already had the signal,data-hydrated, so there's now onehydrated(page)helper, used before the first click after a navigation.An approval that outlives sign-out. Since d0e3acf, sign-in keeps optional scopes an account held. Every project runs against the same network, so once one browser approved posting as
pat.test, the next never sawApprove posting first. The test makes its own account.A table on a desktop, cards on a phone. The verification test found its row by the
rowrole, which a phone's list of cards doesn't have.Added
hydrated(page)inapp.e2e.ts.Changed
HotCues.svelteputs every cue's words in one grid cell, the othersinvisible, so the cell is as tall as the longest, and hidden words stay out of the accessibility tree.beforeHydrationwaits fordomcontentloaded.hydrated(page)replaces the file's repeateddata-hydratedassertion and runs before each first click after a navigation.createAccount.Removed
const cueinHotCues.svelte, which nothing else used.How it was tested
On macOS with Playwright's WebKit:
main: 14 failed, 48 passed in WebKit and iPhone, in 17.0 minutes.pnpm checkhas 0 errors, andpnpm testpassed 2,047 tests.pnpm test:coverage(2,395 passed, 5 skipped),mainagainst this branch, in percent:mainHotCues.sveltebranchesHotCues.sveltestays at 100% of lines.Firefox can't start in the environment I ran this in (
Could not find profile folder, before any app code runs), so Firefox hasn't run these changes. The scheduled workflow will.--repeat-each 2passed 121 of 124:a DJ proposes a changeuses one tagline per project, so a second pass on the same network collides with the first. The tests are meant for one pass per network.