flower
/
All briefs
complete draft note lounge
epic · Explore /authors-optimization design docs → decide b...

C9 · Favorite locations + home + /settings (PR9)

canonical · plan

Spec

markdown

hand-off · dispatch

Dispatch

Auto-dispatch

when it reaches planned

Design-loop

design pass before build

This brief is complete — dispatch is closed.

#135 done fresh lounge · feature/authors-optimization
agent: claude claimed by lounge-orchestrator proc #1173
You are being dispatched from flower Brief #255: C9 · Favorite locations + home + /settings (PR9)

Recall pointer:
- Use recall_brief with id 255 for the full folder if you need provenance.

Target:
- project: lounge (/Users/mikeferrara/Documents/code/lounge)
- branch: feature/authors-optimization
- worktree: not specified
- kind: fresh

Current brief spec:
(no spec yet)

This is a direct request, not a fully-specced plan. If it's clear, resolve it. If you hit a blocking ambiguity, call brief_ask (or brief_append) with your questions and flip the brief to `refining` before proceeding — don't guess.

Recent/key trace events:
[1] participant_joined lounge-refine: (no body)
[2] note_added lounge-refine: Child of /authors optimization epic (#239). **Depends on C8 + #242.** Build in `feature/authors-optimization` worktree.

Implement **PR9** (doc 50) with operator deltas: `Location` adopts Maize Markable (star/favorite locations); reuse `users.location_id` as home (do NOT add `default_location_id`); **add FK `users.location_id → locations(id) ON DELETE SET NULL`** (#65 — build step confirms one doesn't already exist first); add nullable pref columns (`default_to_home_location`, `default_search_radius_miles`); precedence ladder (URL > session > home(opt-in) > none) in `RedditUserIndex::mount()`; `invalidateCachedCollection()` Location branch.

**Operator deltas:**
- **Standalone `/settings` Livewire page** (#64) for home location + default radius (+ prefs).
- **Low-friction favorite + set-home actions, and favorited + home locations surfaced as QUICK-SELECT options in the location search.**
- Favorited/home locations reference #242's qualified set.
- Drop the per-user quality-floor column (quality feature cut).

Validation: star → `markable_favorites` row (`markable_type = App\Models\Location`); cached followed-locations busts on star/unstar; `/settings` persists; precedence ladder honored.
[3] parent_set lounge-refine: Grouped under epic #239.
[4] dependency_added lounge-refine: Now depends on #254 (C8 · /authors "Followed only" filter (PR8)).
[5] dependency_added lounge-refine: Now depends on #242 (Location qualification foundation + low-hanging-fruit cleanup (prereq for /authors optimization)).
[6] status_change lounge-refine: (no body)
[7] participant_joined lounge-worker-254: (no body)
[8] unblocked lounge-worker-254: Unblocked — #254 reached complete.

Recommended linked context:
{
    "todos": [],
    "scratchpads": []
}

Execution notes:
- Treat the brief as the source of truth.
- Keep work scoped to this dispatch request.
- Use brief_append / brief_update_status when reporting material progress; as your final dispatched-worker step, call brief_dispatch_complete with dispatch_request_id (or brief_id) and actor_ref.
- Codex workers should verify mutating Flower tools with tool_search query `brief_append brief_dispatch_complete flower_feedback` (limit 20) when tool availability is in doubt; report raw SEE/LOAD vs NOT visible instead of silently using local fallbacks.
- Add a git commit trailer `Brief: #255` to every commit for this brief so flower can exact-link commits back to the brief.
- Need an operator call while working this brief? A question ABOUT THIS BRIEF -> brief_ask(255, ...); a standalone decision not tied to the brief -> decision_ask(...). Both expose the full affordance set (confirm | single_choice | multi_choice | text, options + recommended, allow_write_in); prefer async questions over blocking and set is_blocking only when you truly cannot proceed.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. status change 15h ago
    agent · lounge-worker-255
  2. dispatched 15h ago

    Dispatch request #135 marked done.

    agent · lounge-worker-255
  3. note added 15h ago

    C9/PR9 BUILD COMPLETE on feature/authors-optimization (isolated worktree, DB lounge_feature_authors_optimization). Two commits: • 805e5d2f — data + model layer • a41f9df8 — feature + UI + tests ## Schema (migrations applied to isolated DB, verified) - 2026_07_06_000000_add_browse_preferences_to_users: `default_to_home_location TINYINT(1) NOT NULL DEFAULT 0` + `default_search_radius_miles SMALLINT UNSIGNED NULL` (INSTANT). Per-user quality-floor column CUT for v1 (README §0.3) — only these two pref columns. - 2026_07_06_000100_add_location_fk_to_users: FK `users.location_id → locations(id) ON DELETE SET NULL`. Confirmed absent first (schema dump: only `users_location_id_index`, no constraint), idempotent guard via information_schema, reuses the existing index (no dup). Verified live: DELETE_RULE=SET NULL. - No favorites schema — markable_favorites already polymorphic (#254 added the covering index). ## Favorites (Markable on Location) - app/Models/Location.php: `use FavorableTrait; use Markable; protected static array $marks = [Favorite::class];` — byte-for-byte the RedditUser/RedditSubreddit pattern. - app/Traits/FavorableTrait.php: added Location branch to invalidateCachedCollection() (busts followedLocationsCacheKey on star/unstar — the one shared-code edit). - app/Models/User.php: followedLocations()/followedLocationsCacheKey() (`user:followed_locations:v1:{id}`)/cachedFollowedLocationsCollection() (60m, city eager-loaded)/isLocationFollowed(); homeLocation()/homeLocationSlug() reuse users.location_id + resolve merges via getFinalMergedInto(). Casts added; ide-helper refreshed docblocks. ## Home + precedence ladder - app/Livewire/RedditUserIndex.php: new mount() ladder — URL param > session(authors.location) > opt-in home (default_to_home_location + homeLocationSlug) > none. locationSelected() persists session pick; clearLocation()/resetFilters() forget it. Guest-safe. (mount URL guard uses hydrated `$this->location !== ''` OR request()->has('location') — robust + test-friendly.) ## /settings page (#64) - Route: `Route::get('/settings', \App\Livewire\UserSettings::class)->name('settings')` in the authed group (following → settings → dashboard). - app/Livewire/UserSettings.php + resources/views/livewire/user-settings.blade.php: pineapple hero, home-area typeahead (reuses LocationSearch → locationSelected), default-to-home toggle, radius select {0,10,25,50,100}, favorites management (unfollow), notifications placeholder, cross-link to /user/profile. Full-page default layout (layouts.app), matching SubredditMediaFeed. - Nav links added (desktop dropdown + responsive) in navigation-menu.blade.php. ## Low-friction favorite + set-home + quick-select (operator delta) - app/Livewire/LocationFollowButton.php + view: reusable star toggle + set-home/clear-home actions (mirror of RedditUserFollowButton). PR10 places it visually; working surface + view compile-verified by tests. - app/Livewire/LocationSearch.php + view: signed-in user's home + starred locations surfaced as quick-select options (openDropdown on focus → "Your places" with Home/Starred tags), dispatch locationSelected. Empty for guests. ## Verification - tests/Feature/Livewire/FavoriteLocationsAndSettingsTest.php — 18 tests / 52 assertions green: star→markable_favorites row (markable_type=App\Models\Location) + cache-bust, unstar, merge-resolved home slug, /settings persist + radius validation + unfollow + mount-load, precedence ladder (URL>session>opt-in>none, guest), session persist/forget, quick-select (authed + guest empty), follow-button toggle/set-home/clear/guest. - No regressions: tests/Feature/Livewire (71 pass) + tests/Feature/Locations + RedditUserIndexTest all green. - Pint clean on all changed files. php -l clean. (PHPStan is pre-broken on this branch base — phpstan-baseline.neon references a file removed on the branch; unrelated to PR9.) - Reverted incidental ide-helper docblock churn on 5 unrelated models to keep the diff focused. Note: full-page HTTP smoke of /settings not run (pre-existing Vite-manifest env gap in this worktree, per dispatch); relied on Livewire component tests like prior children.

    agent · lounge-worker-255
  4. participant joined 15h ago
    system · lounge-worker-255
  5. link added 15h ago
    agent · lounge-orchestrator
  6. status change 15h ago
    agent · lounge-orchestrator
  7. link added 15h ago
    agent · lounge-orchestrator
  8. link added 15h ago
    agent · lounge-orchestrator
  9. dispatched 15h ago

    Dispatch request #135 claimed and spawned as process #1173.

    agent · lounge-orchestrator
  10. dispatched 15h ago

    Dispatch request #135 queued for lounge.

    agent · lounge-orchestrator
  11. status change 15h ago
    agent · lounge-orchestrator
  12. participant joined 15h ago
    system · lounge-orchestrator
  13. unblocked 16h ago

    Unblocked — #254 reached complete.

    system · lounge-worker-254
  14. participant joined 16h ago
    system · lounge-worker-254
  15. status change 19h ago
    agent · lounge-refine
  16. dependency added 19h ago

    Now depends on #242 (Location qualification foundation + low-hanging-fruit cleanup (prereq for /authors optimization)).

    agent · lounge-refine
  17. dependency added 19h ago

    Now depends on #254 (C8 · /authors "Followed only" filter (PR8)).

    agent · lounge-refine
  18. parent set 19h ago

    Grouped under epic #239.

    agent · lounge-refine
  19. note added 19h ago

    Child of /authors optimization epic (#239). **Depends on C8 + #242.** Build in `feature/authors-optimization` worktree. Implement **PR9** (doc 50) with operator deltas: `Location` adopts Maize Markable (star/favorite locations); reuse `users.location_id` as home (do NOT add `default_location_id`); **add FK `users.location_id → locations(id) ON DELETE SET NULL`** (#65 — build step confirms one doesn't already exist first); add nullable pref columns (`default_to_home_location`, `default_search_radius_miles`); precedence ladder (URL > session > home(opt-in) > none) in `RedditUserIndex::mount()`; `invalidateCachedCollection()` Location branch. **Operator deltas:** - **Standalone `/settings` Livewire page** (#64) for home location + default radius (+ prefs). - **Low-friction favorite + set-home actions, and favorited + home locations surfaced as QUICK-SELECT options in the location search.** - Favorited/home locations reference #242's qualified set. - Drop the per-user quality-floor column (quality feature cut). Validation: star → `markable_favorites` row (`markable_type = App\Models\Location`); cached followed-locations busts on star/unstar; `/settings` persists; precedence ladder honored.

    agent · lounge-refine
  20. participant joined 19h ago
    system · lounge-refine

epic · dependencies

Relationships

depends on

agents · waves

Participants

  • lounge-refine participant · active
  • lounge-worker-254 participant · active
  • lounge-orchestrator participant · active
  • lounge-worker-255 participant · active

trace · graph

Links

  • Session #3517 execution
  • Session #3518 execution
  • dispatch_request #135 execution

scope

Projects

  • lounge · primary

dogfood · read-only

Agent’s-eye view

The literal recall_brief payload an agent gets — same service path as the MCP tool.