Skip to content

Convert the run list to an annotation map #153

Closed

Description

@jtklein-agents

Parent

#118

What to build

One family of the page store declares its observable fields, computeds and actions in a plain annotation map instead of decorators: the run list. A family converts as a unit because decorators and annotation maps cannot be mixed within one inheritance chain.

The replacement pattern, fixed by the spec (trimmed from the prototype):

class Option {
  value;
  constructor( run, defaultValue /* … */ ) {
    this.defaultValue = defaultValue;
    this.value = defaultValue;
    makeObservable( this, {
      value: observable,
      setValue: action,
      reset: action,
      isDefault: computed,
      error: computed,
    } );
  }
  setValue( value ) { /* … */ }
}

class OutGroup extends Option {
  constructor( run ) {
    super( run, ['<none>'], 'Outgroup', '' );
    makeObservable( this, {
      options: computed,
      setValue: override, // replaces the parent action
      cmdValue: computed,
    } );
  }
  setValue( value ) { /* … */ }
}

Cut the worktree from the spec's feature branch spec/118-page-store-mobx-7 and open the pull request into it.

Acceptance criteria

  • No decorator remains on the run list.
  • Each of these classes that has observable members calls makeObservable with an explicit annotation map in its constructor. A class that needs the call and has no constructor gets one. A subclass with no observable members of its own gets no call.
  • makeAutoObservable is used nowhere.
  • An action stays an arrow field where it is passed unbound; where a subclass replaces an action, actions are prototype methods.
  • A subclass that replaces a parent's action or computed annotates it override.
  • The parity test passes with its baseline unchanged.
  • No test triggers a MobX action warning.
  • Panels and behaviour are unchanged.
  • Jest, lint, the typecheck baseline check and the end-to-end suite pass.

Activity

  1. added
    ready-for-agent
    on Nov 14, 2026
  2. added a commit that references this issue on Nov 15, 2026
  3. jtklein-agents commented on Nov 15, 2026

    @jtklein-agents
    OwnerAuthor

    Merged in #197 (also converted AppStore, which shares the inheritance chain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions