fix(dogfood 2026-06-16-e2e): data-aware dashboard empty state + finding reconciliation (ISSUE-001..005)#151
Merged
Conversation
…ng reconciliation (ISSUE-001..005) Triage-first remediation of the 2026-06-16 e2e dogfood findings: fix the confirmed UX bug, satisfy the discoverability intent without regressing a load-bearing invariant, and close the false positives with proof. - ISSUE-003 (W1a): dashboard subtitle is now data-aware. No-data members no longer see "ready to explore"; they get accurate empty-state copy. Driven by the existing wrappedHref signal - no new server call, no share_settings mint. - ISSUE-004 (W1b): no-data members get a static, NON-LINK empty-state personal card explaining where/when their Wrapped appears. A live personal-Wrapped link is intentionally withheld for 0-play users: getOwnerWrappedHrefIfData returns null by design to avoid hover-preload 404s and share_settings lazy-minting (the #150 incident class). Link-gating is documented as by-design. - ISSUE-002 (W2): the bulk-apply confirm dialog already uses the focus-trapping bits-ui AlertDialog.Content primitive; added source-guards pinning the wiring. No production change (a Bun source suite cannot assert runtime focus movement). - ISSUE-001 (W3): closed as external. No unguarded client JSON.parse runs on /wrapped/2026; the "Unable to parse JSON" prefix is not V8/Bun native wording, indicating a third-party script (Google Identity Services). No code change. - ISSUE-005 (W4): false positive. Thumbnail token TTL is 30 min, not ~1 year (TOKEN_TTL_SECONDS = 30 * 60); the year:2026 payload field is the Wrapped year, not an expiry. Added a decoded-token proof test asserting exp - mint ~= 1800s. Verification: bun run check (0 errors), bun run test (2151 pass / 0 fail, coverage >= 80%), bun run check:biome (clean).
🤖 Augment PR SummarySummary: This PR remediates 2026-06-16 dogfood findings by making the dashboard reflect whether a user actually has synced plays for the current year, and by adding “source-guard” tests to prevent regressions. Changes:
Technical Notes: The UI behavior change is driven entirely by the existing 🤖 Was this summary useful? React with 👍 or 👎 |
- dashboard: suppress empty-state card icon hover scale so the 'no data' card reads as non-clickable (ISSUE 3431266106) - thumbnail-auth test: bound token exp two-sidedly against before/after mint captures to remove slow-CI flakiness while preserving the ~30min-not-1yr proof (ISSUE 3431266114)
Owner
Author
|
augment review |
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.
Summary
Triage-first remediation of the 2026-06-16 end-to-end dogfood findings (
dogfood-output/report.md, ISSUE-001..005 + INFO-001). The run reported PASS overall with 5 low-severity items. On code inspection, 2 of 5 were contradicted by the source and 1 is by-design, so this change fixes only what is real, satisfies the discoverability intent without regressing a load-bearing invariant, and closes the false positives with evidence rather than padding the diff.Changes
ISSUE-003 - Dashboard empty-state copy is now data-aware (confirmed bug)
The
/dashboardsubtitle previously read "Your Plex Wrapped for {year} is ready to explore" unconditionally, including for members with no synced history (whose personal Wrapped then shows an empty state). The subtitle is now gated on the existingwrappedHrefsignal: data-having members keep the original copy; no-data members get accurate empty-state copy. No new server call and noshare_settingsmint.ISSUE-004 - No-data personal-card affordance (resolved by copy; link-gating is by-design)
No-data members now see a static, non-link empty-state personal card explaining where and when their Wrapped will appear. A live personal-Wrapped link is intentionally withheld for 0-play users:
getOwnerWrappedHrefIfDatareturnsnullby design to prevent SvelteKit hover-preload firing a 404 and to preventgetOrCreateShareSettingslazily minting ashare_settingsrow on every no-data load (the duplicate-row HIGH-severity incident class from #150). The affordance is a<div>, not an<a>, and contains no/wrapped/.../u/...href, hand-constructed or computed.ISSUE-002 - Confirm-dialog focus behavior (verified, documented)
The bulk-apply confirmation dialog on
/admin/settings/privacyalready uses the focus-trapping bits-uiAlertDialog.Contentprimitive. Added source-guard tests pinning that wiring. No production change: a Bun source suite cannot assert runtime focus movement, so this documents and locks the primitive rather than hand-rolling a trap. Escalate to a Playwright assertion only if the trap is ever proven broken.ISSUE-001 - Console JSON-parse warning (closed as external)
No unguarded client-side
JSON.parseruns on/wrapped/2026: the only client parses are try/catch-guarded (sync-status.svelte.ts) or live on other routes (admin logs/sync, onboarding, plex-login). The literal textUnable to parse JSON: "undefined"is not V8/Bun native wording (native begins withUnexpected token), indicating a third-party script - consistent with the Google Identity Services deprecation warning observed on the same page. No code change.ISSUE-005 - Thumbnail-proxy token TTL (false positive, closed with proof)
The token TTL is already 30 minutes (
TOKEN_TTL_SECONDS = 30 * 60, single mint path), not ~1 year. Theyear:2026payload field is the Wrapped year, not an expiry. Added a decoded-token proof test assertingexp - mint-timeis approximately 1800 seconds.INFO-001 (public landing lookup disabled) is an intentional config choice and out of scope.
Files changed
src/routes/dashboard/+page.svelte- data-aware subtitle and non-link empty-state personal cardtests/unit/dashboard/dashboard-empty-state.test.ts(new) - source-guards for the subtitle gate and the no-link affordancetests/unit/admin/dogfood-ui-invariants.test.ts- source-guards for the bits-ui AlertDialog focus-trapping primitivetests/unit/plex/thumbnail-auth.test.ts- decoded-token ~30-minute TTL proofdogfood-output/report.md(gitignored) - status annotations for ISSUE-001..005Verification
bun run check- 0 errorsbun run test- 2151 pass / 0 fail, coverage >= 80% line/functionbun run check:biome- cleanNotes
getOwnerWrappedHrefIfData/getOwnerWrappedHrefhelper contracts are unchanged, so the admin blast radius (admin/+layout.server.tsshares the helper) and the fix(dogfood 2026-06-16): remediate ISSUE-001/002/003 #150 no-mint/no-preload invariant are preserved.