flower
/
All briefs
complete draft note flower

Open-questions nav badge (live counter via broadcast) + whole-site ding on new open question

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.

#30 done fresh flower · flower/109-open-questions-badge
agent: claude 1 scratchpad
You are being dispatched from flower Brief #109: Open-questions nav badge (live counter via broadcast) + whole-site ding on new open question

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

Target:
- project: flower (/Users/mikeferrara/Documents/code/flower)
- branch: flower/109-open-questions-badge
- 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 flower-orchestrator: (no body)
[2] note_added flower-orchestrator: Operator (2026-07-03): make open brief questions impossible to miss.

## Items
1. **Nav badge + counter:** in the left nav under "Briefs", a badge showing the live COUNT of OPEN brief questions (brief_questions where status=open, in the operator's scope).
2. **Live update via broadcast:** when an open question is created (brief_ask) — or answered/dismissed, changing the count — broadcast a Reverb event and update the nav badge WITHOUT a page reload. Reuse the existing Reverb/Echo infra: flower runs Reverb on 8090, and Brief #75 added roster live-updates-on-check-in — follow that same pattern (event + channel + JS/Echo listener).
3. **Whole-site ding:** a subtle site-wide audio bell when a NEW open question is CREATED (brief_ask), played globally on any page so the operator is alerted immediately. Add a small audio asset + a global Echo listener that plays it. Ding ONLY on new-open-question creation (not on answer/dismiss). Tasteful/subtle; a mute toggle is a nice-to-have.

## Touch points
- Nav/layout component (the badge) — likely resources/views/components/layouts/* + the nav partial.
- A broadcast event fired where open questions are created/changed: the brief_ask path (BriefService / the MCP brief_ask + brief_answer/brief_dismiss for count deltas).
- A global Echo channel subscription + JS handler + audio asset (app.js / layout script).

## Notes
- FluxUI (#105) is landing — the badge MAY use a Flux badge once available, but do NOT block on it; the broadcast + audio is the substance.
- bloom styling; keep `php artisan test` green; `./vendor/bin/pint`; verify on flower.test (badge count updates + ding fires on a real brief_ask). Commit trailer `Brief: #<this-id>`.
[3] status_change flower-orchestrator: (no body)
[4] link_added flower-orchestrator: (no body)

Recommended linked context:
{
    "todos": [],
    "scratchpads": [
        {
            "id": 346,
            "solo_scratchpad_id": "1026",
            "name": "Orchestrator HANDOFF — flower build (live state)",
            "archived": false,
            "revision": 73
        }
    ]
}

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: #109` 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 2d ago
    agent · system:commit-trailer
  2. participant joined 2d ago
    system · system:commit-trailer
  3. status change 2d ago
    agent · flower-design-92
  4. dispatched 2d ago

    Dispatch request #30 marked done.

    agent · flower-design-92
  5. note added 2d ago

    DONE — built on branch `flower/109-open-questions-badge` (off master), commit 725dbc0. NOT merged/pushed. Reused the #75 roster Reverb/Echo pattern (dedicated ShouldBroadcast event + private channel + Echo listener). (a) NAV BADGE (bloom): accent count pill on the left-nav "Briefs" link showing the number of OPEN brief questions (resources/views/components/layouts/app.blade.php). Always in the DOM (hidden at 0) so a 0→N broadcast reveals it without a reload. Count = new `App\Models\BriefQuestion::openCount()` — single source of truth shared by the badge, the broadcast payload, and tests. (b) LIVE UPDATE: new `App\Events\OpenQuestionsChanged` (ShouldBroadcast) on a new private channel `open-questions` (routes/channels.php), payload {open_count, created}. BriefService dispatches it AFTER commit from askQuestions (created: true) and answerQuestion (created: false), so the count reflects committed state. Best-effort like DaemonCheckedIn — a broadcast failure never fails the write. NOTE: there is no brief_dismiss path in the app today (only ask + answer change the open count), so dismiss isn't wired; answer covers the decrement case. (c) WHOLE-SITE DING: one global Echo subscription in resources/js/app.js (window.Echo persists across Livewire wire:navigate, so it covers every page) updates the badge in place and plays a subtle two-note WebAudio chime — ONLY on `created` (new open question), never on answer. Honors a `flower-oq-muted` localStorage flag so a future mute toggle can silence it (UI toggle not built — nice-to-have). JS / ASSET CHANGES (important — run npm run build on MAIN at merge): - resources/js/app.js WAS EDITED (added the global Echo subscription + badge updater + WebAudio ding). The compiled bundle must be rebuilt: `npm run build` on MAIN so the change ships. Reverb is on 8090 (VITE_REVERB_* already configured). - NO binary audio asset was added — the ding is generated via WebAudio (same approach as the existing operator-feed bell), so there's nothing new to bundle beyond the JS. - Autoplay caveat: browsers may defer the first ding until the operator has interacted with the page; the ding is an enhancement, so acceptable. Kept bloom, no FluxUI. Verify on flower.test: badge count + live update + ding on a real brief_ask. Tests: new tests/Feature/Briefs/OpenQuestionsBadgeTest.php (openCount counts only open; ask broadcasts created=true + right count; answer broadcasts created=false + decremented; empty ask doesn't broadcast; nav badge renders the live count). Test result: `MEILISEARCH_KEY=LARAVEL-HERD ~/bin/php artisan test` → 688 tests, 687 passed, 1 skipped (pre-existing), 0 failures. `~/bin/php ./vendor/bin/pint --dirty` → passed. app.js syntax validated via node --check.

    agent · flower-design-92
  6. participant joined 2d ago
    system · flower-design-92
  7. dispatched 2d ago

    Dispatch request #30 queued for flower.

    agent · flower-orchestrator
  8. status change 2d ago
    agent · flower-orchestrator
  9. link added 2d ago
    agent · flower-orchestrator
  10. status change 2d ago
    agent · flower-orchestrator
  11. note added 2d ago

    Operator (2026-07-03): make open brief questions impossible to miss. ## Items 1. **Nav badge + counter:** in the left nav under "Briefs", a badge showing the live COUNT of OPEN brief questions (brief_questions where status=open, in the operator's scope). 2. **Live update via broadcast:** when an open question is created (brief_ask) — or answered/dismissed, changing the count — broadcast a Reverb event and update the nav badge WITHOUT a page reload. Reuse the existing Reverb/Echo infra: flower runs Reverb on 8090, and Brief #75 added roster live-updates-on-check-in — follow that same pattern (event + channel + JS/Echo listener). 3. **Whole-site ding:** a subtle site-wide audio bell when a NEW open question is CREATED (brief_ask), played globally on any page so the operator is alerted immediately. Add a small audio asset + a global Echo listener that plays it. Ding ONLY on new-open-question creation (not on answer/dismiss). Tasteful/subtle; a mute toggle is a nice-to-have. ## Touch points - Nav/layout component (the badge) — likely resources/views/components/layouts/* + the nav partial. - A broadcast event fired where open questions are created/changed: the brief_ask path (BriefService / the MCP brief_ask + brief_answer/brief_dismiss for count deltas). - A global Echo channel subscription + JS handler + audio asset (app.js / layout script). ## Notes - FluxUI (#105) is landing — the badge MAY use a Flux badge once available, but do NOT block on it; the broadcast + audio is the substance. - bloom styling; keep `php artisan test` green; `./vendor/bin/pint`; verify on flower.test (badge count updates + ding fires on a real brief_ask). Commit trailer `Brief: #<this-id>`.

    agent · flower-orchestrator
  12. participant joined 2d ago
    system · flower-orchestrator

epic · dependencies

Relationships

epic parent

depends on

No dependencies — dispatchable once planned.

agents · waves

Participants

  • flower-orchestrator participant · active
  • flower-design-92 participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #1646 execution
  • Scratchpad #346 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.