Commit Graph

24 Commits

Author SHA1 Message Date
gsxdsm
f55b051163 test(dashboard): clear localStorage in MailboxModal beforeEach
The skeleton-loading test failed because earlier tests in the file
populated the SWR cache, so MailboxModal hydrated inbox from
localStorage and skipped the loading skeleton. Reset localStorage in
beforeEach so each test starts with a clean cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:57:10 -07:00
Fusion
fa189e02b3 feat(FN-4109): add aggregate all-agents view to mailbox modal
Adds aggregate mailbox functionality to the MailboxModal, including the plumbing for aggregating participants across all agents, an "all agents" view mode, and corresponding tests. The feature is documented with participant aggregation logic.

Fusion-Task-Id: FN-4109

Fusion-Task-Lineage: 122b19cd-2b14-4f50-836b-e524d3b96a9c
2026-05-12 17:04:33 -07:00
Fusion
2d3af5b6ce fix(FN-3886): resolve peer agent names in mail and notifications
- Resolve participant display names in AgentDetailView mail tab for peer agents
- Update MailboxModal labeling to use readable agent names instead of raw IDs
- Propagate resolved agent names through notification service, notifier, and provider payloads
- Add and update dashboard/engine tests plus a changeset for @runfusion/fusion

Fusion-Task-Id: FN-3886
2026-05-09 14:58:56 -07:00
Fusion
fdf387b220 feat(FN-3800): add session switcher to chat header and mobile switcher
This merge delivers five features: a session switcher for the chat header with mobile-aware dropdown styling and proper ARIA state, mailbox notification events with deep-link highlighting to the unread task, a fix for org chart connector endpoints in wide subtrees, a correction to merge finalize so

Fusion-Task-Id: FN-3800
2026-05-08 22:25:47 -07:00
Fusion
0c87f4278f feat(FN-3750): stabilize mailbox mobile keyboard and wake handling
- Wire mobile keyboard viewport signals into mailbox view and modal containers for anchored mobile layout
- Keep reply composer focused and visible while keyboard is open, with updated component styles and regression tests
- Make messaging wake dispatch fire-and-forget to avoid request hangs and expand route tests for async behavior
- Add desktop vitest workspace aliases for @fusion/* imports and include FN-3750/FN-3751 changesets

Fusion-Task-Id: FN-3750
2026-05-08 11:26:49 -07:00
Fusion
460b51f877 feat(FN-3720): expand mailbox messages to open detail pane and show reply c
The merge adds two Mailbox UX improvements: messages in the Mail tab now open the task detail pane (FN-3719), and reply context rows in the mailbox modal are expanded for better readability (FN-3720), with corresponding CSS and test coverage for both AgentDetailView and MailboxModal.

Fusion-Task-Id: FN-3720
2026-05-07 23:21:05 -07:00
Fusion
fb7d9b116b feat(FN-3617): align mailbox modal css with design tokens
Updated MailboxModal CSS to use design tokens instead of hardcoded values, and adjusted the co-located test to match.

Fusion-Task-Id: FN-3617
2026-05-06 16:14:29 -07:00
gsxdsm
a113e95c35 chore(test-isolation): tolerate live fusion app noise on shared HOME
Local `pnpm test:isolated` was failing because a concurrently-running
fusion app continually mutates `~/.fusion` (databases, agent sessions,
memory, automations, plugins, logs). Filter those runtime-owned paths
from the protected-dir signature, widen the baseline-stability sampling
window, and re-sample on suspected violations so transient app activity
doesn't masquerade as test pollution.

Tests still cannot legitimately write into these paths — they're skipped
because the *running app* is expected to.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 10:39:54 -07:00
gsxdsm
c2f3d92b5c fix(dashboard): don't mark agent inbox messages read when user views them
When the dashboard user browses another agent's mailbox (e.g. the CEO's
inbox), opening a message no longer triggers POST /messages/:id/read.
The previous behavior silently consumed the agent's unread state, so the
agent's heartbeat never surfaced the message and fn_read_messages (which
defaults to unread_only=true) returned nothing. Auto-mark-read now only
fires on the dashboard user's own inbox tab. Adds regression tests in
MailboxView.test.tsx and MailboxModal.test.tsx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 08:01:30 -07:00
Fusion
4a819cf961 fix(FN-2711): keep dashboard timing stats live 2026-04-28 19:20:10 -07:00
Fusion
ed2df90df6 feat(FN-2615): merge fusion/fn-2615 (auto-resolved)
- fix(FN-2615): restore workspace lint and test stability
2026-04-26 15:16:22 -07:00
Fusion
98e06adb11 fix(FN-2551): normalize mailbox mobile header control sizing
- Consolidate mobile mailbox header-actions rules for modal and view layouts with tokenized spacing
- Enforce 36px minimum height/width for action buttons and icon controls on mobile
- Normalize modal close control mobile padding and radius for consistent alignment
- Add CSS contract assertions in MailboxModal and MailboxView tests for spacing and control dimensions
2026-04-25 15:37:02 -07:00
gsxdsm
c3d1716fdd refactor(dashboard): split monolithic styles.css into per-component files
Split app/styles.css from ~40k lines down to ~4.5k. Created 56 co-located
component CSS files in app/components/, each imported by its owning .tsx.
The remainder of styles.css holds genuinely global rules (design tokens,
.btn/.card/.modal/.form-input primitives, cross-component @media overrides).

- Lazy-load 13 heavy views (AgentsView, RoadmapsView, NodesView, etc.) via
  React.lazy + Suspense; prefetch all chunks on idle so first navigation is
  instant. Initial JS bundle: 1.58 MB → 1.16 MB (-26%). Initial CSS bundle:
  635 kB → 471 kB (-26%); the rest splits into 13 per-view chunks.

- Add app/test/cssFixture.ts exposing loadAllAppCss() + loadAllAppCssBaseOnly()
  so CSS regression tests load the full per-component bundle (mirroring Vite
  source order). Migrate 30+ tests off direct readFileSync('../styles.css').

- Enable test.css: { include: [/.+/] } in vitest.config.ts so component CSS
  imports actually inject styles in jsdom (fixes getComputedStyle assertions).

- Add ESLint rule (no-restricted-syntax) banning direct styles.css reads in
  dashboard test files; points at loadAllAppCss() instead.

- Restore lost utility classes (.text-muted, .text-secondary, .text-dim,
  .form-input) and rescue dropped chat tool-call rules into QuickChatFAB.css.

- Mobile fixes along the way: scroll containment for view containers
  (min-height:0 + -webkit-overflow-scrolling), QuickChatFAB full-screen on
  mobile (with safe-area-inset for iOS home bar), AgentsView single-row
  header layout, ActivityLogModal close button on right, model-combobox
  z-index above the mobile quick-chat panel.

- Bug fix: SkillsView toggle was display:none which hid the input from the
  accessibility tree; replaced with the visually-hidden pattern so screen
  readers + getByRole still find the checkbox.

- Bug fix: standalone Delete button in TaskDetailModal for triage-column
  tasks (Actions dropdown is hidden in triage state, so previously no way
  to delete a freshly-created task without status change first).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 19:39:20 -07:00
Fusion
68f59169fa feat(FN-2334): align mailbox tab controls with shared button styles
- Apply shared btn btn-sm btn-secondary classes to mailbox tabs and agent subtabs in MailboxModal and MailboxView
- Update mailbox tab/subtab CSS to use bordered surface button defaults with active-state border, background, and focus-ring styling
- Add component tests asserting mailbox tab, subtab, and action controls keep shared button class contracts
- Add CSS regression checks to prevent reintroducing border:none/background:none square-edge tab styles
2026-04-24 11:58:34 -07:00
Fusion
534be73bde fix: prevent nested .fusion/.fusion dir from PluginStore path bug
PluginStore's constructor treats its rootDir arg as a project root and
internally appends `.fusion` before opening the SQLite DB. Several CLI
call sites were passing the already-resolved `.fusion` directory,
producing a doubled `.fusion/.fusion/fusion.db` that the dashboard
process kept recreating on every project load.

Pass the project root instead so the DB lands in the canonical
`.fusion/fusion.db` alongside the rest of the project's state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:33 -07:00
Fusion
a196d3b1b7 feat(FN-2294): merge fusion/fn-2294 2026-04-23 08:09:54 -07:00
Fusion
d7c165715e feat(FN-1957): add inbox/outbox sub-tabs to agent mailbox views
- Split agent mailbox responses into inbox and outbox arrays while keeping messages as an inbox alias
- Add Inbox/Outbox sub-tabs in MailboxView and MailboxModal with unread badge and agent-switch reset behavior
- Render tab-specific empty states and sent-message metadata in the outbox list
- Add dashboard styles and mobile overrides for agent mailbox sub-tabs
- Expand MailboxModal and MailboxView tests to cover sub-tab visibility, switching, reset, and unread badge behavior
2026-04-18 09:30:03 -07:00
gsxdsm
e6d003bdf1 feat(FN-1956): merge fusion/fn-1956 2026-04-17 15:24:37 -07:00
gsxdsm
9d83ed7efd feat(FN-1652): add compose action from Agents tab with deterministic state behavior
- Add compose button to Agents tab for composing messages to agents
- Compose pre-fills recipient when agent is selected, shows dropdown otherwise
- After send, user stays on Agents tab and selected agent is preserved
- Add 4 regression tests for new compose contract
- Add CSS for mailbox-agents-header layout
2026-04-12 16:34:56 -07:00
gsxdsm
351bccb211 feat(FN-1357): replace hardcoded colors with semantic CSS tokens
- Add semantic CSS custom property tokens to :root for theme-aware colors
- Replace hardcoded colors in MailboxModal with semantic tokens
- Replace hardcoded colors in mission components with semantic tokens
- Replace hardcoded colors in terminal and model combobox with semantic tokens
- Add light theme overrides for new semantic tokens
- Add MailboxModal CSS regression tests for theme awareness
- Document semantic token naming convention in memory
2026-04-09 16:29:51 -07:00
gsxdsm
182e30d5e9 fix(FN-1136): tighten dashboard mobile header and mailbox layouts
- Move the overflow planning badge into a dedicated icon wrapper to prevent text overlap on mobile
- Add Header test coverage for active planning sessions in the mobile overflow menu
- Scope mailbox mobile CSS rules to .mailbox-modal to avoid global style bleed
- Refine mobile mailbox spacing, tab sizing, and minimum agent panel height for better small-screen usability
2026-04-08 04:59:00 -07:00
gsxdsm
6659185fac fix(FN-1082): harden mailbox modal mobile layout
- Add flex-column base layout for .mailbox-modal and make .mailbox-content grow/scroll correctly
- Introduce a dedicated <=768px mailbox mobile CSS section for header, tabs, detail view, and FAB spacing
- Add MailboxModal regression tests that assert required CSS rules and detail-view structural hooks
- Increase batch GitHub issue import route test timeout to 30s for slower retry paths in CI
2026-04-07 18:46:22 -07:00
gsxdsm
4a239c0034 feat(FN-1064): replace agent sidebar with dropdown select in MailboxModal
- Replace agent sidebar layout with a compact dropdown select component
- Refactor MailboxModal.tsx to use dropdown instead of sidebar navigation
- Remove unused sidebar CSS styles and add dropdown-specific styles
- Update tests to cover dropdown behavior and interaction patterns
2026-04-07 13:37:56 -07:00
gsxdsm
7cc4ee5ebb feat(FN-989): add inter-agent messaging system with mailbox UI and CLI commands
- Add Message types (Message, MessageThread, MessageRecipient) and exports to @fusion/core
- Create MessageStore with full CRUD: send, read, delete, inbox, threads, and search
- Add messages table migration (schema v12) with SQLite full-text search support
- Add REST API routes for messaging (CRUD, search, broadcast, unread count)
- Add frontend API client functions for all messaging endpoints
- Build MailboxModal and MessageComposer dashboard components with header integration
- Add CLI message commands (inbox, send, read, delete) with rich output formatting
- Add comprehensive test coverage for MessageStore, CLI commands, and UI components
- Update documentation (CLI STANDALONE.md, dashboard README) with messaging usage
2026-04-07 11:21:59 -07:00