Skip to content

fix(frontend): the #124 bumps broke the build -- useRef under React 19 types, manualChunks under vite 8 - #140

Merged
hyperpolymath merged 1 commit into
mainfrom
arena/35638cac-dd6c-4e06-b0f0-f5e9292c1581-metamanifold-webui
Oct 15, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
arena/35638cac-dd6c-4e06-b0f0-f5e9292c1581-metamanifold-webui

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this changes

#124 (Dependabot's frontend group) bumped React 18 -> 19.3, vite 6 -> 8.3, TypeScript 5.7 -> 7, react-router-dom 6 -> 7 and plotly 2 -> 4 in one merge, and -- with no required checks yet -- it landed with tsc already failing. Main cannot build its frontend right now; this PR is that repair, two real breaks:

  1. React 19's types dropped the zero-argument useRef overload. TreeView.tsx's two timer refs (saveTimer, scrollTimer) failed tsc with TS2554 twice. They now pass the explicit undefined they always had at runtime: useRef<number | undefined>(undefined).
  2. vite 8's rolldown core accepts only the function form of manualChunks. The object form in vite.config.ts died at manualChunks is not a function. The function keeps the same chunking -- plotly still lands in its own 4.6 MB chunk.

How to run its tests

From frontend/:

bun install --frozen-lockfile --ignore-scripts
bun run build      # tsc && vite build -- green in 2.9s, same chunk layout
bun run test       # 42 pass, 0 fail
bun run typecheck  # clean

Verified locally on this exact tree.

What this leaves out

React 19, react-router 7, TypeScript 7 and plotly 4 are runtime majors that type-check and build clean but deserve their own smoke test of the running app; this PR only restores what the bumps broke mechanically. If the majors prove too hot, the alternative is re-pinning them in package.json -- but that is a decision about keeping #124, not about fixing it.

Versions tested

bun 1.4.3 (local mise shim; CI installs the tool_versions.yml pin). Julia, R and Agda untouched.

Note: the commit is unsigned (the signing key's passphrase is unavailable to the session); amend to sign if required.


Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe vibe@mistral.ai

…9 types, manualChunks under vite 8

#124 bumped React to 19.3 and vite to 8.3 together, and with nothing
requiring the checks, it merged with the frontend build already red.
Two breaks, both real:

- React 19's types dropped the zero-argument useRef overload, so
  TreeView's two timer refs (saveTimer, scrollTimer) no longer
  compiled: TS2554, twice. They now take the explicit undefined they
  always had at runtime.
- vite 8's rolldown core accepts only the function form of
  manualChunks; the object form in vite.config.ts died at
  "manualChunks is not a function". The function keeps the same
  chunking -- plotly still lands in its own 4.6 MB chunk.

tsc and the full bun test suite pass (42/42); vite build completes in
under 3s with the same chunk layout as before the bumps.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2bad773d-e6f9-4e09-8c42-0a24baa538d9
📥 Commits

Reviewing files that changed from the base of the PR and between 15a6b5d and eff800d.

📒 Files selected for processing: 2
  • frontend/src/views/TreeView.tsx
  • frontend/vite.config.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 9e7766c into main Oct 15, 2026
10 checks passed
@hyperpolymath
hyperpolymath deleted the arena/35638cac-dd6c-4e06-b0f0-f5e9292c1581-metamanifold-webui branch October 15, 2026 02:45
@hyperpolymath

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

hyperpolymath added a commit that referenced this pull request Oct 15, 2026
…PR (#141)

## What this changes

#124 grouped every frontend update, and with nothing requiring the
checks it merged five framework majors -- React 18->19, vite 6->8,
TypeScript 5->7, react-router-dom 6->7, plotly 2->4 -- in one PR, with
`tsc` already red until #140 repaired it. A major is a migration, not an
update: it must carry its own review and its own CI run.

Both update groups (`frontend`, `github-actions` -- checkout v4.4.0 ->
v7.0.1 came through #123 the same way) now name `update-types: ["minor",
"patch"]` only. A Dependabot update matching no group opens its own PR,
so majors arrive one at a time; minor and patch still batch weekly as
before, so the noise stays low.

A new testset in `test/unit/test_install_pins.jl` pins the shape -- both
ecosystems declared, the frontend on `bun`, and no group whose
`update-types` admit `major` -- so a future group cannot silently go
back to batching majors. This is the same defence-in-depth the file
already applies to workflow pins: the config asserts the policy, and the
policy is enforced at the door.

## How to run its tests

From the repository root:

```
julia --project=. test/unit/test_install_pins.jl
```

All testsets pass locally (223 prior assertions plus the new 9).

## What this leaves out

No `open-pull-requests-limit` or other throttles: with majors unbatched
the default limit of 5 per ecosystem keeps the queue bounded, and the
first runs under this config (#123/#124) showed the volume is small. No
change to security updates, which follow their own path.

## Versions tested

Julia 1.13.1 locally (CI pins 1.12.5). No other tool touched.

Note: the commit is unsigned (the signing key's passphrase is
unavailable to the session); amend to sign if required.

---------

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

Co-authored-by: Mistral Vibe <vibe@mistral.ai>
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