Skip to content

Fix two cloud-browser specs that failed locally after #305 - #317

Merged
seanbalz merged 1 commit into
mainfrom
claude/busy-booth-890afe
Oct 29, 2026
Merged

seanbalz merged 1 commit into
mainfrom
claude/busy-booth-890afe

Conversation

@seanbalz

Copy link
Copy Markdown
Owner

Two Playwright cloud-browser tests failed in a local run while verifying #305. CI passed them. Each one was run alone to find the cause.

next-feed.spec.js "every old kind renders…": a real layout defect, seen only with macOS fonts

  • The test failed every time, even run alone: feed-thread dark 320 reported span "Week is open, get your picks in": text leaves its box.
  • Cause: .gx-feed-cm-text used white-space: pre-wrap. With pre-wrap, a space at a wrap point hangs past the line box. At 320 px, macOS Chrome wraps right after "your ". The measured line rects were [118.6, 287.5], then a 4 px [287.5, 291.5] for the space, and the box ends at 288. Linux CI fonts wrap somewhere else, so CI never saw it.
  • Fix: white-space: break-spaces. Spaces and newlines are still kept, but a space at the end of a line now wraps to the next line instead of hanging. .gx-history-note and .gx-game-note-saved had the same latent issue and got the same one-line change.
  • The phone-layout check (tests/helpers/phone-layout.mjs) is unchanged.

comparisons-home.spec.js "settings retain the draft on a concurrent account write…": a timing problem under load

  • Passes when run alone. The local failure ran while other sessions' suites were using the machine; load average was about 60 on 10 cores while I tested.
  • Cause: a confirmed save makes three local PGlite round trips (fresh read, save, confirming read) before "Settings saved." appears, and the default expect wait is 5 s.
  • Reproduced on purpose: delaying each me/preferences* request by 1.8 s made the original assertion fail with the reported symptom (getByText('Settings saved.') not found). With the fix, the same run passes.
  • Fix: the three "Settings saved." waits in this spec get SAVE_ROUND_TRIPS = 15_000. The assertion is the same; only the wait is longer. No privacy or leak check was touched.

Verification

  • npx playwright test --config playwright.cloud.config.js with both specs and --repeat-each 3 (port moved to 5231 in a local config copy that is not committed): 17 of 18 passed. Both target tests passed 3 out of 3. The one failure was the first, cold run of comparisons-home.spec.js:28 at load about 60: setup used up the whole 30 s test timeout before sign-in. It passed the other two repeats. That is general machine load, not this change.
  • npm test: green (vitest 468/468; the node suites passed).
  • Requires the PGlite runtime in .local/sql-check; without it these specs skip.

🤖 Generated with Claude Code

- next-feed "every old kind renders": comment text used white-space: pre-wrap,
  so a space at a wrap point hangs past its box (4 px at 320 px with macOS
  Chrome fonts; Linux CI fonts wrap elsewhere). Use break-spaces, which wraps
  that space instead. Same change for the history note and saved game note.
- comparisons-home settings tests: a confirmed save is three local-database
  round trips; on a loaded machine they outlast the 5 s default wait. Give the
  "Settings saved." confirmation 15 s; the assertion itself is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seanbalz
seanbalz marked this pull request as ready for review October 29, 2026 00:27
@seanbalz
seanbalz merged commit 6b5386b into main Oct 29, 2026
9 checks passed
@seanbalz
seanbalz deleted the claude/busy-booth-890afe branch October 29, 2026 01:50
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