Skip to content

Move the page store to MobX 7 annotation maps - #504

Merged
jtklein merged 98 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/118-page-store-mobx-7
Nov 16, 2026
Merged

jtklein merged 98 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/118-page-store-mobx-7

Conversation

@jtklein-agents

Copy link
Copy Markdown
Contributor

Summary

The page store moves from MobX 5 legacy decorators to MobX 7 with mobx-react-lite 5. Each store class declares its observables, computeds and actions in an annotation map. Spec: jtklein-agents#118.

 package.json
-  mobx ^5.15.7, mobx-react-lite ^2.2.2, mobx-utils ^5.6.2
+  mobx ^7.1.7,  mobx-react-lite ^5.1.3, mobx-utils ^6.1.0
-  @babel/plugin-proposal-decorators
 .babelrc                      (deleted)
 electron.vite.config.js       decorator compile step removed
 tsconfig.json                 decorator flag removed
 src/main/menu/subMenuFile.ts  main-process workaround note removed

 src/app/store/
   Run.js, Alignment.js, Partition.js   @observable/@computed/@action -> makeObservable(this, {...})
+  RunOptions.js, AlignmentOptions.js, PartOptions.js, FinalAlignment.js, FinalPartition.js
   Citation.js, Config.js, RunList.js, AppStore.js, ...  annotation maps
 src/app/promisedComputed.js   slimmed: no busy, no ok/failed wrapping, no private MobX guard
steps (each its own PR into the feature branch)
  page store tests written on MobX 5 (coverage push)
  fix out-of-action writes -> MobX 6, decorators kept
  Jest fails on any MobX action warning
  convert every class to an annotation map
  MobX 7 + mobx-react-lite 5
  remove main-process workaround, decorator plugin, parity test

Evidence

  • Before: MobX 5 decorators, decorator compile step in four configs, 92 of 181 page-store computeds and 54 of 93 actions run under Jest.
    After: no decorators, no decorator config; the page-store tests (about 5,000 added lines under src/app/store/*.test.js) pass on MobX 7, and jest/mobxActionWarning.js fails any test that triggers a MobX action warning.
  • CI on the feature branch tip: lint success, release (ubuntu-24.04) success, release (windows-latest) success, release (macos-15) cancelled (not a failure; re-run before merge).

Merge Danger

Door: two-way

Revert the merge to return to MobX 5 and decorators.

Blast Radius: page state

Every panel reads the page store, so a missed annotation would show as a panel that does not update or a wrong command preview. Jest constructs every store class, and the end-to-end specs run on macOS, Ubuntu and Windows. The branch is one commit behind upstream/master (#499); that commit touches nothing in the page store.

🤖 Generated with Claude Code

jtklein-agents and others added 30 commits November 15, 2026 00:08
The 24 Option and tree-file subclasses and the constants they read
(binaries, analysis option lists, CPU count, RAxML settings aliases)
move verbatim from Run.js to RunOptions.js, so the run and its options
can be covered and converted in separate tickets. Run imports what it
uses; RunOptions never imports Run. Typecheck baseline paths updated.

Closes #119

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
import/no-cycle turns the spec's no-circular-import criterion into a
lint error (src has none today). typecheck-baseline.js --rename <old>
<new> repoints baseline entries after a pure file move, refusing any
entry with no same-message diagnostic at the new path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to-one-module-per-class-family

Split the run file into one module per class family
FinalAlignment moves verbatim to FinalAlignment.js, and the raxml-ng
model options and MultistateNumber move verbatim to AlignmentOptions.js,
so each family can be covered and converted in its own ticket.
Alignment.js keeps only Alignment and imports its option classes;
neither new module imports Alignment. Run imports FinalAlignment from
its new module. Typecheck baseline entries repointed with --rename.

Closes #120

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the part option classes to PartOptions.js and FinalPartition to
FinalPartition.js; Part and Partition stay in Partition.js. Pure move.

Closes #121

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@babel/preset-env pulls in a placeholder build of
@babel/plugin-proposal-private-property-in-object, which yarn nests under
babel-preset-react-app; that copy prints a ten-line warning on every lint
run. A resolution to 7.21.11 dedupes it to the real plugin already in
devDependencies, so lint output is just the lint result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ile-into-one-module-per-class-family

Split the partition file into one module per class family
#121 moved FinalPartition out of Partition.js; FinalAlignment still
imported it from there, breaking the build after the spec merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins today's behaviour of Citation and Config through the page store:
each citation format's text, allText following format, show/hide,
clipboard copy, dark mode loading, switching and menu events, and
dispose. Bridge stub lives in the test file.

Closes #124

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin Option's actions, computeds and value reactivity before the MobX 7 rewrite.

Closes #123

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
darkMode.test.js and the light/dark case in menu.test.js assert what
citationConfig.test.js asserts through the page store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eslint exits 0 on warnings, so the CI lint job let them through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ile-into-one-module-per-class-family

Split the alignment file into one module per class family
Pins today's behaviour of AppStore and RunList: every action and
computed, a reaction per observable field, adding, removing and
switching runs, and independent state between two runs.

Closes #125

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-config-on-mobx-5

Cover the citation and config on MobX 5
…-on-mobx-5

Cover the option base on MobX 5
…nd-run-list-on-mobx-5

Cover the app store and run list on MobX 5
Replaces the 'shows an input file in its folder' test in
showItemInFolder.test.js, now covered by InputFile.test.js.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tests pin the alignment's computeds, actions, observable fields, parsed-alignment
loader and model selection start, success, failure and cancel (#127).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jtklein-agents and others added 28 commits November 15, 2026 23:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tion-warning

Jest fails a test on a MobX action warning
)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AppStore converts with it: its decorators and the run list's map cannot
share an inheritance chain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…154)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The run list converts with it: a decorated subclass cannot sit under a
parent that passes an annotation map, so the two convert as one unit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-an-annotation-map

Convert the config to an annotation map (#149)
…nt-annotation-map

Convert the final alignment to an annotation map (#150)
…partition-final-partition

Convert the part, partition and final partition to annotation maps
…-file-alignment-astral-tree

Convert the input file, alignment and ASTRAL tree to annotation maps
…-to-annotation-maps

Convert the Option family to annotation maps (#155)
…-to-an-annotation-map

Convert the app store to an annotation map (#152)
…to-an-annotation-map

Convert the run list to an annotation map (#153)
Replace the run's decorators with a makeObservable annotation map.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-annotation-map

Convert the run to an annotation map
observable.ref becomes observableRef. mobx-utils 6.1.1 works on MobX 7
despite its ^6 peer range; no new action warnings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The menu already updates the page through the renderer bridge; the note described a workaround that no longer exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…react-lite-5

Bump to MobX 7 and mobx-react-lite 5
Remove the stale decorator note from the file menu
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Remove the decorator plugin and the TypeScript decorator flag
Closes #160

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t-and-its-baseline

Delete the parity test and its baseline
…MobX guard

busy was only read by one test. fromPromise already exposes rejection, so the
ok/failed wrapper is gone. The _getGlobalState guard used a private MobX API
that the MobX 7 bump could break. Adds a direct test for the shim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Slim promisedComputed: drop busy, ok/failed wrapping, private MobX guard
@jtklein
jtklein merged commit bd586b7 into AntonelliLab:master Nov 16, 2026
7 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.

2 participants