Commit Graph

16 Commits

Author SHA1 Message Date
gsxdsm
f9043d733e fix(dashboard): polish workflow and chrome defaults 2026-06-22 19:48:50 -07:00
gsxdsm
aa74f96234 fix(dashboard): make workflow and memory headers breathe 2026-06-22 12:07:20 -07:00
gsxdsm
95f48f9aae feat(dashboard): canonical ViewHeader across left-sidebar views (consistent color/sizing/divider/buttons)
ViewHeader.css defaults now carry the canonical header: space-lg/space-xl padding, surface bg, 1px border-bottom, icon var(--todo), title 1.125rem/600, actions pinned right (margin-left:auto). Removed now-redundant per-view overrides (Agents, Documents doubled divider); converted Secrets from a bespoke header to ViewHeader (Lock icon + Refresh/Add as btn btn-sm); aligned Command Center title metrics. Right-dock/pop-out Secrets hide-selectors retargeted so the dock is unchanged. Chat/Todo (no view title row) and AgentDetail (per-entity header) intentionally left bespoke.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 11:36:20 -07:00
gsxdsm
533d10095d feat(dashboard): finish ViewHeader rollout + normalize content padding
- Migrate Insights, Dev Server, Todos, Pull Requests to the shared ViewHeader.
- Fix doubled top padding (ViewHeader already pads top) across Documents/Agents/Mailbox/Missions content areas.
- Nudge embedded-view headers to the shared spec (CommandCenter icon 20; WorkflowNodeEditor icon+1.125rem title+space-lg; Settings embedded icon). ChatView intentionally headerless.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 03:34:16 -07:00
gsxdsm
0f98cf941f feat(dashboard): consistent ViewHeader on Artifacts/Research/Evals/Goals/Memory
Normalize these main-content views onto the shared ViewHeader (icon + CC-style title; existing header controls moved into the actions slot). Tests updated for the new header markup (95 pass).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 03:34:16 -07:00
gsxdsm
7f9849d6ed FN-6908: add expandable artifact media previews
Adds a polished media gallery experience for image and video artifacts in Documents.

- Make image and video artifact cards open an accessible lightbox with keyboard, backdrop, and close-button dismissal.
- Style expandable previews, hover affordances, and responsive full-size media presentation.
- Cover the media lightbox behavior in DocumentsView tests and document the dashboard gallery behavior.
- Add localized labels for expanding and closing artifact previews.

Files changed:
 docs/dashboard-guide.md                            |   4 +-
 .../dashboard/app/components/DocumentsView.css     | 156 +++++++++++++++++++--
 .../dashboard/app/components/DocumentsView.tsx     | 121 +++++++++++++++-
 .../components/__tests__/DocumentsView.test.tsx    |  46 +++++-
 packages/i18n/locales/en/app.json                  |   6 +-
 packages/i18n/locales/es/app.json                  |   6 +-
 packages/i18n/locales/fr/app.json                  |   6 +-
 packages/i18n/locales/ko/app.json                  |   6 +-
 packages/i18n/locales/zh-CN/app.json               |   6 +-
 packages/i18n/locales/zh-TW/app.json               |   6 +-
 10 files changed, 338 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-6908

Fusion-Task-Lineage: cf4d7d83-f58f-4686-ade9-b8b260bf400d
2026-06-22 03:34:15 -07:00
gsxdsm
ef4889585f FN-6779: add artifacts gallery to Documents
Adds a Documents-view artifact gallery backed by dashboard artifact registry APIs.

- Add artifact listing and media-serving endpoints with project scoping, validation, and safe artifact path resolution.
- Add client artifact API helpers, SWR caching, and a useArtifacts hook for background-refresh gallery data.
- Extend Documents view with an Artifacts tab, media previews, localized labels, documentation, tests, and a published package changeset.

Files changed:
 .changeset/fn-6779-artifacts-gallery.md            |   5 +
 docs/dashboard-guide.md                            |   6 +-
 packages/dashboard/app/api/legacy.ts               |  34 ++++
 .../dashboard/app/components/DocumentsView.css     | 142 ++++++++++++++++
 .../dashboard/app/components/DocumentsView.tsx     | 178 ++++++++++++++++++--
 .../components/__tests__/DocumentsView.test.tsx    | 163 +++++++++++++++++-
 .../app/hooks/__tests__/useArtifacts.test.ts       | 136 +++++++++++++++
 packages/dashboard/app/hooks/useArtifacts.ts       | 145 ++++++++++++++++
 packages/dashboard/app/utils/swrCache.ts           |   1 +
 .../src/routes/__tests__/artifacts-routes.test.ts  | 182 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    | 125 ++++++++++++++
 packages/i18n/locales/en/app.json                  |  22 ++-
 packages/i18n/locales/es/app.json                  |  27 ++-
 packages/i18n/locales/fr/app.json                  |  27 ++-
 packages/i18n/locales/ko/app.json                  |  27 ++-
 packages/i18n/locales/zh-CN/app.json               |  27 ++-
 packages/i18n/locales/zh-TW/app.json               |  27 ++-
 scripts/line-count-baseline.json                   |  16 +-
 18 files changed, 1255 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-6779

Fusion-Task-Lineage: 1d71e4be-4bfc-4706-9cbf-7214f91a79d1
2026-06-21 16:01:07 -07:00
gsxdsm
e138971030 fix: stabilize workflow board and loop recovery 2026-06-07 23:30:16 -07:00
gsxdsm
d37bebf8bf feat(FN-5516): merge fusion/fn-5516 2026-05-22 17:24:38 -07:00
gsxdsm
ed4d021d3d fix(dashboard): keep mobile nav visible on Android landscape and during keyboard
- Broaden mobile media query to include (max-height: 480px) so landscape
  phones (which exceed 768 CSS px wide) still render the bottom nav and
  mobile board layout instead of desktop horizontally-scrollable columns.
- Guard useMobileKeyboard against pinch-zoom (vv.scale > 1) — Android
  Chrome ignores user-scalable=no, and a focused textarea + zoom was
  false-positiving keyboard-open and hiding MobileNavBar.
- Read documentElement.clientHeight instead of stale window.innerHeight
  when computing keyboard overlap (Android multi-window can leave
  innerHeight cached at a wildly different value than the actual layout
  viewport — observed 2848 while html was 797).
- Add interactive-widget=resizes-content to the viewport meta so Android
  Chrome shrinks the layout viewport with the soft keyboard, matching iOS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:12:36 -07:00
Fusion
31caa6a00a feat(FN-3842): finalize dashboard chat reattach and cleanup merge
- Isolate DocumentsView mobile styling while preserving dashboard UI behavior
- Add legacy chat stream reattach support across API routes and chat hooks with updated tests
- Remove tracked hermes runtime dist artifacts to prevent plugin autostash conflicts
- Rename the FN-3842 merge finalize changeset file and keep related changeset updates

Fusion-Task-Id: FN-3842
2026-05-09 10:46:52 -07:00
Fusion
142328ace8 fix(FN-3847): restore pressed toggle contrast in dashboard views
- Switch pressed toggle foreground styling to use the --accent-text token
- Apply the contrast fix to AgentLogViewer and DocumentsView toggle styles
- Add regression coverage in AgentLogViewer tests for pressed-toggle contrast behavior
- Add a changeset for the @runfusion/fusion patch release

Fusion-Task-Id: FN-3847
2026-05-09 10:31:05 -07:00
gsxdsm
8a88e23b9c feat(dashboard): UI polish pass — resizable modals, themed scrollbars, settings overhaul
Modal resize + size persistence
- Extract `useModalResizePersist` hook (ResizeObserver + localStorage),
  apply to Files, Git Manager, GitHub Import, Workflow Steps, Automations
  (ScheduledTasks), and Settings modals. Each gets `resize: both`, sane
  min/max constraints, and a unique storage key.
- Bump default heights so the modals feel less cramped (Git: 92vh,
  Workflow/Automation: 80vh, Settings: 80vh / 1100px).

Scrollbar theme
- Add a global `*::-webkit-scrollbar*` + `scrollbar-color` rule in
  styles.css so chat, document, system stats, file browser, usage
  indicator, etc. inherit the theme. Existing per-component overrides
  (.board, .column-body, .settings-sidebar, planning modal) still win.

Document view
- Collapse "Show hidden" toggle and search input onto the same row as
  the Project Files / Task Documents segmented control. Stack again
  below 768px.

Mailbox / Todos
- Match Todos header treatment to the Mailbox header (typography,
  padding, border).
- Add top spacing above Mailbox Inbox/Outbox/Agents tab bar so the
  vertical gaps balance.

Settings
- Wider, resizable, persisted Settings modal.
- Project Models description and Authentication panel get proper
  horizontal padding.
- Reorder project sidebar so "General" is first.
- Plugins page: clean margins, integrate refresh button, exclude
  bundled runtimes from the "Installed Plugins" list (they were
  appearing twice — once erroring, once in their own section).
- New "Updates" panel with auto-check toggle + "Check now" button
  (frequency control noted as needing a backend schema field).

Background sessions
- Fix stale "AI N" / planning-icon badge: `handleDeleted` in
  `useBackgroundSessions` now writes a tombstone, advances the
  timestamp guard, and broadcasts completion so the cross-tab
  sync store stops resurrecting the deleted session on the next
  merge tick. Added regression test.
- Re-fetch list on SSE reconnect so terminal events fired during a
  network blip don't get permanently lost.

System stats
- Refresh button uses correct single class (was getting both `btn`
  and `btn-icon`, which conflicted on padding/border).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 17:26:07 -07:00
gsxdsm
cc8aa1f780 refactor(dashboard): extract component-specific mobile rules from styles.css
Sweep 1 of the styles.css split. Rules where the desktop counterpart already
lived in a component CSS file have been moved out of the global mobile @media
block in styles.css and appended to the matching component file's mobile
block. styles.css 4551 → 4488.

Affected components: Header, AgentsView, DocumentsView, ListView, QuickChatFAB,
QuickEntryBox, ScriptsModal, TaskDetailModal, TerminalModal, WorkflowResultsTab.

Truly global mobile rules (input font-size for iOS auto-zoom, html/body
overflow, root safe-area padding, base .btn touch targets, bare element
selectors) intentionally stay in styles.css. The remaining bulk of the mobile
block (settings, auth, board/card, inline-create) cannot move yet because
their desktop rules are still in styles.css — those will fall out as part of
the cards and settings extraction sweeps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 08:43:54 -07:00
gsxdsm
53896cdc63 fix(dashboard): repair AgentsView mobile header and reorder actions
The AgentsView mobile header was wrapping onto two rows because
DocumentsView.css carried leaked agents-view-* rules forcing
flex-wrap: wrap on the header/controls/title and width: 100% on the
primary-actions group. Removed those stale overrides so AgentsView's
own mobile rules can take effect.

Header changes:
- Drop the Refresh button.
- Reorder: Bot icon, view-toggle, then primary-actions on the far right
  (Controls icon left of New Agent +). Controls is now icon-only with
  no text label on every viewport.
- Bump the Bot icon to 24px (was 20) and give its mobile container a
  32x32 footprint to align with the view-toggle pill.
- Pin primary-actions to the right via space-between on the controls
  flex container; everything stays on one row at <=320px.

Layout: move AgentMetricsBar (stats cards) above the agent collection
so stats sit on top of the list/board/tree/org views.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 20:28:13 -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