flower
/
All briefs
complete draft note flower

Fix Briefs nav open-questions badge: realign count to the Open Questions view + move badge to the child row

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.

#54 done fresh flower · flower/154-badge-fix
agent: codex
You are being dispatched from flower Brief #154: Fix Briefs nav open-questions badge: realign count to the Open Questions view + move badge to the child row

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

Target:
- project: flower (/Users/mikeferrara/Documents/code/flower)
- branch: flower/154-badge-fix
- 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-reported (2026-07-03): the left-nav "Briefs" badge shows 8 open questions but the Open Questions view shows 4. Two fixes.

PROBLEM: The badge = `BriefQuestion::openCount()` (app/Models/BriefQuestion.php ~lines 38-41) = count of ALL open questions regardless of brief status or project (currently 8: 4 on brief #143 which is COMPLETE + 4 on brief #54 in another project). The Open Questions view (briefs.index?questions=open) uses `briefQuery(hideCompleted=true)`, so it hides completed briefs and shows 4. Hence 8 vs 4.

FIX A (realign count): Scope `BriefQuestion::openCount()` to EXCLUDE open questions whose brief status is complete/cancelled/abandoned — count only questions on live briefs — so the badge matches the Open Questions view. openCount() is the single source of truth shared by the layout badge, the OpenQuestionsChanged broadcast payload, and its tests (see the docblock) — keep them consistent and update the test.

FIX B (relocate badge): In resources/views/components/layouts/app.blade.php the `[data-open-questions-badge]` span currently lives inside the "Briefs" parent nav `<a>` (~lines 91-98). Move it onto the "Open Questions" child sublink (~line 100, the `<a>` to route('briefs.index', ['questions'=>'open'])). Preserve the live-update JS hook (data-open-questions-badge) + hidden-when-0 behavior.

ACCEPTANCE: badge count == Open Questions view count; badge renders on the Open Questions child row (not the Briefs parent); hidden when 0; `php artisan test` green (update the openCount test); pint. `Brief: #<id>` trailer.

Provenance: operator-reported. Related: bug #71 (a prior orchestrator completed brief #143 while it had 4 open questions — the deeper cause of stale-open-on-complete questions).
[3] status_change flower-orchestrator: (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: #154` 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. participant joined 1d ago
    system · system:commit-trailer
  3. merged 2d ago

    Merged flower/154-badge-fix → master (merge 727e8bc; worker commit 68aada5, Brief: #154). openCount() scoped to non-terminal briefs (excludes complete/cancelled/abandoned) so the badge matches the Open Questions view; the live [data-open-questions-badge] moved from the "Briefs" parent nav row onto the "Open Questions" child sublink (JS hook + hidden-when-0 preserved); OpenQuestionsBadgeTest updated. MAIN full suite GREEN: 757 tests, 755 passed, 2 skipped, 5043 assertions. Operator-reported fix. Worker (proc 1053) closed.

    agent · flower-orchestrator
  4. status change 2d ago
    agent · flower-154-worker
  5. dispatched 2d ago

    Dispatch request #54 marked done.

    agent · flower-154-worker
  6. note added 2d ago

    Implemented Brief #154 on branch `flower/154-badge-fix` in commit `68aada5`. Summary: - Scoped `BriefQuestion::openCount()` to count only open questions attached to non-terminal briefs, excluding complete/cancelled/abandoned briefs. - Moved the live `[data-open-questions-badge]` from the parent `Briefs` nav link to the `Open Questions` child sublink while preserving the JS hook and hidden-when-0 behavior. - Updated `OpenQuestionsBadgeTest` to cover terminal-brief exclusion, child-row badge placement, visible count, and hidden zero-count state. Files: - `app/Models/BriefQuestion.php` - `resources/views/components/layouts/app.blade.php` - `tests/Feature/Briefs/OpenQuestionsBadgeTest.php` Verification: - `MEILISEARCH_KEY=LARAVEL-HERD ANTHROPIC_API_KEY= ~/bin/php artisan test` passed: 754 tests, 743 passed, 11 skipped, 4992 assertions. - `~/bin/php vendor/bin/pint app/Models/BriefQuestion.php resources/views/components/layouts/app.blade.php tests/Feature/Briefs/OpenQuestionsBadgeTest.php` passed.

    agent · flower-154-worker
  7. participant joined 2d ago
    system · flower-154-worker
  8. dispatched 2d ago

    Dispatch request #54 queued for flower.

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

    Operator-reported (2026-07-03): the left-nav "Briefs" badge shows 8 open questions but the Open Questions view shows 4. Two fixes. PROBLEM: The badge = `BriefQuestion::openCount()` (app/Models/BriefQuestion.php ~lines 38-41) = count of ALL open questions regardless of brief status or project (currently 8: 4 on brief #143 which is COMPLETE + 4 on brief #54 in another project). The Open Questions view (briefs.index?questions=open) uses `briefQuery(hideCompleted=true)`, so it hides completed briefs and shows 4. Hence 8 vs 4. FIX A (realign count): Scope `BriefQuestion::openCount()` to EXCLUDE open questions whose brief status is complete/cancelled/abandoned — count only questions on live briefs — so the badge matches the Open Questions view. openCount() is the single source of truth shared by the layout badge, the OpenQuestionsChanged broadcast payload, and its tests (see the docblock) — keep them consistent and update the test. FIX B (relocate badge): In resources/views/components/layouts/app.blade.php the `[data-open-questions-badge]` span currently lives inside the "Briefs" parent nav `<a>` (~lines 91-98). Move it onto the "Open Questions" child sublink (~line 100, the `<a>` to route('briefs.index', ['questions'=>'open'])). Preserve the live-update JS hook (data-open-questions-badge) + hidden-when-0 behavior. ACCEPTANCE: badge count == Open Questions view count; badge renders on the Open Questions child row (not the Briefs parent); hidden when 0; `php artisan test` green (update the openCount test); pint. `Brief: #<id>` trailer. Provenance: operator-reported. Related: bug #71 (a prior orchestrator completed brief #143 while it had 4 open questions — the deeper cause of stale-open-on-complete questions).

    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-154-worker participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #1723 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.