Skip to content

Fix/pet card layout and smoke flake - #139

Merged
Cat5Dog2 merged 2 commits into
mainfrom
fix/pet-card-layout-and-smoke-flake
Aug 6, 2026
Merged

Fix/pet card layout and smoke flake#139
Cat5Dog2 merged 2 commits into
mainfrom
fix/pet-card-layout-and-smoke-flake

Conversation

@Cat5Dog2

@Cat5Dog2 Cat5Dog2 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Two independent fixes, one per commit, touching disjoint files so either can be
reverted on its own.

1. fix: give the breed value the card width in the pet list (42aaf66)

On desktop the pet card laid its detail grid out in two columns, leaving each
value about 150px — not enough for a 12-character breed such as
スコティッシュフォールド, which wrapped mid-name. Breed is free text, so any
fixed column width fails again as soon as a longer name is entered.

Each item is now a single label | value row. Measured on the real page at
1280px (920px shell, three columns, 283px cards):

before after
breed value column 129px 173px
card height (desktop) 474px 490px
card height (390px) 643px 523px

Row spacing drops from 10px to 6px so the doubled number of separators does not
inflate the card; values also line up across rows and across cards.

This commit also replaces system-ui with an explicit Japanese font stack.
system-ui resolves to Yu Gothic UI on Windows, whose kana advance is about
0.72em, so identical text wrapped differently there than on macOS/Linux, where
it is 1em — スコティッシュフォールド measured 139px against 204px. Naming the
fonts narrows that gap (Windows now measures 192px). It is an approximation,
not a guarantee: where none of the named fonts exist it still falls back to
sans-serif.

Accepted trade-off

At three columns the value column is 173px, i.e. room for about ten full-width
characters. Longer breeds still wrap — now consistently on every OS rather than
only on some. Fitting twelve characters would need cards of 312px or more, which
means either a wider shell or dropping to two columns; three-column density was
chosen instead. The reasoning is recorded in the CSS.

Test

PetList_GivesBreedValueMostOfCardWidth_AcrossViewports fixes the width split —
the value keeps room for at least ten full-width characters, on the same line as
its label — rather than a character count, so it does not depend on which fonts
the CI runner has installed. It was confirmed to fail both on the previous
layout and on a two-column card grid.

2. fix: stop the local-smoke readiness test flaking under load (133b7c3)

readiness waits through 500 until the app returns 200 failed intermittently
with Timed out waiting for http://smoke.invalid (last status: 500).

wait_until_available polls against a wall-clock deadline and slept 0.5s
between attempts. The test queues five 500s before the 200, so 2.5s of the 5s
budget went to sleeping, and spawning the stubbed curl six times cost another
~1.5s on Windows — about 1s of headroom, which a busy machine ate.

The suite already states at the top that nothing in it waits on real time (it
zeroes SMOKE_RETRY_DELAY_SECONDS), but readiness had no such knob. This adds
SMOKE_READY_POLL_SECONDS, defaulting to 0.5 so CD behaviour is unchanged, and
zeroes it in the tests: the readiness phase drops from ~4.0s to ~1.46s. The
test's --timeout also goes from 5 to 20, because the remaining cost is process
startup and cannot be zeroed; nothing here asserts a readiness timeout and the
loop returns as soon as the queue yields 200, so the larger budget costs no run
time. A static guard for the new default is added alongside the existing one for
the retry delay.

Test plan

  • scripts/build.ps1 — 0 warnings, 0 errors
  • scripts/test.ps1 — 240 unit tests, 8 shell tests
  • Playwright E2E — 9 tests
  • scripts/format.ps1 — clean
  • Layout swept over eight pages at 390px and 1280px: no horizontal scroll and
    nothing spilling out of the shell
  • Smoke suite run five times standalone and three times while a dotnet test
    run loaded the machine: 8/8 every time

Review notes

Per AGENTS.md this touches none of the areas that require human sign-off
(authorisation, existence hiding, returnUrl, image handling, deletion). The
changes are CSS, a shell script default, and tests.

Cat5Dog2 and others added 2 commits August 6, 2026 16:57
The pet card's detail grid was two columns on desktop, so each value got
about 150px - not enough for a 12-character breed such as
スコティッシュフォールド, which wrapped. Breed is free text, so a fixed
column width fails again as soon as a longer name is entered.

Lay each item out as one "label | value" row instead. Measured on the real
page at 1280px (920px shell, three columns, 283px cards) the value column
goes from 129px to 173px, and values line up across rows. Row spacing drops
from 10px to 6px so the extra separators do not make the card taller: the
card grows 16px on desktop and shrinks 120px on mobile.

Replace system-ui with an explicit Japanese font stack as well. system-ui
resolves to Yu Gothic UI on Windows, whose kana advance is about 0.72em, so
the same text wrapped differently there than on macOS/Linux, where it is
1em: スコティッシュフォールド measured 139px against 204px. Naming the fonts
narrows that gap - it is an approximation, not a guarantee, since it falls
back to sans-serif where none are installed. Swept eight pages at 390px and
1280px: no horizontal scroll, nothing spilling out of the shell.

The new E2E test fixes the width split - the value keeps room for at least
ten full-width characters, on the same line as its label - rather than a
character count, so it does not depend on which fonts the runner has. It
fails both on the previous layout and on a two-column card grid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"readiness waits through 500 until the app returns 200" failed
intermittently with "Timed out waiting for http://smoke.invalid (last
status: 500)".

wait_until_available polls against a wall-clock deadline and slept 0.5s
between attempts. The test queues five 500s before the 200, so 2.5s of the
5s budget went to sleeping, and spawning the stubbed curl six times cost
another ~1.5s on Windows. That left about a second of headroom, which a
busy machine ate.

The suite already states at the top that nothing in it waits on real time -
it zeroes SMOKE_RETRY_DELAY_SECONDS - but readiness had no such knob. Add
SMOKE_READY_POLL_SECONDS (default 0.5, so CD is unchanged) and zero it in
the tests, which cuts the readiness phase from ~4.0s to ~1.46s. Raise the
test's --timeout from 5 to 20 as well, because the remaining cost is
process startup, which cannot be zeroed: nothing here asserts a readiness
timeout and the loop returns as soon as the queue yields 200, so the larger
budget costs no run time.

Guard the new default the way the retry delay is already guarded, since the
tests force it to 0.

Verified with the suite run five times standalone and three times while a
dotnet test run loaded the machine: 8/8 each time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Cat5Dog2
Cat5Dog2 merged commit 6ef7d74 into main Aug 6, 2026
3 checks passed
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