Implements inline chat failure rendering in the ChatView with interactive reference affordances, proper attribution preservation in failure bubbles, and aligned error typing across the chat stream pipeline, with corresponding tests and documentation updates.
Fusion-Task-Id: FN-4054
Fixes the mobile switcher trigger sizing in ChatView by updating CSS dimensions and adjusting the component's conditional rendering logic, with corresponding test coverage added.
Fusion-Task-Id: FN-4077
Fusion-Task-Lineage: 966eafb9-35fd-4ac6-ab4a-42c0e96a2584
The merge implements optimistic room send with failure recovery in the ChatView and useChatRooms hook, including a reconciliation flow that handles send failures gracefully and documents the UX behavior. The dashboard guide and architecture docs are updated to reflect the new room messaging pattern.
Fusion-Task-Id: FN-4040
Added a mobile chat quick switcher accessible from the thread header, with styling for the session dropdown and test coverage. Documentation for the feature was added to MOBILE.md and the dashboard guide.
Fusion-Task-Id: FN-4042
Anchored mobile ChatView and QuickChat FAB to scroll to the latest message when opened, improving chat tail behavior on small screens; added documentation for this behavior. Also aligned scoped chat manager's pluginRunner typing and expanded test coverage for both components.
Fusion-Task-Id: FN-4040
Added a `/new` slash command alias across the chat interface, with interception in ChatView, support in the QuickChatFAB, corresponding tests, and documentation in the dashboard guide.
Fusion-Task-Id: FN-4017
Completes Step 1 of mobile touch-focus parity by aligning room input keyboard handlers in ChatView, with a regression test covering mobile room and direct composer touch-focus behavior.
Fusion-Task-Id: FN-4011
Completes the room composer clear-on-send behavior in `ChatView` with regression tests covering the reset flow, plus documentation updates for parity.
Fusion-Task-Id: FN-3928
This branch establishes test scaffolding for rooms functionality across core and dashboard, adding test plans, room-specific test files for ChatView, AgentMentionPopup, QuickChatFAB, and core chat routes/stores, while also updating AgentMentionPopup with enhanced room-aware behavior and QuickChatFAB
Fusion-Task-Id: FN-3812
Added an experimental Chat Rooms feature gated behind a settings toggle in the dashboard. The ChatView rooms UI is now conditionally rendered based on the experimental features setting, controlled via the SettingsModal. Included documentation updates and corresponding test coverage.
Fusion-Task-Id: FN-3906
Migrate the Fusion dashboard's vitest configuration to use the new `test.projects` API in the roadmap plugin, with plugin view registration updates and typecheck fixes in the dashboard components.
Fusion-Task-Id: FN-3898
This merge delivers chat rooms with room send routing and delete-room UI in the dashboard (FN-3899), including fixes for bundled plugin view imports and a release changeset. Supporting changes include a merger improvement that tightens scope-warning diff base when baseBranch is missing, companies.sh
Fusion-Task-Id: FN-3899
Merges FN-3884 chat scroll anchoring — ChatView now re-scrolls to the latest message when reopened or when activation transitions occur, with a bounded bottom-anchor helper preventing layout-shift overshoots. QuickChatFAB was updated to wire the new anchoring behavior, and both components gained com
Fusion-Task-Id: FN-3884
- Add useChatRooms hook with room lifecycle state and API integration
- Wire ChatView UI for room selection/creation and update room-focused tests
- Tokenize ChatView and TaskCard color usage to align with dashboard design tokens
- Update architecture docs and include FN-3879 changesets for published CLI package
Fusion-Task-Id: FN-3879
Added a `mentionMatching.ts` utility to normalize agent mention filtering across the codebase, fixing the handling of handles containing underscores. Updated `AgentMentionPopup`, `ChatView`, and `QuickChatFAB` to use the new utility, with corresponding tests added including a new `mentionMatching.te
Fusion-Task-Id: FN-3809
- Add self-healing recovery for stale in-review merging statuses when no active merger owns the task
- Skip merge re-enqueue for tasks already marked with transient merging statuses and add regression coverage
- Wire active merge task ID provider through project runtime for safer stale-status detection
- Use chat-sidebar-search-container in ChatView with matching CSS padding
- Normalize fusion-plugin-reports test script to use local vitest and add changeset for @runfusion/fusion patch
Fusion-Task-Id: FN-3829
Adds a rooms feature to the chat sidebar including a new CreateRoomModal for creating chat rooms, with mobile selection handling and search empty-state copy fixes. Also introduces listTasksModifiedSince plugin contract and report plugin scaffold, replacing the removed dashboard roadmap backend.
Fusion-Task-Id: FN-3806
This merge extracts the roadmap feature from the dashboard into a new reports plugin scaffold, adds universal web fetch to reviewer/merger/triage agents, and introduces /tasks deep-link routing. The massive file deletions are roadmap backend code and 2,100+ lines of associated tests being removed as
Fusion-Task-Id: FN-3805
Chat UX improvements land first: bottom-snap scrolling behavior is wired into both `ChatView` and `QuickChatFAB`, with comprehensive test coverage added for the components and their underlying hooks; stale-closure bugs in the `useChat` and `useQuickChat` queue-flush handlers are also patched. Roadna
Fusion-Task-Id: FN-3771
The merge delivers four distinct features: a copy-to-clipboard action on provider responses in the chat bubble (FN-3712, with styling and tests across ChatView), richer agent onboarding drafts documented and wired into the dashboard onboarding modal (FN-3555), assigned-agent triage inheritance so ag
Fusion-Task-Id: FN-3712
Previous textarea-only touchmove listener didn't catch swipes that
started elsewhere (header, composer padding) — those still panned the
iOS visualViewport over the locked document, sliding the composer up.
Replaces it with a document-level non-passive touchmove listener that
fires while keyboardOpen on mobile and preventDefaults all gestures
EXCEPT when the target is inside .chat-messages (the one container
where pan-y should still work). Stops both header-swipe and composer-
swipe from panning the page, while leaving messages-list scroll
intact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
React's onTouchMove handler is registered as a passive listener by
default, so the previous JSX-handler preventDefault() was silently a
no-op — drags on the composer still scrolled the input box up.
Attaches the listener imperatively via addEventListener with
{ passive: false } so preventDefault actually cancels the drag. Tap
(touchstart + touchend without touchmove between) is still unaffected,
so first-tap focus continues to work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restores plugin management features across the CLI and dashboard, including a new `plugin available/settings` commands and a refactored PluginManager component that groups built-in plugins (agent-browser, fusion) separately from custom ones, with updated documentation on the plugin authoring guide.
Fusion-Task-Id: FN-3575
touch-action: manipulation is needed on the textarea so iOS registers
first-tap focus reliably, but it also allows pan-y — which let the
user drag the input box up off-screen with the keyboard up.
Cancelling touchmove blocks the drag without affecting tap (a tap
fires touchstart + touchend with no touchmove in between), so the
composer stays locked AND first-tap focus works.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two fixes for residual mobile chat issues:
1) Textarea touch-action: none was preventing iOS from registering a
clean tap-to-focus, causing the keyboard to flash up via the
programmatic focus() in onTouchStart and then auto-dismiss because
iOS never saw the gesture complete. Switching to manipulation
allows tap while still blocking pan/zoom — the composer stays
anchored thanks to overscroll-behavior: contain on its container.
2) On switch-away-and-back the visualViewport metrics could get
stuck in a half-state (composer pushed up, or blank pane covering
it). Adding a visibilitychange / pageshow handler on ChatView that
force-blurs and re-focuses the active textarea makes iOS resync
the keyboard / vv metrics cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
iOS fires visualViewport scroll events at 60fps during a pan with the
keyboard up. Routing those through React state and into the .chat-thread
translateY(--vv-offset-top) transform amplified the pan into a visible
judder + ~300px shift + body background exposure.
useMobileKeyboard now uses two listeners: a full update (resize +
focusin/focusout) that re-snapshots all metrics including offsetTop, and
a scroll-only update that updates only height/keyboardOpen. offsetTop
is therefore frozen between keyboard open/close events — the transform
correctly compensates for iOS's initial visualViewport shift on focus
without following pan-time movement.
Restores the translateY anchor (so the thread isn't off-screen on
first focus) while keeping the swipe-jitter fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After dismissing and re-bringing up the mobile keyboard, iOS could
leave window.scrollY > 0 and visualViewport.offsetTop > 0. With
useMobileScrollLock then pinning body{position:fixed} relative to that
drifted scroll, the message thread anchored above the visible viewport
and a large blank area appeared below it.
handleInputFocus now resets window scroll to (0,0) on mobile in a
zero-delay timeout — late enough that iOS finishes its own
scroll-into-view first, but before useMobileScrollLock observes the
drifted state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two mobile chat regressions addressed together:
1) ChatView send button: preventDefault now fires on pointerdown for
touch pointers, before iOS blurs the textarea. The previous
onMouseDown.preventDefault was too late on iOS (mousedown is
synthesized after touchend, by which point the keyboard has
already started dismissing). Click still runs the action so quick
taps remain reliable.
2) ExecutorStatusBar: hidden on mobile while keyboard is open,
mirroring MobileNavBar. The bar is position:fixed against the
layout viewport, which iOS leaves anchored below the keyboard;
during a swipe/pan it would slide over the messages list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The imperative useLayoutEffect approach made mobile worse — first tap
flickered and didn't bring up the keyboard, while the original
swipe-overlap symptom remained. Restoring the previous React-state
flow until a better fix is identified. Removes the changeset that
shipped with the failed attempt.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The mobile composer/footer slid over the message list when the user
swiped with the keyboard up. Cause: --vv-height / --vv-offset-top were
routed through React state via useMobileKeyboard, so on iOS — which
fires visualViewport scroll/resize on the same frame as its keyboard
animation — the .chat-thread translation lagged by one paint, visible
as the composer momentarily floating over messages.
Now those two vars are written imperatively in a useLayoutEffect
directly to the .chat-thread DOM node on every visualViewport event,
mirroring the working pattern at QuickChatFAB.tsx:1032-1052 (which
already works correctly on mobile). Only --keyboard-overlap (a
structural open/close signal, not per-frame) still flows through
React state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-add preventDefault on mousedown so the textarea doesn't blur when
the user taps send — keyboard stays up, no viewport reflow jumping
the input to the top of the screen. The action still runs on click
(which fires reliably from the iOS touch sequence even for quick
taps), so this preserves the previous fix's quick-tap reliability.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The mobile send button used pointerdown + touchstart with preventDefault
and a focus-preservation dance to keep the keyboard up while sending.
That path silently failed on quick taps on iOS — only a long press
registered. Switching to plain onClick (with touch-action: manipulation
to skip the click delay) fires reliably on tap. The soft keyboard may
dismiss on send now, which is a minor regression vs. the previous
intent but vastly preferable to silent failure.
QuickChat is unchanged because it already works on mobile.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous fix introduced a regression: handledMobileSendRef /
handledMobileActionRef was set in onPointerDown/onTouchStart but only
cleared in onClick. preventDefault() on pointer/touch events suppresses
the synthesized click on iOS Safari, so the ref stayed true forever
after the first tap — every subsequent tap (quick OR long press) hit
the new dedupe guard and silently bailed.
Now both handlers schedule a 500ms setTimeout to self-clear the ref
alongside their action. That covers the full pointerdown/touchstart/
click burst from one tap while still letting the next user tap go
through.
Applied to: ChatView send button, QuickChat send button, QuickChat
stop button.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The ChatView and QuickChat send/stop buttons each had both an
onPointerDown and an onTouchStart handler invoking the action. On a
quick mobile tap both fire, so handleSend / handleSendMessage /
stopStreaming ran twice in rapid succession. The second invocation
closed the first's SSE stream (streamRef.current.close()), the server
treated that as a cancel via beginGeneration, and the chat ended with
no output — exactly matching the reported "tap silently fails, long
press works" symptom (long press happened to suppress one of the two
events).
Both handlers now early-return when the existing handledMobile*Ref
flag is already set, so only the first event for a given tap fires the
action. The send button additionally gets touch-action: manipulation
(removes the click delay that lets the textarea blur win the race) and
an expanded invisible hit area via ::before so slightly-off taps don't
land on the surrounding textarea and dismiss the keyboard without
sending.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The merge completes Step 2 of FN-3605 by refactoring the ChatView mobile header to preserve its visual identity while converting the toggle control to an inline layout, accompanied by corresponding tests.
Fusion-Task-Id: FN-3605
Merged FN-3602: Compact tool-call summaries in the ChatView with responsive mobile layout improvements, including new regression tests and documentation in the dashboard guide.
Fusion-Task-Id: FN-3602
This merge implements FN-3603, adding jump-to-latest controls for the chat view and improving mobile bubble width layout, with corresponding CSS updates in ChatView and QuickChatFAB components. It also includes documentation for the new mobile chat controls, a fix for workspace lint regex escaping,
Fusion-Task-Id: FN-3603
Backend
- chat.ts now routes both regular chat and QuickChat through
createResolvedAgentSession instead of branching to createFnAgent for
the no-runtime-hint case. This removes the divergent path where
pi-ai's cleanupSessionResources(sessionId) could tear down resources
the next generation depends on.
- sendMessage's finally only disposes the agent if it still owns the
activeGenerations slot. A newer generation that has pre-empted us
cleans up its own agent in its own finally — disposing here would
yank the underlying CLI process out from under it.
- __setCreateFnAgent test helper now mirrors its mock into the
createResolvedAgentSession slot so existing test setups still work
after the unification.
Frontend
- Extract createChatStreamHandlers (RAF coalescing, accumulators,
tool-call dedup, fallback handling) — useChat and useQuickChat were
duplicating ~85 LOC each. Both now compose the shared factory.
- Move shared chat types into chatTypes.ts. The hooks re-export them
for backward compatibility with existing consumers.
- Removed per-message Markdown/plain-text eye toggles. A single
thread-level toggle in the chat header now flips every assistant
bubble (including the streaming one) between rendered Markdown and
plain text.
- Model-only chats hide the per-message agent identity row entirely;
the model name is already in the thread header.
Tests
- Updated ChatView tests to reflect the new render-toggle contract
(single header toggle drives all bubbles) and the model-only avatar
suppression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
useMobileKeyboard now requires a focused input for keyboardOpen=true (both
the chrome-overlap and iOS-gap paths). The moment an input blurs, the hook
reports keyboardOpen=false instead of waiting hundreds of ms for iOS's
visualViewport dismissal animation to settle.
This makes App-level mobileKeyboardOpen flip false instantly on blur, so
MobileNavBar reappears and project-content regains nav-bar padding in the
same frame. The ChatView composer (and TodoModal/PlanningModeModal) snap
to their post-keyboard layout in one move instead of crawling down with
iOS's keyboard slide.
Replaces the per-component 450ms suppress hack in ChatView (also dropped
in this commit) which couldn't reach the parent layout's nav padding
state and produced "below tab bar then snap up" jitter.
Adds a regression test and updates four existing tests that assumed
"vv shrinks → keyboard up" without focus (focus is now required).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add useMobileScrollLock hook using position:fixed body lock (Bootstrap/
Headless UI/Stripe pattern) to prevent iOS Safari from shifting the
document and visualViewport when an input inside a fixed-position modal
is focused. Wire into 15 input-bearing modals plus ChatView, replacing
ChatView's inline body-overflow effect.
- Widen computeBuildVersion in vite.config.ts to hash the entire app/ tree
so the version-check poll actually notices rebuilds (FN-3333 follow-up;
previously only main.tsx and package.json were hashed).
- ChatView: on input blur, suppress keyboard-aware sizing for 450ms while
reserving mobile-nav-bar space, so the composer snaps to its final
height in one move instead of crawling down with iOS's keyboard slide
and then jumping again when the nav bar reappears.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>