Respo / Respo/explore-react.koka
提供只读 action/store 调试面板 / Provide a read-only action/store inspector
Nobody has claimed this yet.
- Dominant language
- Koka
- Stars
- 1
- Forks
- 0
- Avg merge
- 20h 41m
- Merged PRs (30d)
- 15
Description
中文
用户问题
typed actions 已经有 observation envelope,但普通开发者目前主要依赖浏览器 console 日志理解“哪个组件发出了什么 action、目标是谁、是否是 domain/component intent”。在复杂交互或 agent integration 前,缺少一个安全、可读的调试入口。
目标
提供 dev-only action/store inspector,以序列化只读信息展示最近 actions 与已公开 targets,帮助用户理解组件行为,同时不暴露 raw runtime tree 或 closure。
范围
- 在 catalog/validated dispatch 安全边界明确后,展示 action source、target、schema/version 与 payload preview。
- 区分 domain action、component store action 与不可投递 capability。
- 提供清空、筛选和复制安全 envelope 的最小体验。
- 默认只在开发模式启用,不改变生产组件 props。
- 文档说明 observation 是 intent,而不是 effect commit。
验收标准
- 用户能在浏览器内追踪 Todo/Lab 的真实 typed action 顺序。
- inspector 只消费序列化只读数据,不读取 raw
state_entry或 closure。 - inspector 不允许绕过 reducer 直接写 component state。
- 关闭 inspector 时业务行为与 bundle bridge 保持不变。
- Koka tests 与浏览器交互回归通过。
非目标
- 完整时间旅行调试器。
- 自动 replay 外部 effects。
- 远程 agent 权限 UI 或身份认证。
- 将 component snapshot 当作业务数据库。
English
User problem
Typed actions already have observation envelopes, but ordinary developers mainly rely on browser console logs to understand which component emitted an action, its target, and whether it is a domain or component intent. Before interactions and agent integration grow more complex, the project lacks a safe and readable debugging entry point.
Goal
Provide a development-only action/store inspector that shows recent actions and published targets as serialized read-only information. It should help users understand component behavior without exposing the raw runtime tree or closures.
Scope
- After the catalog/validated-dispatch safety boundary is defined, display action source, target, schema/version, and a payload preview.
- Distinguish domain actions, component-store actions, and non-dispatchable capabilities.
- Provide a minimal clear, filter, and safe-envelope copy experience.
- Enable it only in development by default without changing production component props.
- Document that observation represents intent rather than effect commit.
Acceptance criteria
- A user can trace the real typed-action order from Todo and Lab in the browser.
- The inspector consumes only serialized read-only data and never reads raw
state_entryvalues or closures. - The inspector cannot bypass reducers to write component state directly.
- Disabling the inspector leaves business behavior and the bundle bridge unchanged.
- Koka tests and browser interaction regression pass.
Non-goals
- A complete time-travel debugger.
- Automatic replay of external effects.
- Remote-agent permission UI or authentication.
- Treating component snapshots as a business database.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the catalog/validated-dispatch safety boundary and inspect the existing typed-action observation envelopes. Use the Todo and Lab browser flows to identify the action order and published targets, then run the Koka tests and browser interaction regression. Done means a development-only, serialized read-only inspector with clear, filter, and safe-envelope copy behavior that does not alter production behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- devtools, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100