Repository navigation
Adds the branch library onboarding Path - #266
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonandbranch_onboarding_screens.json: the branch's own screens asmyapp.stepblocks, a multi-select whose answer options' values are the three setups' document ids, acore.foreachoverresponses.integrations, and inside it acore.subchartthat names its child withchart_from: "setup_document"and declares the outcomedone.StatifierExamples.Library.Onboarding: the subchart host for this Path.resolve_chart/2is the allow-list: it answers the three setups fromLibrary.Setups.fetch_document/1, compiled throughCharts.Subchart.child_compile/1, and:errorfor every other id, a shipped fixture's included, and for a value that is not a string.focus/1answers which execution a page presents and presses: the active child, read throughStatifierPersistence.Executions.active_children/2, with that setup's screens and Path andchild: true, or the onboarding execution itself.Charts.Durablehands 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.Journeytakeschild: truebesidepath:andscreens:to resume a durable child on the child compile./signup-journey?path=branch_onboarding: the URL keeps the onboarding execution's id; the page asksfocus/1before 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/1compiles throughCharts.Subchart.child_compile/1, the one child recipe.The dependency move
statifier_persistencemoves to~> 0.27andmix.lockmoves only its line, to 0.27.0, which keeps thestatifier ~> 2.15requirement. 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/3for a first pass, andLinkage.child_execution_id/4withLinkage.invocation/1when 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
Charts.Execution.block_at/2.Execution.absorb/2now leaves a trace point of another execution unfolded.Journey.submit/4andJourney.back/3on a child answered the screen before the move. A drive's reading now ends on the settled position (Charts.Durable'srest), as a resume's does.Decisions this carries
chart_fromblock declaresdone, each setup's only root outcome.Tests
test/statifier_examples/library/onboarding_test.exscovers 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 achart_fromnaming a document outside the three starting no child.test/statifier_examples_web/live/onboarding_journey_live_test.exsdrives 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
block_schema_test.exs,migrate_waiting_test.exsandmix_deps_test.exschange 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.Charts.Durable'srestwas not in the bead's file map; the child's presses and back requests the bead routes depend on it.Gate: full
mix qualitygreen on SQLite before the commit, on the tree committed.