Commit 2b64efa
committed
chore: pull deferred quality gates into scope
Fixes the rest of the round-3/4 deferred punch list. Six concrete
items; cspNonce option deferred separately (requires library API
design + careful emotion-cache plumbing).
Library quality gates
- `size-limit` budgets in `library/package.json#size-limit`:
standalone entry < 220 kB, /react entry < 50 kB, yjs sync chunk
< 210 kB (size-limit measures the full transitive graph at
runtime — different from Vite's gzip column, but the actual
consumer-visible cost). New `pnpm run size` script and CI step in
`library-node22-compat`. Verified: 166/29/159 kB current, all
under budget.
- New `library-react19-compat` CI job in pr-health-checks.yml:
installs React 19 + ReactDOM 19 + @types/react@19 + @types/react-dom@19
+ @testing-library/react@16 just inside the library workspace,
rebuilds, reruns 774 tests. The peer range `^18.3.0 || ^19.0.0`
was previously claimed but unverified. Wired into the
`pr-health-gate` required-check.
Library: rules-of-hooks bug fixes (formerly latent crashes)
- `lib/nodes/sfcDiagram/SfcJump.tsx`: hooks `useMemo` (minWidth) +
`useEffect` (auto-resize) were called AFTER `if (!width || !height)
return null`. If width/height ever flipped, React would see a
different number of hooks across renders → crash. Hoisted both
hooks above the early return.
- `lib/nodes/sfcDiagram/SfcActionTable.tsx`: same pattern, same fix.
- `lib/components/popovers/bpmnDiagram/BPMNPoolEditPopover.tsx`:
`useState(poolNode.data.name)` called after `if (!poolNode) return
null`. Lifted state init above the early return; falls back to ""
when the pool node hasn't materialized yet.
- Library eslint promotes `react-hooks/rules-of-hooks` back to
`error` (warnings only for `exhaustive-deps`, where ~15 hooks have
legitimate deliberate-stale-closure patterns).
Library public API tightening
- Move v2/v3 version-migration helpers out of the public root export
into `@tumaet/apollon/internals`:
- `convertV2ToV4`, `convertV3ToV4`, `convertV3HandleToV4`,
`convertV3NodeTypeToV4`, `convertV3EdgeTypeToV4`,
`convertV3MessagesToV4`, `isV2Format`, `isV3Format`, `isV4Format`
- All `V3*Typings` (`V3UMLClassifier`, `V3BPMNTask`, etc.)
- `importDiagram` remains the public entry — that's what consumers
actually use to normalize any version of the model to v4. The
rest were accidentally-public internals leaked through the
`export * from "./versionConverter"` barrel.
- `lib/utils/index.ts` now does `export { importDiagram }` instead
of `export *`.
Monorepo
- `capacitor.config.ts` moved from repo root to
`standalone/webapp/capacitor.config.ts`. `webDir` adjusted from
"standalone/webapp/dist" to "dist". Verified no `android/` or
`ios/` native folders to orphan. All `pnpm capacitor:*` scripts at
root now delegate via `--filter @tumaet/webapp`; the docs at
`docs/mobile/ios-android-setup.md` continue to work unchanged
(they only call `pnpm capacitor:*` from root).
- `@capacitor/cli` and `@capacitor/assets` moved from root devDeps
to `standalone/webapp/devDependencies` (where `cap` and
`capacitor-assets` actually run).
- Root `@types/node` now references the catalog.
Local feedback loop
- `.husky/pre-push` runs `pnpm run lint` before pushes — catches
eslint errors before they burn a CI run.
- `lint-staged` extended: `*.{ts,tsx,js,jsx,mjs,cjs}` now runs
`prettier --write` AND `eslint --fix --no-warn-ignored` on
staged files (was prettier-only). Pre-commit feedback in
~1 sec/file instead of waiting for CI.
CI hardening (from round-4 server audit)
- `pr-health-checks.yml` already had publint+attw added in a prior
push; size-limit step + React 19 matrix job round it out.1 parent 9b9bd23 commit 2b64efa
13 files changed
Lines changed: 5131 additions & 8332 deletions
File tree
- .github/workflows
- .husky
- library
- lib
- components/popovers/bpmnDiagram
- nodes/sfcDiagram
- utils
- standalone/webapp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
202 | 251 | | |
203 | 252 | | |
204 | 253 | | |
| |||
258 | 307 | | |
259 | 308 | | |
260 | 309 | | |
| 310 | + | |
261 | 311 | | |
262 | 312 | | |
263 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | | - | |
35 | 30 | | |
36 | 31 | | |
37 | | - | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
| |||
59 | 53 | | |
60 | 54 | | |
61 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | | - | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
| 32 | + | |
36 | 33 | | |
37 | 34 | | |
38 | | - | |
39 | | - | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
60 | 55 | | |
61 | 56 | | |
62 | 57 | | |
63 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
| |||
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
| 145 | + | |
| 146 | + | |
127 | 147 | | |
128 | 148 | | |
129 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | | - | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
| 65 | + | |
| 66 | + | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
0 commit comments