Skip to content

feat(mobile): set home location#79

Draft
cafca wants to merge 11 commits into
mainfrom
claude/objective-liskov-362609
Draft

feat(mobile): set home location#79
cafca wants to merge 11 commits into
mainfrom
claude/objective-liskov-362609

Conversation

@cafca
Copy link
Copy Markdown
Owner

@cafca cafca commented May 7, 2026

Summary

  • Mobile users can now set/change their home location via three entry points: settings row, home-sheet empty-state CTA, and long-press on the existing Go home button (with haptic).
  • Reuses SearchScreen via new SearchMode.pickHome — picker pops with the saved Location, caller shows snackbar.
  • Backend / API / provider unchanged (homeLocationProvider.save() already existed).

Spec: docs/superpowers/specs/2026-04-26-mobile-set-home-design.md
Plan: docs/superpowers/plans/2026-04-26-mobile-set-home.md

Test plan

  • just test-mobile — 196 tests green, flutter analyze clean
  • iOS sim smoke (just dev-ios-sim):
    • Settings → "Set home" row → search → pick → snackbar; row now reads "Change home"
    • Home sheet (logged in, no home) → "Set home" CTA → picker → snackbar
    • Home sheet (logged in, has home) → long-press "Go home" → haptic + picker → snackbar
    • Error path: kill backend mid-save → "Couldn't set home" snackbar, picker stays mounted

cafca added 11 commits May 9, 2026 16:36
Adds a test that overrides homeLocationProvider with a throwing controller, taps an Alexanderplatz result, and asserts the "Couldn't set home" SnackBar is shown while SearchScreen stays visible.
Add a `_saving` boolean flag to `_SearchScreenState` that short-circuits
`_selectLocation` on re-entry while a save is in-flight, preventing a
rapid double-tap from calling `homeLocationProvider.save()` twice.
Reset `_saving` only on the error path; the success path pops the screen
so no reset is needed. Includes a regression test with a slow-save stub.
@cafca cafca force-pushed the claude/objective-liskov-362609 branch from 3feda3d to 24f7fb8 Compare May 9, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant