Skip to content

refactor on listener#2

Open
tiye wants to merge 32 commits into
mainfrom
listener
Open

refactor on listener#2
tiye wants to merge 32 commits into
mainfrom
listener

Conversation

@tiye
Copy link
Copy Markdown
Member

@tiye tiye commented May 19, 2026

No description provided.

@tiye tiye requested review from a team and Copilot May 19, 2026 11:32
Copy link
Copy Markdown

Copilot AI left a comment

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 Respo’s event/listener architecture to use a single listener registration effect with semantic (name-based) identity, while also introducing higher-level VDOM construction helpers to reduce boilerplate across demo views and tests.

Changes:

  • Unify local listener registration behind register_listener(...) and add framework-side warnings for duplicate ids / semantic drift.
  • Add node_props + helper constructors (node_class, text_class, button_class, text_input, etc.) and update demo UI code to use them.
  • Extend tests and docs/plan to cover the new listener semantics and registry guardrails; log warnings at runtime.

Reviewed changes

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

Show a summary per file
File Description
README.md Updates docs to describe semantic listener identity, unified registration, and new helper APIs.
PLAN.md Updates project plan/module map to reflect listener registry guardrails and new view helpers.
koka/respo/state.kk Implements register_listener, semantic-name tracking, registry merging + warning generation utilities.
koka/respo/renderer.kk Updates listener rendering/equality to use typed dom_event_kind.
koka/respo/core.kk Introduces dom_event_kind, node_props, and higher-level node helper constructors.
koka/demo/todo/view.kk Migrates todo UI rendering to new helper constructors and unified listener effect.
koka/demo/testspanel.kk Migrates test panel rendering to new helper constructors.
koka/demo/tests/statecases.kk Adds regression test for listener registry guards and updates imports accordingly.
koka/demo/tests/basics.kk Updates render snapshot construction and listener slot usage for typed event kinds.
koka/demo/tests.kk Adds the new listener registry guard test to the test suite.
koka/demo/shared.kk Refactors shared UI helpers (panel, summary_chip) to use new constructors.
koka/demo/routebar.kk Refactors route bar rendering to use new constructors.
koka/demo/layout.kk Refactors layout rendering to use new constructors and keeps registry composition.
koka/demo/lab/view.kk Migrates lab UI rendering to new helper constructors and unified listener effect.
koka/demo/effectspanel.kk Migrates effects panel rendering to new helper constructors.
koka/app.kk Logs listener registry warnings during boot and commit, and checks semantic drift across commits.
.gitignore Adds blog/* to ignored paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread koka/respo/renderer.kk Outdated
Comment thread koka/app.kk Outdated
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