Repository navigation
Description
Context
Static-code UI/UX audit round (2026-07-11, read-only, state-tier consistency check). Repo state: main @ 382eabd; re-verified against main @ ff4e010 on 2026-07-11 (same code).
Related but distinct: issue #686 (closed) fixed a functional bug in this same alert — the "Try another difficulty" button previously did nothing; it now correctly routes to the Practice hub (viewModel.tryPracticeInstead()). This issue is about the visual-language inconsistency of using a system .alert at all for this state, which #686 did not change.
Problem
SUD-DAILY-HUB's .exhausted state renders as Color.clear under a floating system .alert, while every other same-tier failure state in the app (.failed, SUD-BOARD-LOAD-FAILED) uses an inline block (icon + message + action) directly in the content area. Two different visual languages exist for what is structurally the same "this screen couldn't produce content" case.
Evidence
.exhausted (system alert over blank content), Packages/SudokuKit/Sources/SudokuUI/Daily/DailyHubView.swift:54-74:
.task { await viewModel.bootstrap() }
.alert(
"Couldn't generate today's puzzle",
isPresented: Binding(
get: { viewModel.state == .exhausted },
set: { _ in }
),
actions: {
// #686: the label promised a difficulty picker this hub
// doesn't have — route to the Practice hub that actually has
// one (reuses the existing "Practice" key, same string the
// Home card/PracticeHubView title already surface).
Button("Practice") { viewModel.tryPracticeInstead() }
Button("Cancel", role: .cancel) { viewModel.dismissExhausted() }
},
message: {
Text("Try a different difficulty, or come back tomorrow.")
}
)The screen's actual content behind this alert is Color.clear — a blank backdrop — while the alert floats over it.
.failed (inline block), same file, DailyHubView.swift:42-49:
failure: { reason in
VStack(spacing: 12) {
Image(systemName: "exclamationmark.triangle.fill")
.foregroundStyle(theme.status.warning.resolved)
Text(reason)
.font(.caption)
.foregroundStyle(theme.text.secondary.resolved)
}
}SUD-BOARD-LOAD-FAILED uses the same inline-block pattern (icon + message + Retry action) elsewhere in the codebase.
Impact
- Same-tier failure states (both "this screen has nothing to show the user") read as two unrelated UI patterns depending on which specific failure it is — inconsistent with the rest of the app's state-tier discipline, which this audit otherwise found consistent everywhere else.
- The blank
Color.clearbackdrop behind the alert briefly shows an empty screen before/around the system dialog, which reads as more jarring than the calm inline-block pattern used elsewhere.
Suggested fix
Convert .exhausted to the same inline empty-state block pattern used by .failed — icon + message + action — keeping its existing "Practice" / "Cancel" actions as inline buttons instead of .alert actions. The functional routing already fixed in #686 (tryPracticeInstead(), dismissExhausted()) should carry over unchanged; this is a presentation-layer change only.
Acceptance criteria
-
.exhaustedrenders as an inline block (icon + message + action buttons) matching the visual pattern of.failedandSUD-BOARD-LOAD-FAILED, not a system.alert. - "Practice" and "Cancel" actions remain functionally identical to today (routes to Practice hub / dismisses back per fix(sudoku): Daily hub 'exhausted' alert offers 'Try another difficulty' but the button does nothing #686's fix) — this issue changes presentation only, not behavior.
- No
Color.clearblank backdrop moment before the state renders.
Source & dependencies
- From
meetings/2026-07-11_design-db-uiux-audit.md(finding N3, MINOR), local-only branchdocs/design-db-audit-and-specs, not yet pushed — this issue body is self-contained. - Distinct from, but related to, the already-closed fix(sudoku): Daily hub 'exhausted' alert offers 'Try another difficulty' but the button does nothing #686 (fixed the button's dead-action bug; did not touch the alert-vs-inline-block presentation choice this issue addresses).
Activity
wei18 commentedon Jul 13, 2026
Owner adjudication 2026-07-13: the shared-shell policy codified in
DailyHubShellView.swift:78-82("Shell shows an empty backdrop so the alert reads as the primary surface") is overturned for Sudoku's.exhausted. Replace the system alert overColor.clearwith an inline block consistent with the.failedtreatment (DailyHubShellView.swift:83-85). Note: Minesweeper has no.exhausted/.failedpath (non-throwing generation) — scope the fix to Sudoku only.wei18 commentedon Jul 13, 2026
🔒 Claiming: this issue is being worked on now (session 2026-07-13, Leader + dispatched Developer). Scope: presentation-only conversion of Daily .exhausted from system .alert to the inline empty-state block per the acceptance criteria; #686 routing behavior carries over unchanged; existing L10n keys reused. Other agents: please don't pick this up concurrently.
fix(sudoku): render Daily .exhausted as inline empty-state block, not…
docs: sweep remaining .exhausted-as-alert references after #768 (#795)
docs: upkeep wave for #757 triage — v2 index, spec §5 as-built, desig…
test(e2e): cover sudoku hub failure flows N3-N5 (#935) (#937)
fix(today): visible caption on the phase-1 daily load failure (#1021 …
fix(today): recover from a phase-1 daily load failure on return to th…
feat(ui): today / practice / progress tab-root screens per design.md …