feat(page): connect the page.effect verb to a host-effect registry - #286
Merged
Conversation
This was referenced Aug 6, 2026
Hosts register named effects from their extension client factory
({name, description, set, enabled}); the mount collects them off the
mounted extension instances exactly like client tools and hands them to
the dom page driver, which exposes them on the client tool ctx. The
page.effect body drives them for real: enable/disable/toggle/start/stop
flip an effect, report reads it, list names what exists, and an unknown
name fails with the declared UNKNOWN_EFFECT error. The highlight
inspector in the conciv app is the first registered effect, and the
declaration now advertises the real capability (mutating, honest output
union) instead of the documented stub.
Closes #227
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…owner, list rejects effect arg, report covers disabled - makeDomPageDriver.dispose() now calls effect.set(false) for every effect left enabled, so host-DOM-mutating effects can't leak past widget/driver teardown. - collectClientEffects warns naming both the kept and dropped extension when a later extension declares a colliding effect name. - page.effect action:list now rejects a passed effect name as invalid-args instead of silently ignoring it. - Adds the missing report-on-disabled-effect matrix cell. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
omridevk
force-pushed
the
effect-verb-227
branch
from
August 7, 2026 07:26
612f7da to
04a8ddb
Compare
Closed
8 tasks
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.
Stacked on #284; retarget after it merges.
Closes #227
What
The
page.effectverb was a permanent stub (effects not initialized). It now drives real host-registered effects:client()factory may returneffects: [{name, description, set(enabled), enabled()}]alongsidevalue/dispose. The mount collects them off the mounted extension instances (collectClientEffects, mirror ofcollectClientTools), hands them tomakeDomPageDriver({tools, effects}), and the dispatcher exposes them onClientToolCtx.effects. No window globals, no module-level state — effect state lives in the factory closure, per mount.enable/start,disable/stop,toggle,report,list(default). Unknown name fails with the declaredUNKNOWN_EFFECTerror naming what is registered; a driving action without--effectisinvalid-argspointing atlist.highlight; Alt-hold and effect-driven activation share one derivedactive(), and Escape clears both.mutating: true(enable/disable change page presentation, so calls journal like other edits), a strict output union, and the declared error code. The CLI derivesconciv page effect --effect X --action Yfrom this signature unchanged.Tests
packages/extensions/page/test/effects.browser.test.ts): enabling a registered effect visibly changes the page, disable reverts, toggle flips, start/stop alias, list reports with per-name dedupe, unknown name = declared error — replaces the stub schema-parse test.page-dispatch-boot.it.test.ts): end-to-end over the real widget bundle —page.effect enable highlightshows the inspector overlay on the host page, disable removes it, toggle flips, unknown rejects withUNKNOWN_EFFECT.🤖 Generated with Claude Code