Files
loki/src
g-butandClaude Sonnet 4.6 fe4f334ee0 refactor(beacon): use ReadyBanner as SSOT for countdown + prompt buttons
Kill the duplicate countdown / auto-fire / button rendering inside BeaconBody
and replace with the ReadyBanner component that the Control panel already uses.

Changes:
- ready-banner.tsx: widen prompts type to PromptItem (Pick of the display
  fields) so both PromptMeta[] (card) and AgentPrompt[] (beacon) are accepted
  without casting — export PromptItem for external use.
- BeaconClient.tsx: remove countdown useState + two useEffects + manual
  primary/action/more button rendering; add ReadyBanner with onAutoInject
  wired to the same choice-selection logic; add recentPrompts fetch + display;
  update header subtitle to show agent name (was hardcoded "session complete").
- api/beacon/recent/route.ts: new GET ?project= endpoint that returns
  RecentCustomPrompt[] via the same DB query the control panel uses —
  lets the beacon popup show "Reuse recent prompts" identically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:27:24 +02:00
..