发布渐进式组件作者 API / Publish a progressive component authoring surface - #16
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR formalizes a progressive-disclosure component authoring surface for Respo by (1) documenting the “normal path” as elements, keyed components, typed stores/actions, and effects, and (2) physically separating advanced host/testing functionality into dedicated modules (explore/react/runtime and explore/react/inspection) so business views can stay on core/action/state.
Changes:
- Add bilingual authoring docs: a task-oriented quick start and a one-page component author API reference.
- Split advanced implementations out of authoring modules: move snapshot transport + callback/effect runners to
runtime, and read-only VDOM/registry/runtime queries toinspection. - Update tests/boilerplate/docs to import the new advanced modules explicitly, and refresh repository guidance (README/PLAN/Agents) to match the new boundaries.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds “start with component authoring” entry path and updates module map to include runtime/inspection and new docs. |
| PLAN.md | Updates the module-splitting plan/status to reflect the completed authoring vs advanced-module separation. |
| Agents.md | Updates the onboarding flow and codifies the “business views only import core/action/state” boundary. |
| explore/react/core.kk | Removes test/devtools VDOM query helpers from the authoring core surface. |
| explore/react/state.kk | Removes host/testing-oriented runtime/inspection helpers from the authoring state surface. |
| explore/react/runtime.kk | Introduces host-only runtime module for registered callback execution, scheduled effects, and snapshot transport. |
| explore/react/inspection.kk | Introduces inspection module for read-only VDOM, event-registry, and runtime-tree queries for tests/devtools. |
| docs/quick-start.md | Adds bilingual quick start that teaches the four authoring concepts via a cohesive FAQ feature example. |
| docs/component-authoring.md | Adds bilingual one-page “preferred author API” inventory and clearly documents advanced-module audiences. |
| demo/tests/support.kk | Updates test harness utilities to import and use runtime/inspection helpers explicitly. |
| demo/tests/basics.kk | Updates tests to use moved runtime/inspection APIs (registered handlers, snapshot helpers, vnode queries). |
| demo/tests/todocases.kk | Imports runtime/inspection for snapshot/inspection helpers used in todo tests. |
| demo/tests/statecases.kk | Imports runtime/inspection for snapshot/inspection helpers used in state tree tests. |
| demo/tests/labcases.kk | Imports inspection for registry/vnode queries used in lab tests. |
| demo/tests/dialogcases.kk | Imports inspection for registry/vnode/runtime-tree queries used in dialog tests. |
| demo/tests/appharness.kk | Imports runtime/inspection for harness-level snapshot/handler execution and inspection calls. |
| boilerplate/browserapp.kk | Updates the browser host to import runtime/inspection for snapshot transport and registry warnings/queries. |
💡 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.
中文
目标
让第一次使用 Respo 的组件作者先通过 elements、keyed components、typed stores/actions 和 effects 四个概念完成日常开发,而不必先理解 state entries、registry、snapshot transport 或 runtime handler。
改动
core/state移到explore/react/inspection。state移到explore/react/runtime。core/action/state;host 与 tests 显式导入 advanced modules,没有增加 re-export facade 或单行 forwarding wrapper。验证
yarn test:koka:70 / 70 通过。yarn check:Koka 编译与 Vite production build 通过。Review 重点
关联 issue:#13
English
Goal
Let a first-time Respo component author complete everyday work through four concepts—elements, keyed components, typed stores/actions, and effects—without first learning about state entries, registries, snapshot transport, or runtime handlers.
Changes
core/statetoexplore/react/inspection.statetoexplore/react/runtime.core/action/state; hosts and tests import advanced modules explicitly, with no re-export facade or one-line forwarding layer.Verification
yarn test:koka: 70 / 70 passed.yarn check: Koka compilation and the Vite production build passed.Review focus
Closes #13