Repository navigation
fix(sudoku): show failure toast when clearCache delete throws - #690
Merged
Merged
Conversation
Sudoku's clearCache() always claimed success even when persistence.deleteAbandoned threw, unlike Minesweeper's equivalent which already branches success/failure. Mirror MS's branching: keep the errorReporter funnel and add a failure-toast path so a failed clear no longer tells the user it worked. - SettingsViewModel.clearCache(): on thrown delete, set clearCacheConfirmation + show a `.failure` toast instead of falling through to the unconditional success toast. - FakePersistence: add deleteAbandonedError scripting so tests can drive the failure branch. - SettingsViewTests: new clearCache_whenDeleteThrows_showsFailureToastNotSuccess case. - Add "Couldn't clear cache" to Sudoku's Localizable.xcstrings (all 7 locales, copied byte-identical from Minesweeper's existing entry) since Sudoku's catalog didn't carry the key yet. - docs/screen-contracts.md: CLEAR-CACHE-DIALOG row was already app-agnostic (no Sudoku caveat to fix); replace the stale "verify naming if reused elsewhere" pauseToggle note with a dated repo-wide-grep confirmation of uniqueness. Co-Authored-By: Claude Fable 5 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jul 5, 2026
…ain (#695) Session log: 4-screenshot bug wave (#673-#677), three-lane dual-app UIUX/spec audit, navigation-flows + screen-contracts spec (#683), the screen-contract-spec skill (#684), the contract-driven static pass, the 4-PR fix train (#690-#693), two evidence-based environmental downgrades, and the gated open items (#685/#468/B1-B4/#694). Co-authored-by: Claude Fable 5 <[email protected]>
This was referenced Jul 27, 2026
wei18
added a commit
that referenced
this pull request
Jul 27, 2026
…19/N22 (#935) (#949) Batch 5 (final) of #935's host-driven XCUITest E2E negative-flow coverage. Adds -uitest-att-primer / -uitest-clear-cache-fail / -uitest-iap-script DEBUG-only launch-arg seams (GameAppKit) so the ATT primer decline, clear-cache failure toast, and IAP purchase cancel/fail/pending flows can be driven deterministically in both apps without real ATT/CloudKit/ StoreKit 2 dependencies. Extracts three construction sites out of MakeGameApp.swift into MakeGameApp+Helpers.swift / +UITestOverrides.swift to stay under the 400-line SwiftLint ceiling. Along the way, N22's investigation surfaced and fixed a real pre-existing bug: RemoveAdsRow/RestorePurchasesRow used .buttonStyle(.plain) with an internal Spacer() but no .contentShape(Rectangle()), leaving the row's middle an untappable dead zone (the swiftui-interaction-footguns "tap target shrink" pattern) — affects real users tapping the row's center, not just the E2E driver. Doc corrections close out N16/N18/N20/N21/N23 per the batch-5 scope adjudication (issue #935 latest comment): N19's stale "#687 blocked" note and both stale code anchors are removed (fixed by ca21ca9/#690, unified by #832); N21's anchor follows the ATT coordinator extraction; N16/N18/N23 get brief unit/launch-smoke-scope closure notes; N20 is marked documentation-only. Co-authored-by: Claude Fable 5 <[email protected]>
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.
Fixes #687: Sudoku's Clear Cache showed an unconditional 'Cache cleared' success toast even when
deleteAbandonedthrew. Now mirrors Minesweeper's branching: error → errorReporter funnel + localized 'Couldn't clear cache' failure toast + early return; success toast only on success.L10n: added the failure key to Sudoku's catalog, all 7 locales byte-identical to MS's existing entry (verified per-locale by CR); L10n fixture regenerated via
gen:l10n_fixture;scan:l10ngreen. New failing-persistence test (deleteAbandonedErrorscripting on FakePersistence) pins the branch — SudokuKit 262/262, MinesweeperKit 173/173 (untouched). Also refreshes twodocs/screen-contracts.mdaccuracy notes from the audit.Review: haiku mechanical APPROVE; sonnet reviewer lost to an API outage — Leader completed the semantic pass inline (MS-shape parity,
clearCacheConfirmationconsumers, and the failure-pathresumeCandidate = niladjudicated acceptable-by-design: the #679 path-shrink refresh restores the pill when Settings pops).Note for later: the pre-existing SUCCESS literal is unlocalized — tracked as #688 item 6.
🤖 Generated with Claude Code