Skip to content

Bump to MobX 6 with decorators kept (#146) - #190

Merged
jtklein-agents merged 3 commits into
spec/118-page-store-mobx-7from
146-bump-mobx-6-decorators-kept
Nov 15, 2026
Merged

jtklein-agents merged 3 commits into
spec/118-page-store-mobx-7from
146-bump-mobx-6-decorators-kept

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #146

Summary

 package.json
-  mobx ^5.15.7, mobx-react-lite ^2.2.2, mobx-utils ^5.6.2, computed-async-mobx
+  mobx ^6.16.0, mobx-react-lite ^4.1.0, mobx-utils ^6.1.0

 src/app/store/*  (every decorated class)
   constructor
+    makeObservable( this )
-  @computed / @action          on OutGroup.setValue, RaxmlNgModelASC.notAvailable, MultistateNumber.error
+  @override

 src/app/
+├── promisedComputed.js   # replaces computed-async-mobx, used by Run.outputNameAvailable

 class fields: define semantics in .babelrc, electron.vite.config.js, jest/babelTransform.js, tsconfig.json

MobX 6 behaviour changes handled:

 reaction( () => alignment.length,
-  ( length, reaction ) => { reaction.dispose(); ... }
+  ( length, _previous, reaction ) => { reaction.dispose(); ... }

 StoreBase
-  dispose = () => {...}     // field clashed with Alignment's decorated dispose
+  dispose() {...}

computed-async-mobx 7 mixes decorators with annotations, which MobX 6 rejects, so the run uses the local helper. jest/setup.js gives the default test bridge a checkOutput. scripts/typecheck-baseline.txt drops two stale App.test.js lines so the check exits 0.

Evidence

  • Before: Jest on the bumped deps: 35 suites failed, e.g. Cannot apply '@computed' to 'RaxmlNgModelASC.prototype.notAvailable' and makeObservable second arg must be nullish when using decorators.
    After: Jest 61 suites / 451 tests pass (coverage and parity tests included), yarn lint clean, typecheck:baseline exits 0, yarn test:e2e 3 passed.

Merge Danger

Door: two-way

Blast Radius: page store

Targets the spec feature branch, not master. Intermediate step: the app behaves as before, no panel changes.

🤖 Generated with Claude Code

jtklein-agents and others added 3 commits November 15, 2026 22:07
mobx 6.16 and mobx-react-lite 4.1; makeObservable( this ) in every decorated
class, override on the three subclass members that replace a parent's,
define semantics for class fields in Babel, Jest and tsconfig.

computed-async-mobx 7 mixes decorators with annotations, which MobX 6
rejects, so Run uses a small local promisedComputed on mobx-utils 6.
MobX 6 passes the previous value, not the reaction, as the second effect
argument; Partition's one-shot reaction takes the third. StoreBase.dispose
is a method so Alignment's decorated dispose does not redefine a field.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Jest types commit resolved them, so typecheck:baseline exited 1 on unused
baseline lines.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The spec branch lacks the Jest types, so CI still reports them; the local
node_modules came from master and hid them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit 4cde82a into spec/118-page-store-mobx-7 Nov 15, 2026
9 checks passed
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