Move proactive agent help from an interruptive floating prompt to the existing bottom agent entry. The dock should behave more like an attentive store assistant:
- observe likely struggle signals
- surface lightweight help from the dock first
- let the user opt into deeper assistance
- avoid repeated interruptions
Version 1 focuses on four changes:
- remove the current
idle 5s -> auto bubblebehavior - upgrade the bottom agent button into a stateful dock entry
- add a lightweight help panel before full chat
- trigger help from three first-pass struggle signals
Trigger when the user opens multiple token or market detail pages within a short window.
Dock behavior:
- state:
thinking -> nudging - message: "You have been comparing a few assets. I can help summarize the differences."
- primary action: open helper panel and continue into compare-focused chat
Trigger when the user stays on an article detail page long enough to imply active reading.
Dock behavior:
- state:
observing -> nudging - message: "This article has a lot of information. I can summarize the key points."
- primary action: open helper panel and continue into summary-focused chat
Trigger when the user repeatedly edits the trade form or hits quote/submit failures.
Dock behavior:
- state:
warning - message: "This step is easy to get wrong. I can help check the order details."
- primary action: open helper panel and continue into check-focused chat
The dock entry uses a small state machine:
idle: no active signalobserving: subtle halo, no message bubblethinking: stronger halo and a one-shot motion cuenudging: show bubble above the dock entryengaged: help panel or chat is opencooldown: the user dismissed or consumed a suggestion recently
Separate visual mood:
neutralwatchingthinkingreadywarning
The dock shows state through the button only:
- soft gradient halo
- small status badge / state glyph
- optional mood-specific motion
When confidence is higher, show a one-line bubble above the dock:
- no modal
- no auto-open chat
- one primary action through the dock
Clicking the dock opens a helper panel first, not generic chat.
Panel content:
- short explanation of what the agent noticed
- one specific suggested help action
- option to continue into free-form chat
If the user chooses to continue, open chat with a task-shaped prompt instead of a blank conversation.
Session-level rules for MVP:
- same
signal + entityonly once every 30 minutes - max two nudges per session
- if the user dismisses a nudge, enter cooldown for that signal/entity
- if the user opens the dock intentionally, suppress more nudges for 30 minutes
- warning-level nudges can bypass some weaker suppression
-
apps/web/src/hooks/useAgentIntervention.ts- gathers local signals
- computes dock state, mood, active nudge, cooldown
-
apps/web/src/utils/agentInterventionBus.ts- lightweight event bus for struggle signals from deep components
-
apps/web/src/components/AgentEntryButton.tsx- dock button UI
- halo, badge, bubble, click and dismiss behavior
-
apps/web/src/components/BottomTabBar.tsx- support dock state props
- support a dock-only mode for detail pages
-
apps/web/src/components/AgentAssistant.tsx- remove idle-triggered bubble logic
- add
panelmode beforechat - accept active nudge / preset task input
-
apps/web/src/App.tsx- wire page context into
useAgentIntervention - always render the dock entry
- show full tab bar on top-level pages, dock-only on detail pages
- wire page context into
-
apps/web/src/components/modals/TradeContent.tsx- publish first-pass trade struggle signals
-
apps/web/src/index.css- add dock state visuals and reduced-motion fallbacks
- no more automatic bottom-center prompt after idle
- the agent button can show observing / thinking / ready / warning states
- the agent button can display a one-line bubble
- article detail can trigger a summary nudge
- repeated token/market detail browsing can trigger a compare nudge
- trade failures or repeated form edits can trigger a check nudge
- clicking a nudge opens a helper panel first, then task-focused chat