Repository navigation
web UI: style friends, pings, and notifications screens - #61
Merged
Merged
Conversation
Restyles friends/+page.svelte and notifications/+page.svelte with #35's design tokens: .page-title/.label-rule headers, .card panels, .badge for friend-request state (Pending vs Wants to be friends vs Friend) and notification alerts state (Alerts on/off, New sightings), .btn-primary/.btn-secondary per app.css's own component-layer guidance, .empty-state for the signed-out prompts, .field-label + .input on every form control. Replaces the old inline `style="opacity:0.6"` read-sighting styling with the opacity-60 utility plus a New badge. Adds web/e2e/friends-notifications.spec.ts: real (unmocked) signed-out coverage for both screens, plus signed-in coverage that mocks the Supabase session via a seeded auth cookie (read by @supabase/ssr's browser client post-hydration, never seen by the SSR request) and mocks all REST/realtime traffic via page.route/routeWebSocket -- nothing here touches the live project.
This was referenced Aug 19, 2026
4 tasks done
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.
Closes #39
Summary
Restyles
web/src/routes/friends/+page.svelteandweb/src/routes/notifications/+page.svelteusing only #35's landed component classes/tokens (.card,.btn*,.badge,.empty-state,.page-title,.section-title,.field-label,.input,.label-rule). Noapp.cssedits, no new hex colors..page-title/.label-ruleheader,.cardsearch panel, friend-request rows badgedPending(outgoing) vsWants to be friends+.btn-primaryAccept (incoming), accepted friends in a.cardwithFriendbadge + hall select/message.inputs +.btn-secondaryping button (per app.css's own comment calling out "Add friend" as the.btn-primaryexample and "ping" as the.btn-secondaryexample), pings inbox in.cards with hall.badges,.empty-statefor all three "nothing yet" states and for signed-out.Alerts on/Alerts off.badgenext to the checkbox (the toggle-clarity criterion), sightings list badges unread rowsNewand every row's hall name,.empty-statefor zero-sightings and signed-out. The oldstyle="opacity: 0.6"inline style on read rows is replaced with theopacity-60Tailwind utility (not a new color/token).New
web/e2e/friends-notifications.spec.ts(6 tests): real, unmocked signed-out coverage for both screens (no session cookie at all — proves the prompt renders, nothing crashes), plus signed-in coverage that mocks the Supabase session and all network traffic so nothing touches the live project (see spec file header comment for the exact mechanism: a seededsb-<ref>-auth-tokencookie viapage.addInitScript, read by@supabase/ssr's browser client only after hydration — the SSR request never sees it, sosafeGetSession()stays a no-network no-op — pluspage.routefor REST andpage.routeWebSocketfor the friends page's realtime channel).Note on #39's third acceptance criterion ("no E2E coverage exists for these screens yet ... manual verification via a signed-in session is the check here"): the dispatching task for this PR explicitly asked for e2e coverage with mocked Supabase, so that's what's here instead of manual-only verification. Also verified live against the dev server (screenshots below).
Acceptance criteria (from #39)
app.csschanges.Pending,Wants to be friends,Friend,Alerts on/Alerts off,New. See screenshots below.pnpm --filter web checkclean, CI passes — see verification section. (Superseded the "no E2E coverage" sub-clause per the note above — addedweb/e2e/friends-notifications.spec.tsinstead of relying on manual-only verification.)Verification
PORT=4302 npx playwright test— all 23 tests pass (17 pre-existing + 6 new), no regressions.pnpm --filter web check—0 ERRORS 0 WARNINGS.pnpm --filter web build— succeeds (pre-existingadapter-auto"could not detect production environment" notice only, unrelated to this change).npx vite dev --port 4302(web/.envcopied from.env.example): screenshots of/friendsand/notifications, both signed-out (real, no mocking) and signed-in (same cookie+route mocking technique as the e2e spec, driven via a throwaway Playwright script — not committed).Red/green log (strict TDD)
The spec was written and run against the original, unstyled
+page.sveltemarkup first (before any implementation edit) and failed for real — every assertion targets a class/badge/copy string that didn't exist in the old plain-HTML markup, so this is genuine new-behavior red, no mutation-testing needed:After implementing the styled markup, all 6 pass:
Files changed
web/src/routes/friends/+page.svelte— styling only, same load/action logic (added two$derivedfilters for pending/accepted to keep the template readable; no behavior change).web/src/routes/notifications/+page.svelte— styling only, same logic; inlineopacitystyle replaced with a Tailwind utility class +Newbadge.web/e2e/friends-notifications.spec.ts— new.Scope notes / things flagged but not changed
markReadis stillonmouseenter-only (pre-existing behavior) — keyboard users can't mark a sighting read. Not in web UI: style friends, pings, and notifications screens #39's scope, flagging per dispatch instructions rather than silently fixing.onAuthStateChange/invalidate("supabase:auth")listener anywhere — out of scope, and the e2e session-mocking technique deliberately doesn't rely on one (it uses the existing hydration re-run of+layout.ts).+page.ts/server files touched — load output shape is unchanged.