Follow-ups from the multi-model review of PR #273 (Bug #5: WebSocket connection indicator on no-rooms screen). All Important / Suggestion level — non-blocking, but worth picking up.
Items
Important
-
Assert exactly ONE pill is visible at each viewport. Both placements (RoomList always-visible + Conversation no-room inline) share data-testid="connection-status-indicator". The current spec uses :visible + .first(), which masks the regression where md:hidden accidentally inverts (or the Tailwind v4 @source "../src/**/*.rs" directive gets dropped — see AGENTS.md). Add await expect(page.locator(PILL_TESTID)).toHaveCount(1) at desktop (1280px) AND mobile (375x812).
-
State-transition coverage. All four current tests assert "Connecting..." at initial paint. A regression that replaces try_read() with peek() (no subscription at all per Dioxus 0.7.x) would leave the pill stuck and not be caught. Either assert the dot's bg-color class so a stuck-state regression is detectable, or drive a state transition via test fixture.
Suggestion
-
Tighten waitForApp selector — expect(page.locator(\"aside, .app-root button\")).not.toHaveCount(0) matches any button. Should wait for the rail itself.
-
Run the new spec across webkit and mobile-safari projects too — Firefox-mobile is where the try_read() rule originated.
-
Consider a data-testid=\"rooms-rail\" instead of hasText: 'Rooms' for the rail-membership assertion — text changes break it brittle-ly.
Context
[AI-assisted - Claude]
Follow-ups from the multi-model review of PR #273 (Bug #5: WebSocket connection indicator on no-rooms screen). All Important / Suggestion level — non-blocking, but worth picking up.
Items
Important
Assert exactly ONE pill is visible at each viewport. Both placements (
RoomListalways-visible +Conversationno-room inline) sharedata-testid="connection-status-indicator". The current spec uses:visible+.first(), which masks the regression wheremd:hiddenaccidentally inverts (or the Tailwind v4@source "../src/**/*.rs"directive gets dropped — see AGENTS.md). Addawait expect(page.locator(PILL_TESTID)).toHaveCount(1)at desktop (1280px) AND mobile (375x812).State-transition coverage. All four current tests assert "Connecting..." at initial paint. A regression that replaces
try_read()withpeek()(no subscription at all per Dioxus 0.7.x) would leave the pill stuck and not be caught. Either assert the dot's bg-color class so a stuck-state regression is detectable, or drive a state transition via test fixture.Suggestion
Tighten
waitForAppselector —expect(page.locator(\"aside, .app-root button\")).not.toHaveCount(0)matches any button. Should wait for the rail itself.Run the new spec across
webkitandmobile-safariprojects too — Firefox-mobile is where thetry_read()rule originated.Consider a
data-testid=\"rooms-rail\"instead ofhasText: 'Rooms'for the rail-membership assertion — text changes break it brittle-ly.Context
[AI-assisted - Claude]