Skip to content

Observe domain and component actions through one envelope - #5

Merged
tiye merged 2 commits into
mainfrom
codex/action-observation
Aug 29, 2026
Merged

Observe domain and component actions through one envelope#5
tiye merged 2 commits into
mainfrom
codex/action-observation

Conversation

@tiye

@tiye tiye commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • add a shared serializable action codec, envelope, and Algebraic Effect observation boundary
  • emit ordered observations from route/domain dispatch and component stores without exposing runtime-tree details to views
  • let the browser log observed actions while tests and internal harnesses can capture or discard them explicitly
  • document intent-log semantics and defer replay until permissions, idempotency, and external-effect handling are defined

Verification

  • yarn test:koka (56/56)
  • yarn build
  • yarn check
  • browser smoke: route action logged, Todo domain -> component order verified, 56/56 UI checks, no console errors

Copilot AI lite review requested due to automatic review settings August 23, 2026 18:20

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 introduces a unified, serializable action observation stream across both domain dispatch and component stores, using a shared action_envelope and an Algebraic Effect boundary so hosts (browser/tests) can capture or discard ordered action observations without exposing runtime-tree details to views.

Changes:

  • Added explore/react/action.kk with shared action_codec, action_envelope, action_observation, and capture_actions(...).
  • Wired observation emission into typed component stores (use_store / dispatch_store) and domain dispatch paths (route/todo/lab), plus added an observed runtime entrypoint (run_runtime_action_observed).
  • Updated tests and documentation to validate codec round-trips and the domain -> component observation order.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents the unified action observation envelope and semantics.
PLAN.md Updates plan to reflect observation completion and future replay policy work.
Agents.md Adds repo conventions for action observation usage and semantics.
explore/react/action.kk New shared action codec/envelope + observation effect + capture helper.
explore/react/state.kk Emits component action observations from stores; shifts store action encoding to action_envelope.
library/route.kk Simplifies route decoding API and removes now-redundant helper.
demo/model.kk Introduces observed route dispatch and a route action codec.
demo/runtimeframe.kk Adds observed runtime action runner and updates non-observed path to discard.
demo/routebar.kk Routes navigation through observed route dispatch (domain action).
demo/todo/events.kk Adds todo domain action codecs and emits domain observations during dispatch.
demo/todo/state.kk Propagates action_observation through task editor dispatch API.
demo/lab/events.kk Adds lab domain action codec and emits domain observations during dispatch/routing.
demo/lab/state.kk Propagates action_observation through incident local-store dispatch API.
demo/lab/workflow.kk Propagates action_observation through workflow dispatch path.
demo/labpanel.kk Propagates action_observation through lab panel event routing APIs.
demo/tests/support.kk Updates harness helpers to handle/ignore action_observation where appropriate.
demo/tests/todocases.kk Verifies store protocol still holds and adds unified observation ordering test.
demo/tests/statecases.kk Updates malformed action decoding tests to use action_envelope.
demo/tests/labcases.kk Adjusts workflow test setup to accommodate observation handling.
demo/tests/basics.kk Adds observation capture assertions around route normalization and ensures test host is installed.
demo/tests.kk Registers the new unified observation test in the test suite.
boilerplate/browserapp.kk Logs observed actions from event dispatch alongside existing listener warnings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread explore/react/action.kk
Comment thread demo/runtimeframe.kk Outdated
@tiye
tiye merged commit aaeb0d2 into main Aug 29, 2026
1 check passed
@tiye
tiye deleted the codex/action-observation branch August 29, 2026 16:10
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