Commit Graph

3213 Commits

Author SHA1 Message Date
Fusion
f078a4e946 feat(FN-2394): add Fusion reinstall flow for Pi extensions
- Add dashboard route and server handling to reinstall the Fusion Pi extension
- Introduce a client API helper and wire a reinstall action into PiExtensionsManager
- Polish action spacing and document Fusion reinstall recovery in the CLI README
- Expand route, API, and component tests including reinstall refresh stability coverage
- Add a changeset for @runfusion/fusion patch release
2026-04-24 08:55:02 -07:00
Fusion
0ebe20e487 fix(FN-2419): preserve three-state bulk model selection
- Add optional noChangeValue/noChangeLabel support to CustomModelDropdown so No change can coexist with Use default
- Update ListView bulk model controls to pass through a dedicated __no_change__ sentinel and avoid conflating untouched with clear-to-default
- Keep batch update payloads explicit by sending null provider/model only for Use default while leaving untouched lanes undefined
- Add dashboard tests covering No change vs explicit model vs Use default behavior and update README bulk-edit documentation
2026-04-24 08:55:02 -07:00
Fusion
8ffe005ba1 feat(FN-2320): add settings-tab agent deletion controls
- Add a Danger Zone section in AgentDetailView settings with a Delete Agent action
- Reuse the existing delete confirmation/handler flow and gate deletion to idle or terminated agent states
- Add UI styling for danger sections and deletion guidance text in settings
- Expand AgentDetailView tests to cover enabled/disabled states plus confirm/cancel deletion paths
- Document settings-tab deletion behavior and constraints in docs/agents.md
2026-04-24 08:55:02 -07:00
Fusion
c105cfaff1 feat(FN-2393): auto-install bundled Fusion skill during init
- Add reusable skill-installation helper that targets Claude, Codex, and Gemini skill homes
- Wire bundled skill installation into fn init with per-client installed/skipped/warning logging
- Add init command tests for install success, preserving existing installs, and non-fatal warning behavior
- Document the new init behavior in CLI/getting-started docs and add a patch changeset for @runfusion/fusion
2026-04-24 08:55:02 -07:00
Fusion
d0c82714e6 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
Fusion
d74295f7dc fix(FN-2384): schedule triage and todo tasks by priority-aware FIFO
- Sort eligible todo tasks in Scheduler by priority first, then createdAt/id for stable FIFO ordering within each tier
- Sort eligible triage tasks using the same priority-aware ordering while preserving existing pause/status/recovery gating
- Add regression tests for scheduler and triage ordering, including blocked/paused/recovery-gated edge cases
- Update architecture docs to describe priority-first task dispatch behavior
2026-04-24 08:55:02 -07:00
Fusion
6453fc771e feat(FN-2315): add hidden markdown toggle for project documents
- Extend dashboard file service and routes to support includeHidden when scanning markdown files
- Update API client, markdown hook, and Documents view UI to expose a hidden files toggle
- Add coverage for hidden-file filtering in file-service, hook, and DocumentsView tests
- Stabilize related SettingsModal and TaskForm tests and document toggle behavior in the dashboard README
2026-04-24 08:55:02 -07:00
Fusion
189fe189f4 feat(FN-2383): persist task priority across core storage
- Add task-priority contract, normalization helpers, and exports in @fusion/core types/index
- Store task priority in SQLite and migrate existing databases with default values
- Update task store behavior and sorting tests to preserve and order by persisted priority
- Add migration/regression coverage for archived tasks and refresh storage/task-management docs
2026-04-24 08:54:25 -07:00
Fusion
79cd34db47 fix(FN-2392): finalize squash merge conflict resolution
- Resolve merge markers across plugin loader, agents view, dashboard server tests, and engine pi session setup
- Keep current cache-busting and hook-guard implementations while removing stale branch-side fragments
- Preserve rate-limit test imports and useAgents-driven loading flow in dashboard agent UI
- Ensure workspace passes required verification gates with pnpm test and pnpm build
2026-04-24 08:54:25 -07:00
Fusion
bebc7bcff8 fix(FN-2404): scope onboarding first-task creation to active project
- Guard onboarding first-task creation when no project is selected
- Pass projectId to createTask so onboarding tasks are created in the active project
- Update AppModals wiring tests to verify projectId forwarding for selected and unselected states
- Expand onboarding modal and flow regression tests to assert project-scoped task creation calls
2026-04-24 08:54:25 -07:00
gsxdsm
380fe9755f feat(FN-2310): merge fusion/fn-2310 2026-04-24 08:54:25 -07:00
Fusion
eef56af706 fix(FN-2392): normalize skill-facing tool references to fn_*
- Update Fusion skill docs, prompts, and capability references to use public fn_* tool names consistently
- Align engine system prompts and tool schemas for messaging/task actions with fn_send_message, fn_read_messages, fn_task_* naming
- Refresh related tests across CLI, engine, dashboard, and core to match normalized tool naming and behavior
- Add a patch changeset for @runfusion/fusion describing the skill-tool namespace normalization
2026-04-24 08:54:25 -07:00
Fusion
fa0cbe2327 feat(FN-2387): unify agents view loading through useAgents
- Move AgentsView to consume agents, loading state, and reload logic directly from useAgents
- Extend useAgents with filterState/showSystemAgents options and always pass includeEphemeral in fetch filters
- Remove duplicate initial fetch/SSE path in AgentsView and rely on hook-managed refresh behavior
- Add regression coverage for single initial load and system-agent visibility toggling behavior
- Update useAgents hook tests to assert the new includeEphemeral fetch contract
2026-04-24 08:54:25 -07:00
Fusion
6c9f78a451 feat(FN-2386): replace reports-to ID input with manager selector
- Load available agents when the New Agent dialog opens and present them in a Reports To dropdown
- Keep manager assignment optional with a default "No manager" option and graceful fallback when manager fetch fails
- Show manager name plus ID in the step-3 summary while still submitting reportsTo as the selected manager ID
- Add focused NewAgentDialog tests for manager option loading, payload behavior, summary rendering, and failure handling
2026-04-24 08:54:25 -07:00
Fusion
11ea4b8a79 fix(FN-2370): harden addComment diagnostics and regression coverage
- Improve TaskStore addComment best-effort error diagnostics without interrupting comment writes
- Expand core store regression tests to cover addComment warning and diagnostic paths
- Align dashboard QA-check route test expectations with the updated diagnostics behavior
2026-04-24 08:54:25 -07:00
Fusion
21699cc499 feat(FN-2354): add structured redacted auth-sync diagnostics
- Add a shared auth-sync audit log helper that emits structured settings-sync/auth events with operation, direction, route, node IDs, and provider metadata
- Replace string-based auth sync logs in push, pull, and auth-receive routes with the new structured diagnostic event emission
- Ensure only provider names and counts are logged while filtering out credentials and other sensitive auth material
- Expand node sync route tests to capture runtime log sink events and assert structured fields plus redaction guarantees for push, pull, and receive flows
2026-04-24 08:54:25 -07:00
Fusion
7c1a1c36cc feat(FN-2370): merge fusion/fn-2370 (auto-resolved)
- test(FN-2370): complete Step 3 — align qa-check template expectation
- test(FN-2370): complete Step 2 — add regression coverage for addComment diagnostics
- test(FN-2370): complete Step 2 — cover addComment warning regressions
- feat(FN-2370): complete Step 1 — log addComment best-effort failures
- feat(FN-2369): merge fusion/fn-2369
- feat(prompts): require lint alongside tests and typecheck in agent instructions
- perf(test): parallelize harder — unlock worker count, split build-output, bump workspace concurrency
- fix(core): recognize legacy kb-* backups and canonicalize .kb/backups settings
- refactor: eliminate remaining 15 any warnings and ratchet rule to error
- refactor: eliminate ~400 no-explicit-any warnings across the workspace
- feat(core): add getErrorMessage helper for narrowing unknown errors
- refactor: fix and tighten mechanical lint rules
- chore(eslint): fix pre-existing errors surfaced by wider .cjs match
- chore(eslint): promote @typescript-eslint/no-unused-vars from warn to error
- refactor(dashboard,desktop,engine): remove unused imports, props, and locals
- refactor(core): remove unused imports, helpers, and dead migration constant
- refactor(cli): remove unused imports and variables
- refactor: adapt resource loader and tool wiring to pi-coding-agent 0.70
- fix: adapt to AgentState.error → errorMessage rename
- refactor: migrate @sinclair/typebox imports to typebox 1.x
- refactor: migrate to ModelRegistry.create factory
- chore: bump pi-coding-agent + pi-ai to 0.70.0
- refactor: remove legacy kb compatibility
- feat: add "Anthropic — via Claude CLI" as a first-class provider
- test(FN-2358): harden clean-worktree CI verification tests
- fix(FN-2352): add structured terminal websocket diagnostics
- fix: use live merge-base for task diff scope
- feat: backfill Claude skills when useClaudeCli toggle flips on
- fix: prevent nested .fusion/.fusion dir from PluginStore path bug
2026-04-24 08:54:25 -07:00
Fusion
4f9f36fe75 fix(FN-2364): harden diagnostics context and plugin reload imports
- Add explicit operation metadata to agent-generation and ai-session-store diagnostics for cleanup, recovery, and scheduled cleanup paths
- Extend dashboard guardrail coverage to explicitly enforce diagnostics protection for agent-generation.ts and ai-session-store.ts
- Stabilize plugin module reload imports by using temporary reload files with deterministic file URLs and cache updates
- Tighten CLI Vitest workspace cleanup to safely skip missing hidden dist directories during restore
2026-04-24 08:54:25 -07:00
Fusion
5e9cd88708 feat(FN-2353): add structured diagnostics for remote route failures
- Add remote route diagnostic helpers in dashboard routes to classify timeout, transport, and unexpected errors with consistent context fields
- Apply structured runtime logging to mesh sync settings handling and both proxy paths (SSE and wildcard) for fetch and stream failure stages
- Preserve existing HTTP behavior while enriching diagnostics with node ID, upstream path, operation stage, and normalized error metadata
- Expand mesh and proxy route test suites with runtime logger harness assertions covering structured warn/error diagnostics
2026-04-24 08:54:25 -07:00
Fusion
31f021a03e fix(FN-2371): preserve log severity in dashboard TUI capture
- Add severity control markers to core and engine structured loggers while keeping info logs on stderr transport
- Parse and strip internal severity markers in dashboard TUI console capture so logger.log entries render with info icons instead of error icons
- Expand dashboard TUI tests to cover captured console severity mapping and structured logger behavior, plus logger unit tests in core/engine
- Add a patch changeset for @runfusion/fusion describing the TUI log severity icon fix
2026-04-24 08:54:25 -07:00
Fusion
ea079ef153 test(FN-2373): add regression coverage for title summarization chain errors
- Add a store regression test for the Promise-chain fallback path when title auto-summarization fails
- Simulate a thrown console.warn call to force execution into the outer catch handler
- Assert task creation still succeeds without a title and that structured error context is logged
2026-04-24 08:54:24 -07:00
gsxdsm
f689405b99 Merge pull request #4 from Runfusion/fix/sse-connection-leak
fix: prevent dashboard reload freezes after repeated refreshes
2026-04-24 08:53:50 -07:00
Aron Prins
982145c080 test(FN-0000): drop flaky settings modal assertions 2026-04-24 15:21:04 +02:00
Aron Prins
1e0d069019 fix(FN-0000): kill dev server process groups 2026-04-24 14:32:16 +02:00
Aron Prins
a3ad698ea2 test(FN-0000): mock full agent detail API surface 2026-04-24 13:47:12 +02:00
Aron Prins
773fb0a5f2 test(FN-0000): update SSE bus URL expectations 2026-04-24 13:23:44 +02:00
Aron Prins
f77dd9defa fix(FN-0000): stabilize automation cron scheduling and SSE coverage 2026-04-24 12:51:53 +02:00
Aron Prins
0f7680a70d fix(FN-0000): prevent stale dashboard service worker reload traps 2026-04-24 11:38:20 +02:00
Aron Prins
51d1b78eeb fix(dashboard): close SSE EventSources on page unload to prevent freeze
After ~3 refreshes, the dashboard would hang on "Initializing dashboard..."
with all /api/* fetches stalling. Root cause: Chrome keeps HTTP/1.1 sockets
in its keep-alive pool across page navigations even after EventSource is
garbage-collected. Once 6 (the per-origin limit) are held, every new fetch
queues indefinitely and the app can't finish booting.

Fix, layered:

1. sse-bus.ts — pagehide/beforeunload listeners close all active channels
   and send a sendBeacon to /api/events/disconnect so the server forces
   the socket closed (socket.destroy) rather than waiting for the browser
   to notice. Uses a sessionStorage clientId to correlate.

2. api.ts — createResilientEventSource (used by planning / mission / slice
   stream endpoints) registers every handle in a module-level set and
   closes them all on pagehide/beforeunload. sse-bus doesn't see these
   streams, so it needs its own teardown.

3. sse.ts — server-side connection bookkeeping. Tracks managed SSE
   connections by clientId, supports client-triggered disconnect via
   POST /api/events/disconnect, stale-timer cleanup, and supersedes
   older streams when a client reconnects.

4. server.ts — exposes /api/events/disconnect and /api/events/keepalive
   under a dedicated 300 req/min rate limit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 11:09:29 +02:00
gsxdsm
8c3aef9526 feat(FN-2399): merge fusion/fn-2399 2026-04-24 00:43:15 -07:00
gsxdsm
2f76dea35f chore(release): v0.1.2
Version bump via changesets.
2026-04-24 00:39:37 -07:00
Fusion
11c04f0c43 fix(FN-2355): improve AI route diagnostics and stabilize related tests
- Add structured ai-session diagnostics for summarize-title and agent-generation error paths in dashboard routes
- Emit debug-gated summarize request/model resolution diagnostics when FUSION_DEBUG_AI is enabled
- Add route tests that assert diagnostics payloads for summarize and agent generation failures
- Reduce test flakiness by increasing core Vitest timeouts and relaxing brittle extension-discovery argument matching
2026-04-24 00:21:23 -07:00
gsxdsm
d77c6e198c perf(test): halve vitest workers to avoid workspace-concurrency oversubscription
Reduce VITEST_MAX_WORKERS from 4 to 2 in root `test` script so the
2-package workspace-concurrency fan-out yields 4 total threads instead
of 8, eliminating nondeterministic @fusion/core timeouts under load.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:20:41 -07:00
Fusion
9c47ed07d7 fix(FN-2316): harden pi session message normalization 2026-04-24 00:20:41 -07:00
gsxdsm
49a5605454 fix(FN-2316): harden pi session message normalization 2026-04-23 23:38:05 -07:00
gsxdsm
6feb697041 fix(FN-000): stabilize failing tests and trim slow waits 2026-04-23 23:11:58 -07:00
gsxdsm
9bf2981b22 feat(FN-2340): merge fusion/fn-2340 2026-04-23 23:02:38 -07:00
gsxdsm
9ddb475947 perf(dashboard): hoist agent-store setup to beforeAll in routes.test
The PATCH /tasks/:id/assign and Task checkout routes describe blocks
re-initialized a real AgentStore (sqlite init + createAgent) in their
beforeEach hooks, even though no test in either block mutates the agent
rows. Moving the agent setup to beforeAll while keeping the per-test
mock-store reset cuts ~20 sqlite init cycles across these two blocks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:38 -07:00
gsxdsm
fcf47d2c77 perf(cli): skip native-binary build tests by default
The build-exe and build-exe-cross suites invoke `bun build` in beforeAll
hooks and pegged CPU for ~6 min on every test run (one cached-on-miss
build plus three unconditional cross-target builds). Move them to a
dedicated vitest project, skip them unless CI=1 or FUSION_TEST_BUILD_EXE=1
is set, and add cache guards so CI re-runs skip rebuilds when the target
binary already exists. With build-exe out of the default cli run, the
main config can enable fileParallelism.

Run on demand via `pnpm --filter @runfusion/fusion test:build-exe`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:38 -07:00
gsxdsm
5f7cba63d6 feat(claude-cli): add Claude Opus 4.7 to the provider model list
The pinned @mariozechner/pi-ai catalog tops out at Opus 4.6 / Sonnet 4.6
/ Haiku 4.5. Append a Claude Opus 4.7 entry (1M ctx, 128k max out,
$5/$25 per MTok) with id-dedupe so it becomes a no-op once the upstream
catalog catches up. Sonnet 4.6 and Haiku 4.5 remain current per
https://platform.claude.com/docs/en/about-claude/models/overview and
are already in the catalog, so no other additions are needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:38 -07:00
gsxdsm
8f5c60fd8c refactor(claude-cli): always load extension, gate via /api/models filter
Previously the vendored @fusion/pi-claude-cli extension was conditionally
loaded based on GlobalSettings.useClaudeCli. That forced a Fusion restart
every time the user toggled the provider card — confusing UX.

Key insight: pi-claude-cli registers a NEW provider id ("pi-claude-cli")
rather than overriding "anthropic", so loading it unconditionally is
safe — direct Anthropic auth and CLI-routed models coexist peacefully.
The extension also gracefully no-ops when the `claude` binary is missing
(see packages/pi-claude-cli/index.ts:106 — the throw is caught locally).

Changes:
 - serve/daemon/dashboard: always append the resolved pi-claude-cli path
   to discoverAndLoadExtensions, no settings lookup.
 - resolveClaudeCliExtensionPaths() takes no args now; always returns the
   resolved path.
 - /api/models filter flipped: hide provider === "pi-claude-cli" when
   the toggle is OFF (previously: restricted to those models when ON).
 - POST /api/auth/claude-cli drops restartRequired semantics — toggling
   now has immediate effect on the picker.
 - Provider card UX updated to match: "Claude-CLI-routed models are
   now visible/hidden from the model picker" instead of "Restart Fusion
   to activate".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
b354e49940 fix(dashboard): bump in-memory rate limits to avoid spurious 429s
The shared per-IP mutation bucket (30/min) made common dashboard actions
like Respecify fail with "Too many requests" after light activity. Raise
mutation to 600/min, api to 1000/min, sse to 60/min for the local-first
use case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
3a39ad66b2 fix(core): use query param instead of hash fragment for plugin cache-busting
Vite/Vitest's resolver treats `#` as part of the filesystem path in some
environments, causing ERR_MODULE_NOT_FOUND on plugin reload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
c36d16e87d Revert "perf(test): parallelize harder — unlock worker count, split build-output, bump workspace concurrency"
This reverts commit 972ad0f9fa55dc1419660aba4758a9d3c325919a.
2026-04-23 23:02:37 -07:00
Fusion
6ca8a04544 feat(FN-2369): merge fusion/fn-2369 2026-04-23 23:02:37 -07:00
Fusion
d62bf8e24c feat(prompts): require lint alongside tests and typecheck in agent instructions
Every agent-facing quality gate that used to pair tests with typecheck now
also includes lint. Specifically:

- core/src/types.ts: QA Check skill prompt runs lint, tests, typecheck (was
  tests only) and gates task_done() on all three.
- core/src/agent-prompts.ts + engine/src/reviewer.ts: "Do NOT issue REVISE"
  exclusion list now covers lint as well, so out-of-scope fixes that
  restore lint remain allowed (matches the already-lint-aware completion
  gate text at the top of the same prompts).
- engine/src/executor.ts: task_done() pre-flight checklist adds an explicit
  "if the repo has a lint command, run it and fix failures" bullet, mirrors
  the typecheck bullet, and expands the CRITICAL line from "ALL test
  failures" to "ALL lint, test, and typecheck failures".
- core/src/store.ts: default Step 2 checklist (Testing & Verification) now
  includes Lint and Typecheck alongside "All tests pass".
- cli/src/commands/plugin-scaffold.ts: generated plugin README and the
  "Next steps" CLI output include \`pnpm lint\` between install and test.

Existing prompts that already paired lint with tests+typecheck (the
Completion section, hard quality gates, triage testing requirements) are
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
8def13ee2e perf(test): parallelize harder — unlock worker count, split build-output, bump workspace concurrency
- All 8 vitest configs now default maxWorkers to \`cpus().length - 1\`
  instead of the arbitrary \`Math.min(4, …)\` cap. Respects an explicit
  VITEST_MAX_WORKERS override for constrained environments (CI, laptops
  on battery). CLI keeps \`fileParallelism: false\` — audit found real
  shared state (process.chdir in agent-import, dist/ races in build-exe
  suites) that needs refactoring before we can flip it.
- packages/dashboard: move the mobile build-output smoke test (which
  invokes \`pnpm build:client\` via execSync, ~3s per run) into a
  dedicated \`test:build\` script so \`pnpm test\` isn't gated by it. A
  matching root script keeps CI wiring simple.
- Root: bump --workspace-concurrency from 2 → 4 so core/engine/cli/
  desktop can pipeline against dashboard's tail.
- Drop the now-redundant VITEST_MAX_WORKERS=4 prefix from the root
  scripts; the per-package configs pick up cpu count themselves.

Dashboard test suite: 182s → 38s (5x) on a 10-core machine. Full
workspace run: ~3m15 → 2m29. All tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
9113f51f69 fix(core): recognize legacy kb-* backups and canonicalize .kb/backups settings
- BackupManager.listBackups now matches kb-* and kb-pre-restore-* filenames
  alongside the fusion-* pattern, parsing timestamps from either prefix.
- canonicalizeSettings rewrites autoBackupDir: ".kb/backups" to
  ".fusion/backups" so projects upgraded from the old brand keep working
  (custom .kb/* paths remain untouched).
- createBackupManager applies the same canonicalization to settings it
  receives, so the factory path also produces backups under .fusion/backups.
- Re-export getErrorMessage from core/src/types.ts so the dashboard's vite
  "@fusion/core" alias (which points at types.ts) resolves the symbol for
  client-side consumers — fixes the mobile build-output test.

Clears all 8 pre-existing kb → fn rename failures plus the 1 test that
regressed from the new getErrorMessage import surfacing the vite alias gap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
4101af8547 refactor: eliminate remaining 15 any warnings and ratchet rule to error
- TaskCard: four catch((err: any) => err.message) promise handlers in
  archive/unarchive/delete/move → catch((err) => getErrorMessage(err)).
- InlineCreateCard + QuickEntryBox: .catch((err: any)) model-load handlers
  → getErrorMessage(err) with existing @fusion/core import.
- TerminalModal: drop (navigator as any).maxTouchPoints — modern lib.dom
  types already expose the property.
- serve.ts: remove unused any annotation on OpenRouter model mapper; the
  array element type is already inferred from json.data.
- pi.js, runtime-resolution.ts, dashboard.ts, serve.ts, dev-server-port-
  detect.ts, devserver-manager.ts: drop now-stale eslint-disable comments
  that the cleanup made redundant.

Fix a prompt-builder regression surfaced by agent's `any` cleanup: toolCall
with a raw string `arguments` field must be preserved verbatim (JSON-quoted)
rather than coerced to `{}`; restores a previously-passing test.

Then promote @typescript-eslint/no-explicit-any from warn → error. Future
new anys must either come with a one-line disable + justification or use a
real type. Workspace is now lint-clean (0 problems).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
gsxdsm
4cabe7f613 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