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

C8 · /authors "Followed only" filter (PR8)

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.

#133 done fresh lounge · feature/authors-optimization
agent: claude claimed by lounge-orchestrator proc #1170
You are being dispatched from flower Brief #254: C8 · /authors "Followed only" filter (PR8)

Recall pointer:
- Use recall_brief with id 254 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 C1.** Build in `feature/authors-optimization` worktree.

Implement **PR8** (doc 40): auth-gated `followed_only` filter on `/authors` — `User::followedRedditUserIds()` from the warm 60-min cache, then `whereIntegerInRaw('id', $ids)` (filesort over tens of rows, no pivot index needed); new top-level **"Followed"** pill + empty-state; optional `markable_favorites (user_id, markable_type, markable_id)` covering index.

Note: the legacy `user_followed_reddit_users_{id}` cache-key rename is a **separate cleanup pass** (#66), NOT here.

Validation (Livewire): guest never sees the pill and `?followed_only=1` is ignored; signed-in sees only followed authors; follows-nobody → empty state; followed ∩ location intersects.
[3] parent_set lounge-refine: Grouped under epic #239.
[4] dependency_added lounge-refine: Now depends on #249 (C1 · /authors whereExists location rewrite (PR1)).
[5] status_change lounge-refine: (no body)
[6] participant_joined lounge-worker-249: (no body)
[7] unblocked lounge-worker-249: Unblocked — #249 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: #254` 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(254, ...); 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 16h ago
    agent · lounge-worker-254
  2. dispatched 16h ago

    Dispatch request #133 marked done.

    agent · lounge-worker-254
  3. note added 16h ago

    BUILD COMPLETE — PR8 "Followed only" filter on /authors, built to doc 40 in worktree feature/authors-optimization (isolated clone DB). Commits: - 2e31f303 — Add markable_favorites (user_id, markable_type, markable_id) covering index (C8/PR8). Migration 2026_07_05_000500, online ALGORITHM=INPLACE/LOCK=NONE, mirrors C2/C6 house style. Verified: migrate ran on the isolated clone (42ms), SHOW INDEX confirms col order user_id→markable_type→markable_id. Optional-but-recommended per doc §6; not load-bearing (hot path = warm cache). - 248833c7 — Add auth-gated "Followed only" filter to /authors (C8/PR8). Files (feature commit): - app/Models/User.php — new followedRedditUserIds(): array, plucks ids off cachedFollowedRedditUsersCollection() (warm 60-min cache, doc §3.1). Null-safe, no new cache key/invalidation. - app/Livewire/RedditUserIndex.php — public bool $followed_only + $queryString ('except'=>false) + updating() cursor-reset + resetFilters(). render(): server auth gate ($this->followed_only && $user instanceof User); resolves follow-id set and whereIntegerInRaw('id', $ids) (inverts drive off the 8.8M-row table, doc §2–§3.2); empty follow set → whereRaw('1=0'); disqualifies the C6 pivot-first path when followed_only so followed ∩ location runs the small id set with location as residual EXISTS (doc §5); passes followed_only_active (gated) + followed_count to the view. - resources/views/livewire/reddit-user-index.blade.php — @auth "Following" pill (violet + heart, Row 1, mirrors Verified) + tailored "not following anyone yet" empty-state CTA (doc §4/§7.2). Used doc §7.2's explicit "Following" label. - tests/Feature/Livewire/RedditUserIndexTest.php — 4 new tests: (a) guest pill hidden + ?followed_only=1 ignored, (b) signed-in sees only follows, (c) follows-nobody empty state, (d) followed ∩ location intersects. Verification: php artisan test --filter=RedditUserIndexTest → 9 passed (36 assertions); ./vendor/bin/pint → passed; php -l clean on all 4 files. (PHPStan could not run — pre-existing phpstan.neon ignoreErrors path to a deleted ProcessLegitEmbeddingResults.php halts it; unrelated to this PR, config untouched.) Scope note: implemented the followed-users toggle ONLY. Deliberately did NOT add the reserved favorite_locations_only property/queryString plumbing (doc §7.1 reserves it, but §8/§9 scope this PR to followed-users and say "do not implement that toggle from this doc" — it needs the Location-favorites model). Leaving that wiring to C9/#255 which owns it end-to-end avoids a dead URL param. Cache-key rename left to #66 as instructed.

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

    Dispatch request #133 claimed and spawned as process #1170.

    agent · lounge-orchestrator
  10. dispatched 16h ago

    Dispatch request #133 queued for lounge.

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

    Unblocked — #249 reached complete.

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

    Now depends on #249 (C1 · /authors whereExists location rewrite (PR1)).

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

    Grouped under epic #239.

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

    Child of /authors optimization epic (#239). **Depends on C1.** Build in `feature/authors-optimization` worktree. Implement **PR8** (doc 40): auth-gated `followed_only` filter on `/authors` — `User::followedRedditUserIds()` from the warm 60-min cache, then `whereIntegerInRaw('id', $ids)` (filesort over tens of rows, no pivot index needed); new top-level **"Followed"** pill + empty-state; optional `markable_favorites (user_id, markable_type, markable_id)` covering index. Note: the legacy `user_followed_reddit_users_{id}` cache-key rename is a **separate cleanup pass** (#66), NOT here. Validation (Livewire): guest never sees the pill and `?followed_only=1` is ignored; signed-in sees only followed authors; follows-nobody → empty state; followed ∩ location intersects.

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

epic · dependencies

Relationships

depends on

agents · waves

Participants

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

trace · graph

Links

  • Session #3518 execution
  • Session #3517 execution
  • dispatch_request #133 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.