Skip to content

Hide runtime tree from feature APIs - #4

Merged
tiye merged 1 commit into
mainfrom
codex/hide-runtime-tree
Aug 23, 2026
Merged

Hide runtime tree from feature APIs#4
tiye merged 1 commit into
mainfrom
codex/hide-runtime-tree

Conversation

@tiye

@tiye tiye commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the exposed runtime_tree_host plumbing with a focused component_runtime capability
  • make feature panel and view APIs accept typed models only, without taking or returning list<state_entry>
  • add run_runtime_render so browser and test hosts thread the runtime frame in one place
  • run feature components and the app shell sequentially against the same runtime capability, preventing nested runner write-back from overwriting child store updates
  • remove unused tree-carrying component tuple helpers and one-line panel wrappers
  • stop the Lab parent view from inspecting child draft stores for summary chips
  • move raw component-state inspection helpers into test support
  • document the runtime ownership boundary and parent/child state rule

Validation

  • yarn test:koka: 55 / 55 pass
  • yarn build
  • browser regression: Todo editor draft survives Todo → Lab → Todo; Lab draft and expanded state survive Lab → Todo → Lab; no browser warnings/errors

Copilot AI lite review requested due to automatic review settings August 23, 2026 17:56
@tiye
tiye merged commit 304610f into main Aug 23, 2026
2 checks passed
@tiye
tiye deleted the codex/hide-runtime-tree branch August 23, 2026 17:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_host with component_runtime and update component runners to read/write component state entries via the effect.
  • Introduce run_runtime_render(...) to thread runtime_frame through 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.

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.

2 participants