flower
/
All briefs
planned draft note flower
epic · Operator-initiated non-resolving "Discuss/Clarify" d...

#229 PR-2 — Operator Discuss UI: x-decisions.thread + composer + turn-aware lamp + card trigger

Dispatch

canonical · plan

Spec

markdown

hand-off · dispatch

Dispatch

Auto-dispatch

when it reaches planned

Design-loop

design pass before build

Direct dispatch — no refine required. The packet tells the agent to ask questions only if the request is blocked by ambiguity.

kind

No dispatch requests yet — dispatch above to generate a copy-paste packet.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. unblocked 14h ago

    Unblocked — #258 reached complete.

    system · flower-258-discuss-spine
  2. participant joined 14h ago
    system · flower-258-discuss-spine
  3. status change 19h ago
    agent · flower-229-design
  4. dependency added 19h ago

    Now depends on #258 (#229 PR-1 — Discuss/Clarify spine: decision_messages + discuss() + decision_discuss MCP + pull union).

    agent · flower-229-design
  5. parent set 19h ago

    Grouped under epic #229.

    agent · flower-229-design
  6. note added 19h ago

    ## PR-2 — Operator Discuss UI (child of #229; decisions epic #95) Design: `docs/design/229-discuss-clarify-decision.md` §UI. **Deps: #258 (PR-1 spine).** Target ≤~300 lines, `php artisan test` green, pint clean. The operator-facing half: post a clarification, read the thread, see whose turn it is — all in the #216 detail surface, never touching the frozen answer path. ### Build - **New sibling concern `app/Livewire/Decisions/Concerns/DiscussesDecisions.php`** (mirror `BriefsDecisionsWithAi`, NEVER edit `AnswersDecisions`): state `$discussion[$id]` (open bool) + `$discussBody[$id]`; action `sendDiscussion(int $id, DecisionService $svc)` → guard-open re-fetch → `$svc->discuss($d, $body, 'operator:mike', 'operator')` → clear the body. **`wire:target="sendDiscussion($id)"`-scoped loading only** (single-Livewire-component hazard — never bare `wire:loading`, or `wire:poll.30s` flips every card). Use the concern in `Decisions\Index` + `Decisions\Show`. - **`resources/views/components/decisions/thread.blade.php`** — lift the briefs Trace rail (`livewire/briefs/show.blade.php:526-568`, `<ol relative … before:absolute before:left-[7px] … before:bg-border>`): render `decision->messages` turns, operator vs daemon distinguished by `author_kind` (daemon turn wears the `parent-quote` amber left-rule idiom `border-l-2 border-accent/50 bg-accent/[0.05]`), `mono-label` author/role line + `diffForHumans` + `whitespace-pre-wrap` body. Composer: `<form wire:submit="sendDiscussion(id)">` with a raw bloom textarea (`rounded-field border border-border bg-sunken px-3 py-2 text-sm text-fg focus:border-accent/60`) + accent submit; placeholder "Ask a clarifying question or add context before deciding…". Soft-cap nudge banner reading `config('flower.decisions.discussion.soft_round_cap', 6)`. - **Place the thread** in `x-decisions.detail` (`detail.blade.php`) between the answer region (:80-107) and the linked-context web (:124) — surfaces in BOTH the #216 flyout and the `/decisions/{decision}` page (both render `x-decisions.detail`). The real answer affordance stays directly above it. - **`card.blade.php` actions row (:73-87):** add a quiet **"Discuss · N"** trigger (same `mono-label text-fg-faint hover:text-accent` tier as View more/Brief me) that opens the existing `flux:modal.trigger name="decision-{id}"`; N = message count (omit at 0); a "your turn" attention when `awaiting_turn='operator'`. - **Turn-aware lamp overlay** in `card`/`detail` over `awaiting_turn` (reuse existing tokens): operator turn → amber `--idle` + "your turn" glyph; daemon turn → calmer `--live` "awaiting <role>" — **BUT a blocking call keeps `--danger` + 🛑 regardless of turn** (never de-escalate a blocker). - **Live update:** one `getListeners()` line for `DecisionDiscussed` on the `decisions` channel (mirror Index.php:49-54) + `wire:poll.30s` fallback. ### Tests composer posts via `DecisionService::discuss`; the thread renders operator + daemon turns; the resolve affordance is still present in the detail; **`affordance.blade.php` + `AnswersDecisions.php` show NO diff** (the #216 frozen-affordance rule — review gate); the lamp reflects the turn (and a blocking call stays red mid-discussion); loading is `wire:target`-scoped.

    agent · flower-229-design
  7. participant joined 19h ago
    system · flower-229-design

epic · dependencies

Relationships

depends on

agents · waves

Participants

  • flower-229-design participant · active
  • flower-258-discuss-spine participant · active

trace · graph

Links

No links yet — they accrue as agents work the brief.

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.