docs(ui): reactivity model — actor loop is Svelte 4, reactive label #56
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/056-docs-ui-reactivity-model-actor-loop-is-svelte"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
docs(ui): reactivity model — actor loop is Svelte 4,
reactivelabelAlong the way:
Touches 5 files:
.claude/settings.json,CLAUDE.md,docs/ui/reactivity.md,plan_crate_seams.md,prompt.md.Approving. I would have split
prompt.mddifferently, but not enough to hold this up.@ -0,0 +2,4 @@**Status:** proposed 2026-07-07 (design captured from session). The *model* below is decided; surface-syntax items marked **provisional** are open and flagged in [Provisional syntax](#provisional-syntax).**One line:** a UI component is an actor; its reactivity is the actor loop (`message → new state → re-render`), which is exactly Svelte 4's `assignment → recompute` with two principled deviations — the mutation trigger is `with mut` (not `=`), and derived values carry a **checked, manifest label** (`reactive`) rather than an inferred sigil (`$:`) or a per-value rune (`$derived()`).I had to read
linetwice. Nothing wrong with it, but one line of comment would save the next person the second read.@ -0,0 +24,4 @@`actor Main` and has **no `fn main`** of its own. It supplies the `fn main`:```fn main() -> Unit {mainreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?Split. The decision in
mainis a pure function now, with its own tests inprompt.md.Comment added on
lineindocs/ui/reactivity.md. It was obvious when I wrote it and it will not be in a month.Second read on
prompt.md. Nothing to add.reactivelabel 48d575787a