Skip to content

Adds the branch library onboarding Path - #266

Merged
johnnyt merged 1 commit into
mainfrom
se-coxn-onboarding-path
Nov 23, 2026
Merged

johnnyt merged 1 commit into
mainfrom
se-coxn-onboarding-path

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 23, 2026

Copy link
Copy Markdown
Member

What this adds

The branch library onboarding: one Path that asks which branch is joining, lets it pick the integrations it needs, and runs the setup of each pick as a durable child execution of its own, on SQLite.

  • priv/fixtures/branch_onboarding.json and branch_onboarding_screens.json: the branch's own screens as myapp.step blocks, a multi-select whose answer options' values are the three setups' document ids, a core.foreach over responses.integrations, and inside it a core.subchart that names its child with chart_from: "setup_document" and declares the outcome done.
  • StatifierExamples.Library.Onboarding: the subchart host for this Path. resolve_chart/2 is the allow-list: it answers the three setups from Library.Setups.fetch_document/1, compiled through Charts.Subchart.child_compile/1, and :error for every other id, a shipped fixture's included, and for a value that is not a string. focus/1 answers which execution a page presents and presses: the active child, read through StatifierPersistence.Executions.active_children/2, with that setup's screens and Path and child: true, or the onboarding execution itself.
  • Charts.Durable hands a subchart invocation to that host when the invoking chart's content hash is the onboarding Path's, and to the shipped fixture list otherwise. Its chart resolver and its reading of another execution also know the onboarding Path and the three setups' child compiles.
  • Signup.Journey takes child: true beside path: and screens: to resume a durable child on the child compile.
  • /signup-journey?path=branch_onboarding: the URL keeps the onboarding execution's id; the page asks focus/1 before drawing and before each press or back request, sends it to the execution it names, and asks again after a press, so a finished setup moves the page on to the next pick or to the closing screen.
  • Library.Setups.outcomes/1 compiles through Charts.Subchart.child_compile/1, the one child recipe.

The dependency move

statifier_persistence moves to ~> 0.27 and mix.lock moves only its line, to 0.27.0, which keeps the statifier ~> 2.15 requirement. 0.27.0 starts a durable subchart child for every pass of a loop; with 0.26.0 the second pick adopted the first pick's finished child and the onboarding waited for good. The pin tables and the requirement sentences in the guides that name it move with it.

The feed's "Child chart started" row now derives the child's id the way the driver does: Linkage.child_execution_id/3 for a first pass, and Linkage.child_execution_id/4 with Linkage.invocation/1 when that id is held by an earlier pass's child that has ended. It derives it from the invoking execution, not the drive's own id, because a finishing child's drive starts its parent's next child.

Answer routing to the newest child, with the case statifier_persistence names as a known limit on a store whose child create and parent step commit apart: ruled by the operator, 2026-11-22. This app runs on SQLite and does not work round that limit; nothing here claims the routing is exact on it.

Two fixes on this path

  • A finishing child's drive answers its parent, and the parent's step runs inside that drive, so the parent's trace effects reached the child's reading and were folded against the child's chart, raising out of range in Charts.Execution.block_at/2. Execution.absorb/2 now leaves a trace point of another execution unfolded.
  • A durable child is created without tracing, so its reading after a press still named the state it was resumed on, and Journey.submit/4 and Journey.back/3 on a child answered the screen before the move. A drive's reading now ends on the settled position (Charts.Durable's rest), as a resume's does.

Decisions this carries

  • Back in the onboarding setup documents through a plain returnable host step type: ruled by the operator, 2026-11-22. Back works between a setup's own steps and between the onboarding's own screens; a setup's first step offers none, so Back never crosses into or out of a setup.
  • The subchart outcome subset: ruled by the operator, 2026-11-19. The chart_from block declares done, each setup's only root outcome.
  • The loop-child fix lives in statifier_persistence 0.27.0: ruled by the operator, 2026-11-22.

Tests

test/statifier_examples/library/onboarding_test.exs covers the allow-list (the three ids answered compiled; any other id refused), parent?/1, the first pick running as a child with the focus on it, a finished setup starting the next pick's child under the later pass's id with the feed naming it, both picks running to the closing screen, Back inside a setup and between the onboarding's screens, a trace of another execution leaving a reading unchanged, and a chart_from naming a document outside the three starting no child. test/statifier_examples_web/live/onboarding_journey_live_test.exs drives the page: the first screen, a pick presenting the child's screen, presses reaching the child and moving on, the closing screen, Back inside a setup, and a reload presenting the running setup. Each new test carries a one-line sabotage note, and each mutation was run and turned its test red on an assertion.

Provenance

  • The guides that name the version, and block_schema_test.exs, migrate_waiting_test.exs and mix_deps_test.exs change because the dependency move and the new screens document force them: the guides' pin tables, the loaded-version line the migrate command prints, the requirement and lock assertions, and the new screens document joining the list of element documents.
  • The reading fix in Charts.Durable's rest was not in the bead's file map; the child's presses and back requests the bead routes depend on it.

Gate: full mix quality green on SQLite before the commit, on the tree committed.

A branch picks the integrations it needs on a multi-select whose values
are the setups' document ids; a core.foreach walks the answer and a
core.subchart names each child with chart_from, so every pick runs its
setup as a durable child execution on SQLite. The onboarding's own
resolve_chart/2 answers the three setups and nothing else.

Onboarding.focus/1 reads the active child through the active-children
reader of statifier_persistence, and the Journey page presents that
child's screen and sends its presses and back requests there.

statifier_persistence moves to 0.27.0, which starts a child for every
pass of a loop; the feed derives a later pass's child id the same way.
A parent's trace reaching a finishing child's reading is no longer
folded against the child's chart, and a drive's reading ends on the
settled position, so an untraced child's view names where it rests.

Refs: se-coxn
@johnnyt
johnnyt merged commit d54f5c5 into main Nov 23, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-coxn-onboarding-path branch November 23, 2026 12:23
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