Hide runtime tree from feature APIs - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors runtime-tree plumbing so feature/panel/view APIs no longer accept or return list<state_entry>, and instead operate against a narrower component_runtime capability owned at the app boundary via runtime_frame. It centralizes render transitions with run_runtime_render(...) and enforces sequential runner execution to avoid nested runtime write-back overwriting child store updates.
Changes:
- Replace
runtime_tree_hostwithcomponent_runtimeand update component runners to read/write component state entries via the effect. - Introduce
run_runtime_render(...)to threadruntime_framethrough rendering in one place (browser host + test harnesses). - Remove parent view “inspection” of child local stores; move raw runtime-tree inspection into test-only helpers and add regression coverage.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new runtime ownership boundary and parent/child local-state rule. |
| PLAN.md | Updates the plan notes to match the new runtime threading and sequencing approach. |
| explore/react/state.kk | Introduces component_runtime, updates runner plumbing, removes tree-carrying helpers. |
| demo/view.kk | Refactors app rendering to rely on component_runtime instead of explicit runtime-tree args/returns. |
| demo/todopanel.kk | Updates Todo panel runner to use run_stateful_component under component_runtime. |
| demo/todo/state.kk | Removes runtime-tree snapshot helpers in favor of current-store APIs. |
| demo/tests/todocases.kk | Switches Todo tests to test-support inspection helpers. |
| demo/tests/support.kk | Adds test-only inspection helpers and refactors harness rendering via run_runtime_render. |
| demo/tests/labcases.kk | Updates Lab tests to use run_runtime_render + inspection helpers. |
| demo/tests/basics.kk | Updates registry tests for the new render threading; adds app runtime regression test. |
| demo/tests/appharness.kk | Refactors app harness rendering through run_runtime_render. |
| demo/tests.kk | Registers the new regression test case. |
| demo/runtimeframe.kk | Adds run_runtime_render(...) to centralize render transitions at the app boundary. |
| demo/layout.kk | Refactors layout/stage routing to run panels sequentially under component_runtime. |
| demo/labpanel.kk | Updates Lab panel runner to avoid explicit runtime-tree plumbing. |
| demo/lab/view.kk | Removes parent view aggregation that depended on reading child local store state. |
| demo/lab/state.kk | Removes runtime-tree read helpers in favor of current-store APIs. |
| demo/effectspanel.kk | Updates Effects panel runner to use run_stateful_component under component_runtime. |
| demo/dialogs.kk | Moves dialog runtime reconciliation into component_runtime rather than returning updated trees. |
| boilerplate/browserapp.kk | Threads runtime via run_runtime_render in commit/boot paths to keep runtime ownership centralized. |
| Agents.md | Documents the updated rules for runtime-tree exposure and runner sequencing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
runtime_tree_hostplumbing with a focusedcomponent_runtimecapabilitylist<state_entry>run_runtime_renderso browser and test hosts thread the runtime frame in one placeValidation
yarn test:koka: 55 / 55 passyarn build