Commit Graph

126 Commits

Author SHA1 Message Date
gsxdsm
b196ab42b4 fix(dashboard): no resize-drag dismiss across all resizable modals + Claude CLI in Authenticated group
When a user drags the native CSS resize grip from inside a modal and
releases the mouse over the overlay, the synthesised click event
targets the common ancestor (the overlay) — fooling the existing
e.target === e.currentTarget dismiss check. Audited every modal with
`resize: both` and switched them to a shared mousedown→mouseup tracking
pattern (new useOverlayDismiss hook) so dismiss only fires when both
events land on the overlay.

Modals fixed: TaskDetail, Settings, FileBrowser, GitHubImport,
GitManager, ScheduledTasks, Scripts, WorkflowStepManager. (Terminal
and AgentDetail were already fixed in 95566795e; PlanningModeModal
already had the right pattern inline.)

Also: in Settings → Authentication, the "Anthropic via Claude CLI"
card now lives inside the Authenticated group when authenticated and
the Available group otherwise, instead of floating at the top.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 19:36:24 -07:00
gsxdsm
61ea16e31f feat(dashboard,cli): update-check frequency, GitHub star button, more resizable modals
Update-check frequency (end-to-end)
- Add `updateCheckFrequency: "manual" | "on-startup" | "daily" | "weekly"`
  to GlobalSettings (default: "daily").
- Backend `performUpdateCheck` honors the frequency: TTL = day/week,
  `manual` returns cache or empty without hitting npm, `on-startup`
  refreshes once per process lifetime then serves cache. `/refresh`
  route forces network regardless.
- Settings → Updates surfaces a working `<select>` for the cadence,
  disabled when auto-checks are off entirely.
- Tests: 4 new cases covering ttlForFrequency mapping, weekly window,
  manual semantics, on-startup once-per-process behavior.

TUI update notice
- Read cached update result synchronously on TUI startup. When an
  update is available, render a yellow notice line on the splash and
  a colored ● next to the version in the status bar.

Settings modal header polish
- Add "Star on GitHub" pill (icon + Star + cached star count from the
  GitHub API, 1h localStorage TTL) and "Help" button (opens project
  Discussions). Both link to the Runfusion/Fusion repo.
- Star button auto-hides after the user clicks it (intent = star),
  tracked in localStorage `fusion:github-star-clicked`.
- Settings → General gets a "Show Star on GitHub button" checkbox so
  users can hide it preemptively. New global setting
  `showGitHubStarButton: boolean` (default true) gates rendering.

More resizable modals
- Task Detail modal: 85vh default, resize: both, persisted via
  useModalResizePersist (key `fusion:task-detail-modal-size`).
- Quick Chat FAB: full 8-direction resize (4 corners + 4 edges) via
  pointer-event handlers; persisted to
  `fusion:quick-chat-size-<projectId>`. Each handle has the right
  cursor + role="separator" for accessibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 17:55:15 -07:00
gsxdsm
669cba935d fix(dashboard): preserve fullDetail.log so task Activity tab renders
The live-token-usage refactor (d30edfda5) merged the SSE-updated `task`
prop on top of `fullDetail` to keep tokenUsage/status fresh. SSE strips
`log` to [] (stripTaskListHeavyFields) for list payloads, so the spread
clobbered fullDetail.log and the Activity timeline rendered empty.

Carve `log` out of the merge alongside `prompt`. Adds a regression test
that simulates the SSE-stripped task prop with a populated fullDetail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:34:49 -07:00
gsxdsm
d30edfda5d feat: live task token usage and stats-tab fixes
Capture per-session token usage from pi-coding-agent's getSessionStats()
after each promptWithFallback in the executor and merger paths, so
task.tokenUsage populates live during runs and reflects final totals on
done tasks. Previously the executor never read session usage and only
the heartbeat path bumped agent token totals, leaving task.tokenUsage
undefined even after completion.

Stats panel and done-card timing also now reflect live state: the modal
overlays the SSE-updated task prop on top of the one-shot fullDetail
snapshot, in-progress workflow steps contribute live elapsed to the
Workflow runtime metric, and the done card uses Timed duration (matching
the stats tab) with workflow runtime as fallback. Time indicator labels
coarsened to <1m / Nm / Nh / Nd.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 04:51:29 -07:00
Fusion
410a438a7f feat(FN-2639): replace native confirms with dashboard confirm dialog
- Add reusable ConfirmDialog component, styles, and useConfirm hook to provide async confirmation flows
- Wire ConfirmProvider at app level and migrate confirm call sites across task, agent, roadmap, plugin, and settings UI actions
- Update modal interaction patterns to support dialog reentry and consistent destructive-action confirmations
- Expand dashboard tests with confirm dialog and hook coverage plus migrated component test assertions
2026-04-27 04:05:25 -07:00
Fusion
6d4bb9c3cf feat(FN-2631): revise task detail move split-button behavior
- Rework TaskDetailModal move controls to use split-button primary/secondary transitions with in-review-specific options
- Add dedicated split-button styling for divider, chevron menu, focus states, and mobile sizing using design tokens
- Keep in-review merge action visible while move options remain accessible through secondary menu actions
- Expand TaskDetailModal tests to cover split-button rendering, primary click behavior, and secondary transition menu contents
2026-04-26 23:43:11 -07:00
Fusion
f69c006a8c feat(FN-2604): merge fusion/fn-2604 (auto-resolved)
- feat(FN-2604): complete Step 8 — add changeset and delivery docs
- test(FN-2604): complete Step 7 — align tests and regenerate extension skill docs
- test(FN-2604): complete Step 6 — update dashboard tests for planning statuses
- feat(FN-2604): complete Step 5 — update CLI planning terminology
- feat(FN-2604): complete Step 4 — update workflow route status strings
- feat(FN-2604): complete Step 3 — update settings planning terminology
- feat(FN-2604): complete Step 2 — rename replanning actions in column and spec editor
- feat(FN-2604): complete Step 1 — update dashboard component status strings
2026-04-26 14:06:48 -07:00
gsxdsm
4e18453fa8 fix(terminal): tighten CSS selector in keyboard layout test
Update test regexps to match .modal.terminal-modal (two-class selector) and assert min-height: 100dvh on mobile. Also clean up a stale comment in TaskDetailModal.
2026-04-26 11:44:39 -07:00
Fusion
8fbc3211f0 feat(FN-2592): add provider icons to task cards and detail modal
- Render provider icons on TaskCard model metadata with token-based sizing and spacing
- Add provider icon display in TaskDetailModal for executor, validator, and planning model rows
- Update dashboard styling with reusable provider icon classes and layout tweaks in component CSS
- Expand TaskCard tests to cover provider icon rendering and fallback behavior
2026-04-26 10:43:17 -07:00
Fusion
78b09711a2 feat(FN-2557): expand task stats tab with execution insights
- Enrich TaskTokenStatsPanel with timing extraction, workflow runtime summaries, and longest-event highlights from task logs and workflow results
- Add an execution details section for mode, runtime status, step progress, retries, recovery state, and runtime links
- Wire TaskDetailModal to pass the working task into the stats panel so the Stats tab renders execution context with token usage
- Extend TaskDetailModal and TaskTokenStatsPanel tests (plus panel CSS) to cover the new stats sections and loading/empty/token states
2026-04-25 18:06:36 -07:00
Fusion
f5bbba0eac feat(FN-2556): add TaskForm bottom slot for model configuration
- Add a new renderBelowModelConfiguration prop in TaskForm and render it beneath the Model Configuration section inside More options
- Update TaskDetailModal to use the new slot so the Source Issue edit block appears below model settings instead of near the primary section
- Adjust TaskDetailModal source-issue edit tests to expand More options before interacting with source fields
- Add ordering assertions in TaskForm and TaskDetailModal tests to verify the injected block sits between Model Configuration and Workflow Steps
2026-04-25 17:29:18 -07:00
Fusion
75fe93da6a fix(FN-2555): restore execution mode updates from task edit flow
- Add explicit executionMode props to TaskForm edit controls and render a Standard/Fast selector in More Options
- Track editExecutionMode state in TaskDetailModal and reset it consistently when opening, canceling, or syncing task changes
- Include executionMode in update payload diffing so standard→fast sends "fast" and fast→standard clears to null
- Add regression tests for TaskForm selector behavior and TaskDetailModal update payload handling
2026-04-25 16:01:49 -07:00
gsxdsm
3b69b9817e feat(FN-2535): merge fusion/fn-2535 2026-04-25 15:21:28 -07:00
gsxdsm
a97ffd73a0 feat(FN-2473): merge fusion/fn-2473 2026-04-25 10:55:50 -07:00
gsxdsm
303fc98b10 feat(dashboard): rearrange agent + task detail panels
- AgentsView: agent metrics bar moves to the top of the scrolling
  content (was below the agent list); token-usage panel moves into
  the controls dropdown next to the heartbeat slider, which is now
  scrollable so the added content fits on short viewports.
- AgentsView mobile: 2x2 grid for the metric cards with tighter
  padding and smaller value/label text so labels don't crowd off
  the card on narrow phones.
- TaskDetailModal: new "Stats" tab at the end of the fixed tab list
  hosts the token-usage panel, removed from the inline definition
  body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 09:50:06 -07:00
gsxdsm
522078fbba feat(FN-2458): merge fusion/fn-2458 2026-04-25 08:26: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
Fusion
a6dd98957c feat(FN-2389): add task priority controls across dashboard flows
- Wire priority through task creation and update API payloads for dashboard clients
- Add priority selection to TaskForm, New Task modal, and inline create card with default/reset behavior
- Support priority editing and display in Task Detail modal plus non-default priority badges on task cards
- Extend dashboard styles and component tests to cover priority selectors, rendering, and mobile behavior
2026-04-24 15:00:43 -07:00
gsxdsm
1bbc5fcce7 fix(merger,dashboard): handle empty-squash commitSha to keep card and Changes tab in sync
When a branch contained commits already on main (duplicate cherry-picks),
the merger's local squash collapsed to an empty commit. The merger then
recorded that empty commit's SHA on mergeDetails.commitSha. The actual
content landed later on main as a different SHA via PR merge, but the
task kept pointing at the orphaned empty commit.

Symptom: TaskCard showed "N files changed" (falling back to
task.modifiedFiles), but the Changes tab in the modal showed nothing
because the API hit `git diff sha^..sha` on the empty commit and
returned no files.

Two fixes:

1. merger.ts: detect empty squash commits and skip storing commitSha,
   logging clearly. recoverInterruptedMergingTasks → findLandedTaskCommit
   already exists to backfill the right SHA when the real commit lands;
   a missing commitSha is a known fallback path the UI already handles.

2. TaskChangesTab.tsx: when the API returns no files for a done task,
   fall back to task.modifiedFiles (paths only, no patches) with a clear
   note. Mirrors the existing 3-tier fallback in TaskCard.tsx:1090-1124
   so card and modal always agree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 13:31:34 -07:00
Fusion
0f1da6e6af feat(FN-2447): add dependency-aware task delete flow
- Extend TaskStore deleteTask with a safe default that blocks deleting tasks still referenced by live dependents
- Add an opt-in removeDependencyReferences path that rewrites dependent tasks atomically before deletion
- Update dashboard API/routes to surface TASK_HAS_DEPENDENTS as a 409 with structured details and a delete query flag
- Add TaskCard/TaskDetailModal confirmation-retry UX plus coverage in core, dashboard route/API, and component tests
- Document the new delete semantics and opt-in behavior in the dashboard API README
2026-04-24 08:55:02 -07:00
Fusion
1076a3360c feat(FN-2441): singularize one-step progress labels
- Update TaskCard step toggle label to render "step" when the unified total is 1
- Update TaskDetailModal completion label to use singular/plural based on total step count
- Add regression tests in TaskCard and TaskDetailModal suites to verify singular labels and reject incorrect plural forms
- Tighten existing completion-count assertions to cover singular/plural text expectations
2026-04-24 08:55:02 -07:00
gsxdsm
3fbb7c47cf refactor: eliminate ~400 no-explicit-any warnings across the workspace
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.

Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
  using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
  .all()/.get() results via `as unknown as XxxRow[]` (the double cast is
  required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
  React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
  pi-ai concrete shapes; typed Claude stream event message fields.

72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:36 -07:00
gsxdsm
200ebfcd39 refactor(dashboard,desktop,engine): remove unused imports, props, and locals
Clears the remaining no-unused-vars warnings across the dashboard app and
server, desktop main, and engine sources. Dead React state destructures are
collapsed to setter-only, unused props are underscore-prefixed to preserve
API shape, and unreferenced catch bindings are dropped. No behaviour change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:35 -07:00
Fusion
fc43d2652c fix(FN-2313): make PR auth checks gh-first across settings UI
- Replace the server-computed settings flag with prAuthAvailable and document it in shared Settings types
- Compute PR auth availability from gh CLI auth first, with GITHUB_TOKEN as fallback in GET /api/settings
- Rename dashboard settings state/props/hooks from githubTokenConfigured to prAuthAvailable and strip server-owned auth fields on save
- Update PR section messaging to guide users to run 'gh auth login' and refresh related route/component tests
2026-04-23 10:58:36 -07:00
Fusion
d3c6186b52 feat(FN-2241): add review level selection in task creation and editing
- Extend core task types/store and dashboard API route handling to persist task reviewLevel
- Add review level controls to TaskForm, NewTaskModal, and TaskDetailModal flows
- Improve workflow step selector presentation in WorkflowResultsTab and styles for clearer review settings UX
- Document the new review level behavior and add route/form/modal tests to cover create and edit scenarios
2026-04-22 09:23:57 -07:00
gsxdsm
d01fb6a01e feat(FN-2220): merge fusion/fn-2220 2026-04-22 01:31:40 -07:00
Fusion
9875e3353e fix(FN-2159): hide manual PR controls for auto-merge tasks
- Add an autoMerge prop to PrSection and show an auto-merge hint instead of manual PR actions
- Pass project autoMerge settings from TaskDetailModal into PrSection
- Preserve active automation messaging when PR creation is already in progress
- Expand PrSection tests to cover auto-merge enabled and disabled behavior
- Increase core RunMutationContext log entry bounds test timeout to reduce flakiness
2026-04-19 20:48:13 -07:00
Fusion
c577b8f3d5 Style changes 2026-04-19 20:48:13 -07:00
gsxdsm
06d5a08458 Style changes 2026-04-19 10:13:34 -07:00
Fusion
47c0dc41e1 fix(FN-2020): prevent duplicate retry toasts
- Remove the pre-retry info toast from TaskDetailModal retry handling
- Keep a single completion toast with updated success copy: "Retried {taskId}"
- Add regression tests to assert exactly one toast is shown on retry success
- Add regression tests to assert exactly one toast is shown on retry failure
2026-04-17 15:31:59 -07:00
gsxdsm
61136131e4 feat(FN-2008): merge fusion/fn-2008 2026-04-17 14:55:28 -07:00
Fusion
39e833b91e feat(FN-2014): merge fusion/fn-2014 2026-04-17 14:31:43 -07:00
gsxdsm
f35ea101c1 fix(FN-1572): stabilize fusion agent execution 2026-04-17 12:13:39 -07:00
gsxdsm
4a576c028c fix(FN-1952): bound recovery and task log growth 2026-04-16 19:32:35 -07:00
gsxdsm
cbd7238f2f feat(FN-1926): merge fusion/fn-1926 2026-04-16 10:23:07 -07:00
Fusion
e123a6be77 feat(FN-1853): add description truncation with expand toggle to TaskDetailModal
- Add truncation state and expand/collapse toggle logic to TaskDetailModal
- Truncate descriptions at 4 lines with a 'Show more' button to expand
- Add CSS styles for description toggle button using design tokens
- Add comprehensive tests for truncation behavior and toggle interactions
2026-04-15 22:12:49 -07:00
Fusion
f33f15a98f style(FN-1847): unify dialog overlay styling and add accessibility attributes
- Add role=dialog and aria-modal attributes to all modal dialogs for accessibility
- Standardize close button aria-labels across all modals
- Unify overlay backdrop-filter, z-index, and background styles in styles.css
- Add light theme overrides for non-standard overlay backgrounds
- Update AgentListModal tests to reflect new aria attributes
- Add changeset for @gsxdsm/fusion package
2026-04-15 20:44:40 -07:00
gsxdsm
e5fac0f9b6 feat(FN-1876): merge fusion/fn-1876 2026-04-15 09:46:36 -07:00
Fusion
0d6535a952 feat(FN-1629): add pagination to agent logs
- Add pagination support to TaskStore.getAgentLogs() with limit/offset parameters
- Add GET /tasks/:id/logs API route with pagination support
- Add fetchAgentLogs API client with pagination parameters
- Refactor useAgentLogs hook for incremental loading with loadMore callback
- Update useMultiAgentLogs for pagination consistency across multiple task IDs
- Add Load More UI to AgentLogViewer component
- Wire up Load More in TaskDetailModal agent log section
- Fix offset slice direction bug in getAgentLogs
- Remove incorrect reverse() call in getAgentLogs offset logic
- Add comprehensive tests for useAgentLogs and useMultiAgentLogs pagination
2026-04-15 02:53:06 -07:00
Fusion
123ec5949f feat(FN-1862): add completion state tracking for onboarding
- Add markOnboardingCompleted() to set completedAt timestamp when user finishes onboarding
- Add isOnboardingCompleted() to check if onboarding was completed (vs dismissed)
- Update ModelOnboardingModal to call markOnboardingCompleted on successful completion
- Skip onboarding auto-open when already completed locally
- Add completion state tracking tests in ModelOnboardingModal.test.tsx
- Add model-onboarding-state unit tests
- Update useAuthOnboarding to check local completion state before auto-opening
- Document localStorage completion state tracking pattern in .fusion/memory.md
2026-04-14 23:44:40 -07:00
gsxdsm
2800f57d78 feat(FN-1748): merge fusion/fn-1748 2026-04-14 22:45:59 -07:00
gsxdsm
301bfbe3d7 feat(FN-1852): merge fusion/fn-1852 2026-04-14 18:46:00 -07:00
gsxdsm
5ec4beda73 feat(FN-1740): merge fusion/fn-1740 2026-04-14 10:43:59 -07:00
gsxdsm
4e4dbc92c1 Fix stranded task retry and respec reset 2026-04-13 11:10:17 -07:00
gsxdsm
2fc4fccd00 feat(FN-1271): add Documents tab to task detail modal
- Add task document API routes for listing, viewing, and downloading task files
- Create TaskDocumentsTab component with file browser UI
- Integrate Documents tab into TaskDetailModal alongside existing tabs
- Add frontend API functions for task document operations
- Add CSS styles for document list, file icons, and download actions
- Add comprehensive route tests for task document endpoints
2026-04-12 13:20:37 -07:00
gsxdsm
8b1081dab0 feat(FN-1489): reorganize Task Detail modal footer with split menus
- Add SplitMenu component for reusable dropdown menus in modal footers
- Update TaskDetailModal footer to use LeftMenu (Plan, Subtask, Models) and RightMenu (Save, Close)
- Add comprehensive tests for dropdown menu behavior in modal footers
- Update QuickEntryBox and NewTaskModal tests to match new menu patterns
- Add testing patterns for modal dropdown menus to project memory
2026-04-11 06:51:20 -07:00
gsxdsm
35084c8e20 chore: snapshot WIP across dashboard, engine, and core
Bundles staged work-in-progress modifications across multiple packages
(routes, store, agent-instructions, self-healing, QuickEntryBox, etc.)
plus the dashboard theme-data.css preload fix.

Note: an unstaged 621-line deletion in .fusion/memory.md was deliberately
NOT committed — it appears to be an accidental overwrite of architecture
notes and is left in the working tree for review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 21:12:40 -07:00
gsxdsm
bf7b7ad701 fix(FN-1564): remove duplicate Retry button in task detail modal
- Fix duplicate Retry button appearing in task detail modal header
- Add test coverage for Retry button visibility conditions
- Clean up conditional logic for Retry button rendering
2026-04-10 13:02:51 -07:00
gsxdsm
71cad2ff53 feat(FN-1439): render dependency titles in Task Detail modal
- Display task dependency titles alongside IDs in the Task Detail modal dependencies section
- Add truncation styling for long dependency titles with hover tooltip for full text
- Add comprehensive tests for dependency label rendering with various title lengths
- Update styles.css with dependency label truncation classes
2026-04-10 07:40:55 -07:00
gsxdsm
bc936ec893 feat(FN-1428): remove separate Commits tab for done tasks
- Update README to reflect merged Changes tab replacing Commits tab
- Remove CommitsTab component and related imports from TaskDetailModal
- Remove commit-related modal state from useModalManager
- Update TaskDetailModal tests to remove Commits tab assertions
2026-04-09 15:10:20 -07:00