flower
/
All briefs
complete draft note flower

Search in the UI wishlist: - filter by document type (ie: briefs/feed

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.

#90 done fresh flower · flower/197-search-doctype-filter
agent: claude
You are being dispatched from flower Brief #197: Search in the UI wishlist:

- filter by document type (ie: briefs/feed

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

Target:
- project: flower (/Users/mikeferrara/Documents/code/flower)
- branch: flower/197-search-doctype-filter
- worktree: not specified
- kind: fresh

Current brief spec:
## Goal
Make flower's corpus searchable in the UI the way agents search it via MCP: (1) filter search by document/source type, and (2) full-text search within /briefs.

## Asks (operator, 2026-07-04)
1. **Filter search by document type** (briefs / feedback / scratchpad / session / commit / todo / doc). Motivating use case: "is there an active brief about the slow /projects & /sessions views?" — operator can't tell if it's addressed or in limbo.
2. **Search WITHIN briefs** on /briefs (like /sessions), not just filter.

## Backend already supports both — this is UI wiring
- Source-type filter: recall_search already accepts `sources` (chunkable_type); Meili `chunks` is filterable by `chunkable_type` (SPEC §8). Expose as a UI facet on the global search surface.
- /briefs search: recall_briefs already accepts a `query` (title/slug/spec/summary). /briefs currently exposes only status/project FILTERS — add a search input wired to that query path (mirror the /sessions search UX).

## Scope
- Global search UI: a document-type facet (multi-select of source types) mapping to the `sources`/`chunkable_type` filter; sensible default (all) + clear active-filter state.
- /briefs view: a debounced full-text search box (Livewire property → title/spec/summary query), composable with the existing status/project filters, persisted in the query string like the other /briefs filters.
- bloom design system; reuse existing filter/search patterns (`resources/views/components/ui/*`, the /sessions search).

## Out of scope
- Search RANKING/quality fixes → #194.
- New backend search capability (both already exist).

## Acceptance
- Global search can be restricted to one or more document types; results respect it.
- /briefs has working full-text search (title/spec/summary) composable with status/project filters; state persists across navigation.
- Livewire/feature tests for both; `php artisan test` green + pint. `Brief: #197` trailer.

## Provenance
Operator note (2026-07-04). Related: top-bar typeahead full-content search (todo #330), /briefs UX epic #87, recall search quality #194. Backend refs: RecallService (recall_search `sources`, recall_briefs `query`), Meili `chunks.chunkable_type` (SPEC §8).

Recent/key trace events:
[1] participant_joined operator:mike: (no body)
[2] note_added operator:mike: Search in the UI wishlist:

- filter by document type (ie: briefs/feedback/scratchpad/etc) - use case here is that I'm trying to find if I have a brief out/active right now about how slow the /projects and /sessions views load - I know I've said something a handful of times and just not sure if we've addressed it or it's in limbo somewhere
- ability to search _within_ briefs on the /briefs view, presumably how it works on /sessions - I can filter /briefs but not search them specifically.
[3] status_change operator:mike: (no body)
[4] participant_joined flower-refine: (no body)
[5] spec_snapshot flower-refine: Search in the UI wishlist:

- filter by document type (ie: briefs/feedback/scratchpad/etc) - use case here is that I'm trying to find if I have a brief out/active right now about how slow the /projects and /sessions views load - I know I've said something a handful of times and just not sure if we've addressed it or it's in limbo somewhere
- ability to search _within_ briefs on the /briefs view, presumably how it works on /sessions - I can filter /briefs but not search them specifically.
[6] refinement flower-refine: ## Goal
Make flower's corpus searchable in the UI the way agents search it via MCP: (1) filter search by document/source type, and (2) full-text search within /briefs.

## Asks (operator, 2026-07-04)
1. **Filter search by document type** (briefs / feedback / scratchpad / session / commit / todo / doc). Motivating use case: "is there an active brief about the slow /projects & /sessions views?" — operator can't tell if it's addressed or in limbo.
2. **Search WITHIN briefs** on /briefs (like /sessions), not just filter.

## Backend already supports both — this is UI wiring
- Source-type filter: recall_search already accepts `sources` (chunkable_type); Meili `chunks` is filterable by `chunkable_type` (SPEC §8). Expose as a UI facet on the global search surface.
- /briefs search: recall_briefs already accepts a `query` (title/slug/spec/summary). /briefs currently exposes only status/project FILTERS — add a search input wired to that query path (mirror the /sessions search UX).

## Scope
- Global search UI: a document-type facet (multi-select of source types) mapping to the `sources`/`chunkable_type` filter; sensible default (all) + clear active-filter state.
- /briefs view: a debounced full-text search box (Livewire property → title/spec/summary query), composable with the existing status/project filters, persisted in the query string like the other /briefs filters.
- bloom design system; reuse existing filter/search patterns (`resources/views/components/ui/*`, the /sessions search).

## Out of scope
- Search RANKING/quality fixes → #194.
- New backend search capability (both already exist).

## Acceptance
- Global search can be restricted to one or more document types; results respect it.
- /briefs has working full-text search (title/spec/summary) composable with status/project filters; state persists across navigation.
- Livewire/feature tests for both; `php artisan test` green + pint. `Brief: #197` trailer.

## Provenance
Operator note (2026-07-04). Related: top-bar typeahead full-content search (todo #330), /briefs UX epic #87, recall search quality #194. Backend refs: RecallService (recall_search `sources`, recall_briefs `query`), Meili `chunks.chunkable_type` (SPEC §8).
[7] status_change flower-refine: (no body)

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: #197` to every commit for this brief so flower can exact-link commits back to the brief.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. link added 1d ago
    agent · system:commit-trailer
  2. link added 1d ago
    agent · system:commit-trailer
  3. participant joined 1d ago
    system · system:commit-trailer
  4. merged 1d ago

    Merged to master by flower-orchestrator (daemon 29). Merge commit 409346c (worker commit e91dbae, branch flower/197-search-doctype-filter). Search console document-TYPE filter: Console.php exposes recall_search `sources` as #[Url]-persisted bloom pill-toggles, sanitized against known slugs (hand-edited URLs can't inject filters), SOURCE_LABELS for the 6 chunkable types; console.blade facet row matching the /briefs idiom; SearchConsoleTest +2 (scope-to-sources + unknown-slug guard + a drift-guard vs MeiliIndexManager::SOURCE_TYPES). Blade+PHP only (no asset rebuild). Full suite green on MAIN: 990 tests / 988 passed / 2 skipped / 0 failed. ⚠️ SCOPE: this covered Ask #1 (document-type filter) only; the worker intentionally omitted "feedback" (not a searchable/chunkable type) and did NOT touch Ask #2 (full-text search within /briefs) — that remains as a separate follow-up if the operator wants it.

    agent · flower-orchestrator
  5. status change 1d ago
    agent · flower-197-search-doctype-worker
  6. dispatched 1d ago

    Dispatch request #90 marked done.

    agent · flower-197-search-doctype-worker
  7. note added 1d ago

    Done: Ask #1 (global search document-type filter) on branch flower/197-search-doctype-filter. What changed (commit e91dbae): - app/Livewire/Search/Console.php — new `#[Url(as: 'types')] public array $sources` (query-string persisted), `toggleSource()`/`clearSources()` actions, `selectedSources()` sanitizes against known slugs so a hand-edited query string can't inject arbitrary filter values, wired into the existing `hybridSearch` filters (`sources` => …). Facet slugs live in a `SOURCE_LABELS` const kept in lockstep with MeiliIndexManager::SOURCE_TYPES. - resources/views/livewire/search/console.blade.php — a "type" facet row under the query (all + per-type bloom pill-toggles with aria-pressed state), matching the /briefs filter idiom. - tests/Feature/Search/SearchConsoleTest.php — 2 new tests: (a) facet scopes results to selected sources (session_segment vs brief docs; select brief → session drops out; clear → both return); (b) toggleSource ignores unknown slugs + a drift guard asserting SOURCE_LABELS keys == MeiliIndexManager::SOURCE_TYPES values. Source types exposed (6, the real Meili chunkable_type slugs): sessions, briefs, commits, docs, todos, scratchpads. NOTE: the spec/dispatch text mentioned "feedback" as a type, but feedback is NOT a chunkable/searchable type in the backend (not in MeiliIndexManager::SOURCE_TYPES / RecallService::SOURCE_MODELS), so it's intentionally omitted — exposing it would filter to zero results. Gates: `MEILISEARCH_KEY=LARAVEL-HERD ~/bin/php artisan test` green (971 passed, 2 pre-existing skipped, 0 failed); pint clean on changed PHP files. Assets: NO rebuild required — only a .blade.php + PHP changed; no resources/js or resources/css edits. The view reuses utility classes already present elsewhere (rounded-pill, border-accent/50, bg-accent/15, mono-label — all used in briefs/index.blade.php + console), so nothing new for Tailwind to compile. Scope: this dispatch (#90) covered Ask #1 only (global search doc-type filter). Ask #2 (full-text search within /briefs) is a separate concern in the brief and was NOT touched here.

    agent · flower-197-search-doctype-worker
  8. participant joined 1d ago
    system · flower-197-search-doctype-worker
  9. comment 1d ago

    Target branch flower/197-search-doctype-filter is merged to the default branch; suggest marking the brief complete.

    system · system:brief-autolink
  10. participant joined 1d ago
    system · system:brief-autolink
  11. dispatched 1d ago

    Dispatch request #90 queued for flower.

    agent · flower-orchestrator
  12. status change 1d ago
    agent · flower-orchestrator
  13. participant joined 1d ago
    system · flower-orchestrator
  14. status change 1d ago
    agent · flower-refine
  15. refinement 1d ago

    ## Goal Make flower's corpus searchable in the UI the way agents search it via MCP: (1) filter search by document/source type, and (2) full-text search within /briefs. ## Asks (operator, 2026-07-04) 1. **Filter search by document type** (briefs / feedback / scratchpad / session / commit / todo / doc). Motivating use case: "is there an active brief about the slow /projects & /sessions views?" — operator can't tell if it's addressed or in limbo. 2. **Search WITHIN briefs** on /briefs (like /sessions), not just filter. ## Backend already supports both — this is UI wiring - Source-type filter: recall_search already accepts `sources` (chunkable_type); Meili `chunks` is filterable by `chunkable_type` (SPEC §8). Expose as a UI facet on the global search surface. - /briefs search: recall_briefs already accepts a `query` (title/slug/spec/summary). /briefs currently exposes only status/project FILTERS — add a search input wired to that query path (mirror the /sessions search UX). ## Scope - Global search UI: a document-type facet (multi-select of source types) mapping to the `sources`/`chunkable_type` filter; sensible default (all) + clear active-filter state. - /briefs view: a debounced full-text search box (Livewire property → title/spec/summary query), composable with the existing status/project filters, persisted in the query string like the other /briefs filters. - bloom design system; reuse existing filter/search patterns (`resources/views/components/ui/*`, the /sessions search). ## Out of scope - Search RANKING/quality fixes → #194. - New backend search capability (both already exist). ## Acceptance - Global search can be restricted to one or more document types; results respect it. - /briefs has working full-text search (title/spec/summary) composable with status/project filters; state persists across navigation. - Livewire/feature tests for both; `php artisan test` green + pint. `Brief: #197` trailer. ## Provenance Operator note (2026-07-04). Related: top-bar typeahead full-content search (todo #330), /briefs UX epic #87, recall search quality #194. Backend refs: RecallService (recall_search `sources`, recall_briefs `query`), Meili `chunks.chunkable_type` (SPEC §8).

    agent · flower-refine
  16. spec snapshot 1d ago

    Search in the UI wishlist: - filter by document type (ie: briefs/feedback/scratchpad/etc) - use case here is that I'm trying to find if I have a brief out/active right now about how slow the /projects and /sessions views load - I know I've said something a handful of times and just not sure if we've addressed it or it's in limbo somewhere - ability to search _within_ briefs on the /briefs view, presumably how it works on /sessions - I can filter /briefs but not search them specifically.

    system · flower-refine
  17. participant joined 1d ago
    system · flower-refine
  18. status change 1d ago
    agent · operator:mike
  19. note added 1d ago

    Search in the UI wishlist: - filter by document type (ie: briefs/feedback/scratchpad/etc) - use case here is that I'm trying to find if I have a brief out/active right now about how slow the /projects and /sessions views load - I know I've said something a handful of times and just not sure if we've addressed it or it's in limbo somewhere - ability to search _within_ briefs on the /briefs view, presumably how it works on /sessions - I can filter /briefs but not search them specifically.

    operator · operator:mike
  20. participant joined 1d ago
    system · operator:mike

epic · dependencies

Relationships

epic parent

depends on

No dependencies — dispatchable once planned.

agents · waves

Participants

  • operator:mike participant · active
  • flower-refine participant · active
  • flower-orchestrator participant · active
  • system:brief-autolink participant · active
  • flower-197-search-doctype-worker participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #3992 execution
  • Commit #3993 execution

scope

Projects

  • flower · primary

dogfood · read-only

Agent’s-eye view

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