FE-866: Update Petrinaut + refractive toolchain#8863
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Petrinaut, petrinaut-core, refractive, and petrinaut-website get a coordinated toolchain bump: Vite 8.0.16, rolldown / rolldown-plugin-dts, Storybook 10.4.3, oxlint 1.69, tsgo nightly, and related dev deps. Petrinaut UI adds five Reviewed by Cursor Bugbot for commit 9d0a45e. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
Updates the Petrinaut (and related) frontend toolchain dependency set, aligning the monorepo on React 19.2.7 and moving Petrinaut build/test tooling forward (Vite 8.0.16, Storybook 10.4.2, rolldown 1.0.3, jsdom 29.1.1, and tsgo via @typescript/native-preview 20260607).
Changes:
- Bump React / React DOM from 19.2.6 → 19.2.7 across the repo (including root
resolutions). - Upgrade Petrinaut / Petrinaut Core / Petrinaut Website toolchain deps (Vite/Vitest, Storybook, rolldown + dts plugin, jsdom,
@typescript/native-preview) and add explicit@babel/corefor the React Compiler Babel pass. - Extend Yarn constraints ignore list for Petrinaut-ahead dependencies and add comments documenting the continued need for the
enforce: "pre"DTS remap in Vite 8.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks updated versions for React 19.2.7 and the Petrinaut toolchain bumps (Vite/Vitest/Storybook/rolldown/jsdom/TS). |
| yarn.config.cjs | Extends constraints ignore list for Petrinaut-ahead dependencies (rolldown-plugin-dts, native-preview, @types/react, typescript, jsdom, etc.). |
| package.json | Updates root resolutions for react/react-dom to 19.2.7. |
| libs/@local/hash-isomorphic-utils/package.json | Bumps React to 19.2.7. |
| libs/@local/advanced-types/package.json | Bumps React to 19.2.7. |
| libs/@hashintel/type-editor/package.json | Bumps React/React DOM to 19.2.7. |
| libs/@hashintel/query-editor/package.json | Bumps React/React DOM to 19.2.7. |
| libs/@hashintel/petrinaut/vite.config.ts | Adds documentation about why the enforce: "pre" DTS remap must remain under Vite 8. |
| libs/@hashintel/petrinaut/package.json | Updates Petrinaut toolchain deps (Vite/Vitest/Storybook/rolldown/jsdom/native-preview) and adds @babel/core. |
| libs/@hashintel/petrinaut-core/vite.config.ts | Adds documentation about why the enforce: "pre" DTS remap must remain under Vite 8. |
| libs/@hashintel/petrinaut-core/package.json | Updates Petrinaut Core toolchain deps and bumps TypeScript to 6.0.3 for the in-browser LSP runtime. |
| libs/@hashintel/ds-components/package.json | Bumps React/React DOM to 19.2.7. |
| libs/@hashintel/design-system/package.json | Bumps React/React DOM to 19.2.7. |
| libs/@hashintel/block-design-system/package.json | Bumps React/React DOM to 19.2.7. |
| libs/@blockprotocol/type-system/typescript/package.json | Bumps React to 19.2.7. |
| apps/plugin-browser/package.json | Bumps React/React DOM to 19.2.7. |
| apps/petrinaut-website/package.json | Updates Petrinaut Website deps (React + Vite/plugin-react/native-preview) and adds @babel/core. |
| apps/hash-frontend/package.json | Bumps React/React DOM to 19.2.7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8863 +/- ##
=======================================
Coverage 59.22% 59.22%
=======================================
Files 1346 1346
Lines 130200 130200
Branches 5883 5883
=======================================
Hits 77115 77115
Misses 52180 52180
Partials 905 905
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Bump vite, @vitejs/plugin-react, storybook, rolldown 1.0.3 (matches vite's internal pin), rolldown-plugin-dts 0.25.2, @rolldown/plugin-babel and @typescript/native-preview across @hashintel/petrinaut, @hashintel/petrinaut-core, @apps/petrinaut-website and @hashintel/refractive; vitest 4.1.8 + jsdom 29 where tests exist - typescript 5.9.3 -> 6.0.3 for the petrinaut-core in-browser LSP runtime - react/react-dom 19.2.6 -> 19.2.7 monorepo-wide (required by the root resolutions pin that guarantees a single React copy) - Add explicit @babel/core devDep for the React Compiler babel pass - yarn constraints: ignore @types/react, typescript and jsdom forks (refractive was aligned instead of ignored for the toolchain packages) - Document why the dts fake-js `enforce: "pre"` remap must stay: the upstream-recommended `oxc.exclude` setup (rolldown-plugin-dts#201) emits dts chunks without their local declarations React Compiler stays on babel-plugin-react-compiler: the Rust port is in oxc 0.135 but not yet shipped in rolldown (rolldown#9671 still draft) nor reachable from stable Vite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b7f57f6 to
c4a6738
Compare
….69.0 - @typescript/native-preview 20260607.1 -> 20260610.1 (all 4 packages) - storybook + @storybook/react-vite 10.4.2 -> 10.4.3 (petrinaut + refractive) - oxlint 1.63.0 -> 1.69.0 (all 4 packages) - oxlint-tsgolint 0.22.1 -> 0.23.0 (all 4 packages) oxlint 1.69.0 newly fires jsx-a11y(control-has-associated-label) on 5 elements: add aria-label to the spreadsheet cell editor, search input and simulation timeline range input (genuine missing labels), and to the scenario/metric description textareas (oxlint false-positives: both have a properly wired htmlFor/id pair, but the linter can't verify template literal equality statically). vitest 4.1.9, storybook 10.4.4/10.4.5 and rolldown 1.1.1 don't clear the 5-day age gate yet. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Packages that are petrinaut-scope-only (no constraint conflicts): - @ai-sdk/react 3.0.184 -> 3.0.201 - @xyflow/react 12.10.1 -> 12.11.0 - @babel/standalone 7.28.5 -> 7.29.7 - react-resizable-panels 4.6.5 -> 4.11.2 - react-icons 5.5.0 -> 5.6.0 (petrinaut-website) - @whatwg-node/server 0.10.18 -> 0.11.0 (petrinaut-website devDep) Reverted/skipped with rationale: - vscode-languageserver-types 3.17.5 -> 3.18.0: 3.18.0 changed Diagnostic.message from string to string | MarkupContent, which breaks Monaco marker assignment and JSX rendering in petrinaut - @types/node 22.18.13 -> 22.19.20: monorepo-wide constraint - immer 10 -> 11, @mantine/hooks 8 -> 9: both major, both used by hash-frontend/ds-components/hash-api — out of scope - ai 6.0.199, @ai-sdk/openai 3.0.69: also in hash-frontend — constraint conflict; gate also not yet cleared for latest stable - @ark-ui/react 5.37.2, @tanstack/react-form 1.33.0, @pandacss/dev 1.11.3, @sentry/react 10.57.0, elkjs 0.11.1: each appears in ds-components or hash-frontend Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
| "@tanstack/react-form": "1.29.0", | ||
| "@xyflow/react": "12.10.1", | ||
| "@xyflow/react": "12.11.0", | ||
| "ai": "6.0.182", |
| @@ -24,22 +24,23 @@ | |||
| "@sentry/react": "10.54.0", | |||
| "ai": "6.0.182", | |||
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6ff32bd. Configure here.
| "@monaco-editor/react": "4.8.0-rc.3", | ||
| "@tanstack/react-form": "1.29.0", | ||
| "@xyflow/react": "12.10.1", | ||
| "@xyflow/react": "12.11.0", |
There was a problem hiding this comment.
Split ai package versions
Medium Severity
Bumping @ai-sdk/react to 3.0.201 pulls in ai@6.0.199, but the package still declares ai@6.0.182, so the workspace installs two ai copies. The AI assistant passes lastAssistantMessageIsCompleteWithToolCalls from the older copy into useChat, which can break automatic follow-up sends after tool calls if those patch releases diverge.
Reviewed by Cursor Bugbot for commit 6ff32bd. Configure here.
| // Petrinaut + refractive use @types/react 19.2.17; other workspaces are on 19.2.14 | ||
| "@types/react", | ||
| // petrinaut-core bundles TypeScript 6 into its LSP worker; the rest of the repo is on 5.9 | ||
| "typescript", | ||
| // Petrinaut tests run on jsdom 29; hash-ai-worker-ts is still on 24 | ||
| "jsdom", |
There was a problem hiding this comment.
Why can't the other workspaces also be upgraded?
Adding things to this array is a very blunt instrument which means we don't get any linting against packages ending up on different versions, we should only use it if there is some real difficulty in just upgrading everything else at the same time.
There was a problem hiding this comment.
Because it would be a lot of work (for TypeScript) to make sure that all packages still pass the linting, and update them without worrying that we wouldn't break things.
For Petrinaut, it's just a runtime dependency.
There was a problem hiding this comment.
And for the others? And what is the motivation for upgrading Petrinaut to TypeScript 6?
There was a problem hiding this comment.
There should be really good reasons for just giving up on version consistency for packages
There was a problem hiding this comment.
- Petrinaut lints User Code with TypeScript
- Other packages lint their own code with TypeScript
So I think it's safe to assume they are not the same version, and make sure that new user-code is linted with latest language.
| "@tanstack/react-form": "1.29.0", | ||
| "@xyflow/react": "12.10.1", | ||
| "@xyflow/react": "12.11.0", | ||
| "ai": "6.0.182", |
|
@kube - I'm super comfortable for you to update any deps/dev deps in ds-components any time you like. The only 2 danger zone dependencies in ds-components in my view are ark-ui + panda-css. The risk of breaking things with any of the other deps is close to none. |
Bump all packages from typescript 5.9.3 → 6.0.3 and remove the ignoredDependencies entry in yarn.config.cjs that kept petrinaut-core ahead of the rest of the monorepo. TS6 migration changes to legacy-base-tsconfig-to-refactor.json: - Add `"ignoreDeprecations": "6.0"` to suppress deprecation warnings for `moduleResolution: node` and `baseUrl` (the config is named "legacy" intentionally; these will be migrated separately) - Add `"types": ["node"]` to restore the TS5 behavior of auto-including @types/node globals; TS6 defaults types to [] so Node.js globals like URL, URLSearchParams and process were no longer available - Remove `"outDir": "./dist"` from the base config; with TS6's new rootDir default of `.`, having outDir in the base caused TS6059 errors when cross-package paths (configured via `paths`) resolved files outside the tsconfig directory. outDir belongs only in tsconfig.build.json, not in the base type-check config Per-file TS6 migration: - libs/@local/eslint/tsconfig.build.json: add rootDir:"src" - libs/@local/internal-api-client/typescript/tsconfig.json: add types:["node"] (this package uses URL/URLSearchParams as globals) - libs/@local/internal-api-client/typescript/tsconfig.build.json: add rootDir:"." - libs/@local/status/typescript/tsconfig.build.json: add rootDir:"." (includes both src/ and type-defs/ so rootDir must be ".") - All other tsconfig.build.json files with outDir:dist but no rootDir: add rootDir:"src" (previously inferred by TS5, now required explicitly) References: - https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/ - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
⚠️ Not ready to approve
A dependency-version mismatch within @hashintel/petrinaut introduces dual ai versions in the same workspace, and tests/hash-backend-load/tsconfig.build.json is currently inconsistent with its inherited include set.
Copilot's findings
- Files reviewed: 66/67 changed files
- Comments generated: 2
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
| "@tanstack/react-form": "1.29.0", | ||
| "@xyflow/react": "12.10.1", | ||
| "@xyflow/react": "12.11.0", | ||
| "ai": "6.0.182", |
| "outDir": "dist", | ||
| "paths": {} | ||
| "paths": {}, | ||
| "rootDir": "src" |
Benchmark results
|
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2002 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 1001 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 3314 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 1526 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 2078 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 1033 | Flame Graph |
policy_resolution_medium
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 102 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 51 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 269 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 107 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 133 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 63 | Flame Graph |
policy_resolution_none
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 8 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 3 | Flame Graph |
policy_resolution_small
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 52 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 25 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 94 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 26 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 66 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 29 | Flame Graph |
read_scaling_complete
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id;one_depth | 1 entities | Flame Graph | |
| entity_by_id;one_depth | 10 entities | Flame Graph | |
| entity_by_id;one_depth | 25 entities | Flame Graph | |
| entity_by_id;one_depth | 5 entities | Flame Graph | |
| entity_by_id;one_depth | 50 entities | Flame Graph | |
| entity_by_id;two_depth | 1 entities | Flame Graph | |
| entity_by_id;two_depth | 10 entities | Flame Graph | |
| entity_by_id;two_depth | 25 entities | Flame Graph | |
| entity_by_id;two_depth | 5 entities | Flame Graph | |
| entity_by_id;two_depth | 50 entities | Flame Graph | |
| entity_by_id;zero_depth | 1 entities | Flame Graph | |
| entity_by_id;zero_depth | 10 entities | Flame Graph | |
| entity_by_id;zero_depth | 25 entities | Flame Graph | |
| entity_by_id;zero_depth | 5 entities | Flame Graph | |
| entity_by_id;zero_depth | 50 entities | Flame Graph |
read_scaling_linkless
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | 1 entities | Flame Graph | |
| entity_by_id | 10 entities | Flame Graph | |
| entity_by_id | 100 entities | Flame Graph | |
| entity_by_id | 1000 entities | Flame Graph | |
| entity_by_id | 10000 entities | Flame Graph |
representative_read_entity
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1
|
Flame Graph |
representative_read_entity_type
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| get_entity_type_by_id | Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba
|
Flame Graph |
representative_read_multiple_entities
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_property | traversal_paths=0 | 0 | |
| entity_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=0 | 0 | |
| link_by_source_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true |
scenarios
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| full_test | query-limited | Flame Graph | |
| full_test | query-unlimited | Flame Graph | |
| linked_queries | query-limited | Flame Graph | |
| linked_queries | query-unlimited | Flame Graph |


Purpose
Toolchain and dependency sweep for the Petrinaut packages:
@hashintel/petrinaut,@hashintel/petrinaut-core,@hashintel/refractive,@apps/petrinaut-website.What changed
Toolchain (all 4 packages)
@vitejs/plugin-react6.0.2@typescript/native-preview(tsgo) 20260511 → 20260610 (nightly; 5-day age gate applied)rolldown-plugin-dts0.25.2,@rolldown/plugin-babel0.2.3@babel/coreadded explicitly (undeclared peer of the React Compiler babel setup)React and types
resolutionspin forces a single copy)@types/react19.2.17petrinaut-core
typescript5.9.3 → 6.0.3: this is the in-browser LSP language service bundled into the worker, not the monorepo type-checker (which stays on tsgo)Runtime deps (petrinaut-scope-only)
@ai-sdk/react3.0.201,@xyflow/react12.11.0,react-resizable-panels4.11.2,@babel/standalone7.29.7react-icons5.6.0,@whatwg-node/server0.11.0 (website devDep)Accessibility fixes surfaced by oxlint 1.69.0
5
aria-labeladditions in petrinaut — the new oxlint version firesjsx-a11y/control-has-associated-labelon elements the previous version missed:type="number")htmlFor/idpair, but oxlint can't verify template-literal equality statically)Why the dts
enforce: "pre"remap staysTested the upstream-recommended
oxc: { exclude }alternative (rolldown-plugin-dts#201) with vite 8.0.16 + rolldown-plugin-dts 0.25.2 — it produces silent broken output:petrinaut'smain.d.tscomes out as a bare re-export stub, andpetrinaut-core'sindex.d.d.tsis not emitted at all. The existingenforce: "pre"remap works correctly. Both vite configs now have a comment documenting the test.React Compiler stays on Babel
The Rust port is vendored in oxc 0.135 but rolldown's integration PR (rolldown#9671) is still a draft; stable Vite pins rolldown 1.0.3 anyway.
Skipped / out of scope
vscode-languageserver-types3.18.0Diagnostic.messagewidened tostring | MarkupContent; needs code changes in Monaco/JSX layers firstimmer10→11,@mantine/hooks8→9hash-frontend/ds-components/hash-apiai,@ai-sdk/openai,@sentry/react,elkjshash-frontend— constraint conflict@ark-ui/react,@tanstack/react-form,@pandacss/devds-components— constraint conflict@monaco-editor/reactnexttag (4.8.0-rc.3); stable 4.7.0 would be a downgradevitest4.1.9,storybook10.4.4+,rolldown1.1.xPre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
Tests
turbo run build test:unit lint:tsc lint:eslintfor all 4 packages — green. Storybook--smoke-testpasses on petrinaut and refractive.