Commit Graph

17 Commits

Author SHA1 Message Date
Fusion (runfusion.ai)
92c5af9d7d fix(FN-5189): tighten detached spawn allowlist matching
Fusion-Task-Id: FN-5189
Fusion-Task-Lineage: 4caa3f0a-af81-4c60-88e8-de229ed72e08
2026-05-19 17:19:03 -07:00
Fusion (runfusion.ai)
8c05682ab4 feat(FN-5189): complete Step 5 — guard against nohup regressions
Fusion-Task-Id: FN-5189
Fusion-Task-Lineage: 4caa3f0a-af81-4c60-88e8-de229ed72e08
2026-05-19 17:19:03 -07:00
gsxdsm
301a3a77ac fix(ci): ignore vitest temp workspace dirs in eslint
Vitest creates .tmp-fn-vitest-workspace-resolution-* directories
containing built JS files that ESLint scans as source, producing
~9500 false-positive no-undef errors that mask real lint issues.

Added .tmp-fn-*/** to global ignores. These dirs are already in
.gitignore but ESLint doesn't read .gitignore by default.
2026-05-07 23:21:05 -07:00
Timothy Laurent
cdabfa09e6 fix(ci): add build step to test shards, fix cli-alias lint
- Add `pnpm build` step to test-shards job so plugin dist/ and core
  packages are compiled before tests run (fixes plugin-loader test)
- Add cli-alias/index.js to ESLint node scripts pattern so Node globals
  (process, AbortController, fetch) are recognized

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 13:14:50 -07:00
gsxdsm
2b1ae5f4c9 fix(dashboard): repair lint+test regressions from CSS sweep and panel rearrange
- eslint: ignore .claude/** so agent worktree scripts don't pull thousands of
  spurious "console/process is not defined" errors into the workspace lint.
- AgentsView: lift the controls popup max-height/overflow into a CSS modifier
  (.agent-controls-panel--scrollable) instead of an inline style so the
  inline-style discipline test stays at 4 (only runtime health colors).
- board-mobile.test: scan every @media (max-width: 768px) block in the loaded
  CSS bundle, not just the legacy section in styles.css. After the cards/
  inline-create extraction those rules now live in component CSS files.
- AgentsView.test: update the layout assertion for the new "stats above the
  collection" placement and open the controls popup before asserting on
  the token-usage panel (which now lives there, not in the main view body).
- agents-view-mobile.test: open the controls popup before asserting on the
  token-stats panel content.
- TaskDetailModal.test: bump tab-count assertions from 7→8 (or 6→7 for
  triage/todo) to include the new Stats tab, and switch to the Stats tab
  before asserting on token-usage text in the optimistic-loading suite.
- Column.test: add MoreVertical/ChevronDown/ChevronUp/Archive to the
  lucide-react vi.mock so the new column dropdown menu renders.

After this: pnpm lint = 0 errors, pnpm typecheck = clean, pnpm test = all
9132 dashboard + plugin/engine/cli/desktop/mobile/core tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 10:21:03 -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
gsxdsm
88d8a8fa37 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
94e752d606 refactor: fix and tighten mechanical lint rules
- no-useless-escape: drop needless backslashes in character classes and
  URL/path regexes (gh-cli, store, task, modelFilter, useFileMention,
  RoutineEditor, ScheduleForm).
- no-case-declarations: wrap case bodies in ProjectOverview and
  SettingsModal with block scopes.
- prefer-const: convert a never-reassigned slug binding in agent-import;
  annotate legitimate forward-declared let bindings in dashboard.ts that
  callbacks close over before assignment.
- no-fallthrough: add missing break after settings-subcommand error.
- no-empty-interface/no-empty-object-type: convert ProjectManifest from
  empty interface extension to a type alias.
- no-unused-expressions: replace `x && x.method()` short-circuits in
  TerminalModal with optional chaining.

Then ratchet these rules from warn → error so regressions are blocked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:36 -07:00
gsxdsm
3f9a65fd56 chore(eslint): fix pre-existing errors surfaced by wider .cjs match
- Widen config match from top-level *.cjs to **/*.cjs so nested CommonJS
  scripts (e.g. mcp-schema-server.cjs) get Node globals and require() allowance.
- Replace lazy require() in claude-skills.ts with a normal top-level fs import.
- Tighten an any-typed tool map in pi-claude-cli to { name: string }.

Clears the remaining 12 lint errors; workspace now has 0 errors, 450 warnings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:36 -07:00
gsxdsm
e7f005ac21 chore(eslint): promote @typescript-eslint/no-unused-vars from warn to error
Codebase is now clean for this rule, so enforcing it as an error prevents
regressions. Intentionally unused bindings remain exempt via the \`^_\` prefix
convention already documented in the rule options.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:35 -07:00
Fusion
97528ee724 feat(FN-1756): add quality-gate inventory and rebaseline ESLint scope
- Add quality-gate-inventory.md documenting baseline verification artifacts
- Add before/after lint logs (pnpm-lint.before.log, pnpm-lint.after.log) as baseline comparison
- Add pnpm-test.before.log as test baseline artifact
- Update eslint.config.mjs with explicit context overrides to clean up linting scope
2026-04-15 01:31:41 -07:00
gsxdsm
b9a41d4ffa feat(FN-1752): add relaxed ESLint rules for plugins and agent skill templates
- Add ESLint config section for plugin examples with relaxed rules (no-explicit-any, no-unused-vars, no-unsafe-function-type, prefer-const, no-fallthrough, no-useless-escape)
- Add ESLint config section for agent skill templates with underscore prefix support for unused vars
- Allows underscore-prefixed parameters in skill templates (e.g., _param) as intentional placeholders
2026-04-14 14:51:32 -07:00
gsxdsm
a38de531c0 Merge branch 'fusion/fn-1690' into main
- Add roadmap schema migration v32 with covering indexes for roadmapItems table
- Implement RoadmapStore with CRUD and deterministic ordering
- Wire RoadmapStore access via TaskStore.getRoadmapStore()
- Update architecture.md with RoadmapStore persistence docs
- Fix pre-existing test failures in SettingsModal and store tests
2026-04-14 10:56:12 -07:00
gsxdsm
bf8265d453 feat(FN-1751): merge fusion/fn-1751 2026-04-14 10:44:06 -07:00
gsxdsm
4e38c5f7de feat(FN-1719): rebuild eslint baseline and add memory lessons
- Rebuild eslint config with context-aware flat config for better TypeScript/JSX handling
- Add memory lessons for lint/type/test baseline restoration
- Skip pre-existing flaky stream test (flushes a final complete event)
- Fix api.ts require import path
- Add ProjectEngineManager.startReconciliation mock to tests for main compatibility
2026-04-13 18:21:31 -07:00
gsxdsm
2a4e5df3fc fix(lint): resolve pre-existing lint errors and merge conflicts
- Remove unused imports/vars from routes.ts (VALID_TRANSITIONS, AUTOMATION_PRESETS, ChatStore, FileListResponse, etc.)
- Prefix unused destructured error vars with _ convention
- Fix prefer-const for summary variable
- Add _ ignore pattern to eslint.config.mjs
- Include test files in tsconfig.app.json to fix @testing-library/jest-dom types
- Resolve GitManagerModal.test.tsx merge conflict (take fn-1626 expectLatestCallStartsWith style)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:31:15 -07:00
gsxdsm
4137dbd223 feat(FN-1540): add lint as inline quality gate in task prompts
- Add ESLint configuration (eslint.config.mjs) for TypeScript/JavaScript linting
- Update executor prompts to include lint instruction before code submission
- Add lint check to triage prompt validation workflow
- Update agent prompts to emphasize lint compliance as quality requirement
- Add lint tool to agent toolset with file-level rule disabling capability
- Include lint in CI workflow with non-blocking status
- Update tests to verify lint-inclusive prompt behavior
- Add documentation for lint integration in contributing.md
- Add changeset for @gsxdsm/fusion minor release
2026-04-10 12:48:27 -07:00