Skip to content

fix: the dashboard builds on macOS, a failed build says why; CI builds on macOS and with the newest dependencies (#659) - #660

Merged
a-ratz merged 6 commits into
ui-reworkfrom
fix/659-dashboard-build
Oct 13, 2026
Merged

a-ratz merged 6 commits into
ui-reworkfrom
fix/659-dashboard-build

Conversation

@a-ratz

@a-ratz a-ratz commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes #659 (into ui-rework, merged to main with #623).

What was wrong

On a fresh clone on a Mac, serve(dashboard=True) (the pizza example with USE_DASHBOARD = True) printed "Production build failed:" with nothing after it, opened the browser, and then crashed in StaticFilesComponent with "Static Files dir does not exist: .../src/flock/api/static".

  • The cause: components/publish/ held PickedUpBy.tsx (the component) and pickedUpBy.ts (its helper). On a file system that ignores case (macOS, Windows), import PickedUpBy from './PickedUpBy' resolves to pickedUpBy.ts first (.ts before .tsx), so tsc failed with TS1149, TS1192 (no default export) and TS1261. Linux finds the .tsx, so CI and the Linux worktrees were green. It came with Dashboard publish composer (#557 part 10) #567; main has no such pair.
  • The silent message: npm run build is tsc && vite build, tsc reports type errors on stdout, and the launcher printed only e.stderr.
  • The unrelated crash: with no earlier build in src/flock/api/static, the launcher still opened the browser, and the server failed later with an error that does not mention the build.
  • Found on the way: with the newest releases package.json allows (@xyflow/react 12.12.0; the lockfile has 12.8.6), tsc fails twice in GraphCanvas.tsx: OnNodeDrag now passes MouseEvent | TouchEvent, and the drag handlers took mouse events only. A normal install keeps to the lockfile (also from the wheel, which ships it), so this hits only installs that do not.

What changed

  • pickedUpBy.ts → reach.ts (and its test), named after its topic like form.ts and typeGroups.ts. No other module in the frontend differs from another only in case (checked over git ls-files, extensions stripped).
  • launcher.py: a failed build prints its exit code, stdout and stderr. In production mode, start() raises RuntimeError("Dashboard build failed and there is no earlier build in …") before it opens the browser when there is nothing to serve; an earlier build is still served as before.
  • GraphCanvas.tsx: onNodeDrag and onNodeDragStop are typed as OnNodeDrag, so they build with 12.8.6 and 12.12.0.
  • quality.yml, two new jobs next to Frontend Quality (which builds with npm ci on Linux):
    • Frontend Build (macOS): npm ci and npm run build on macos-latest. On f787446 (before the rename) it failed with the same three errors as the Mac; on de78e78 it passes.
    • Frontend Build (latest dependencies): npm install --no-package-lock and npm run build. It installs with npm 11: npm 10, which Node 22 ships, crashes resolving this tree without a lockfile (Cannot read properties of null (reading 'edgesOut') at jsdom's optional peer canvas; reproduced locally with Node 22 and npm 10.9.9 on an empty cache). Without the GraphCanvas change it fails with the two TS2322 errors (checked locally with Node 22 and npm 11).
  • Changelog entry under Fixes. No version bump (bug fix).

Checks

  • On the Mac the dashboard builds and is served again with this branch.
  • The pizza example (a copy on port 8350) on a fresh Linux clone: with a type error added, the log shows the tsc error, then the RuntimeError, and no browser opens; without it the dashboard is served (title "🦆🐓 Flock 🐤🐧", /docs 200).
  • A fresh clone of the branch builds with the lockfile and without it (12.12.0).
  • tests/test_dashboard_launcher.py: a failed build prints stdout and stderr; start() raises without a build and does not open the browser; it serves an earlier build. The first two failed before the change.
  • npm test: 756 passed; npm run type-check clean; uv run poe test: 3346 passed, 78 skipped. uv run poe lint reports the same 59 findings as ui-rework before this PR, none in the changed files.

The commit 6871592 also holds the renames (git mv had staged them), and de78e78 the imports that go with them, so 6871592 alone does not build.

🤖 Generated with Claude Code

a-ratz and others added 2 commits October 13, 2026 19:45
…ent @xyflow/react (#659)

The launcher printed only the build's stderr, and tsc reports type errors
on stdout, so "Production build failed:" stood alone. It now prints both
streams and the exit code. With no build to serve, start() raises before
it opens the browser, instead of the server failing later in
StaticFilesComponent.

The Flow's drag handlers took mouse events only; @xyflow/react 12.12.0
(within ^12.8.6) passes MouseEvent | TouchEvent, so tsc failed on an
install without the lockfile. They are typed as OnNodeDrag now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second frontend job installs without the lockfile and runs npm run build,
so an upstream release that breaks the build fails the PR. Changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@a-ratz

a-ratz commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Local Codex review, round 1 (codex review of the branch against its base, at 72bdcc6).

Findings as reported

Target: branch diff against origin/ui-rework

No actionable regressions found. Read-only launcher checks, frontend type-checking, and targeted Ruff checks passed; full test suites and fresh dependency builds were not run.

a-ratz and others added 4 commits October 13, 2026 19:59
macOS ignores case in file names, so './PickedUpBy' also finds
'pickedUpBy.ts' there; Linux runners never see that. This job fails
until the next commit renames the helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm 10, which Node 22 ships, crashes resolving the tree without a
lockfile ("Cannot read properties of null (reading 'edgesOut')" at
jsdom's optional peer canvas); npm 11 resolves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h.ts (#659)

PickedUpBy.tsx and pickedUpBy.ts sat in one folder. On a file system
that ignores case, './PickedUpBy' resolves to the .ts helper first, so
tsc reported TS1149/TS1192/TS1261 and the build failed; Linux found the
.tsx. The helper is named after its topic now, like form.ts and
typeGroups.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@a-ratz a-ratz changed the title fix: a failed dashboard build says why; CI builds with the newest allowed dependencies (#659) fix: the dashboard builds on macOS, a failed build says why; CI builds on macOS and with the newest dependencies (#659) Oct 13, 2026
@a-ratz

a-ratz commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Local Codex review, round 2 (codex review of the branch against its base, at cbc41ba).

Findings as reported

Target: branch diff against origin/ui-rework

No actionable regressions found. TypeScript checking and launcher smoke checks passed; Vitest was blocked by read-only temporary storage, and platform-specific CI builds were not verified locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant