From 3d2c68a1a112c999c55782091dc5bd91a13afcfd Mon Sep 17 00:00:00 2001 From: Nils Briggen Date: Tue, 9 Jun 2026 08:30:26 +0200 Subject: [PATCH] =?UTF-8?q?V2=20Phase=204:=20Signals=20engine=20=E2=80=94?= =?UTF-8?q?=20proactive,=20app-wide=20one-click=20assists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "buttons, not chatbot" core: the app recognizes a situation and offers the fix; the user never has to formulate a request. - src/lib/assistant/signals.ts: buildSignals() aggregates the existing advisor detectors with new kernel-aware ones — quest-complete (all objectives done → "Mark complete"), caster out-of-slots → "Short rest", concentrating-while- bloodied warning — deduped and severity-sorted. 6 unit tests. - extended SuggestAction with shortRest + completeQuest; one shared dispatcher (useSignalAction) used by both surfaces so behaviour can't drift. - SignalsBell: an ambient bell + popover in the top bar, visible from every screen, with a count badge, one-click actions, and per-signal/clear-all dismiss. AssistantPage refactored onto the same buildSignals + dispatcher. - the AI cards were already actionable (NpcGen → npcsRepo, EncounterTip → add to encounter, Assistant encounter builder → combat). Also fixed a pre-existing invalid-HTML bug: ConditionPicker rendered a SVG inside