Skip to content

effect/ui: onMount without a message and with an input, head props, field values, Redacted state, View.Input requirements - #10600

Merged
tim-smart merged 3 commits into
agent/architect/dda317b8e7e4from
agent/nelson/52ce529c7cd8
Nov 13, 2026
Merged

tim-smart merged 3 commits into
agent/architect/dda317b8e7e4from
agent/nelson/52ce529c7cd8

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

Fixes six gaps a user of the effect/ui branch reported. Each fix follows the solution agreed on the issue.

  • onMount without a message. run may end with undefined, which sends nothing and logs no Update. A component with message: Schema.Never no longer needs Effect.never.
  • onMount with an input. .onMount(name, input, (node, changes) => ...): changes starts with the current input and gives each new one that differs by Equal. It is backed by a sliding PubSub (capacity 1, replay 1), so a slow reader gets only the latest value. The mount still runs once and its Scope still survives patches. Re-running the mount on change was rejected, because the old Scope's close doesn't wait. The input sits in View.Mount.input, so a story can check it.
  • head gets props. head(model, props, loaded) now matches subscriptions. This is a positional break for (model, loaded) callers. The ai-docs NotePage fixture is updated.
  • Field values in tests. Query.Node gains props, and HtmlQuery.value(node) / HtmlQuery.checked(node) read the property before the attribute, on story views, TestHost trees and the DOM.
  • Schema.Redacted in state. An instance whose Model, or whose loader success, error or args Schema, holds a Redacted is never serialised. The server defers it, history.state keeps no entry for it, and decoding is refused, so older state isn't adopted. The server logs one warning per component. holdsRedacted moved to internal/schemaRedact.ts so MessageLog and the runtime share it. The loader cache's own path into the HTML (~loader) is EFF-3763, and this PR doesn't touch reactivity/Loader.ts.
  • View.Input<Msg, R = never>. A child that needs a service no longer erases requirements through a helper typed with View.Input<Msg>: it is rejected at the call site, and a generic tuple helper infers its R. View.Requirements<any> is any.

Known limit, recorded in the spec: a running mount can't send messages as it goes.

Closes EFF-3762

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 72321c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-amazon-bedrock Patch
@effect/ai-anthropic Patch
@effect/ai-cloudflare Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/ai-typesafe Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-cloudflare Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/graphql-generator Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…tmlQuery field values, View.Input requirements
publishUnsafe drops a value when the capacity-one buffer is full, so a reader
busy across two renders got the first. publish slides it out.
@tim-smart
tim-smart force-pushed the agent/nelson/52ce529c7cd8 branch from 04f9385 to 72321c3 Compare November 13, 2026 10:30
@tim-smart
tim-smart merged commit d213a76 into agent/architect/dda317b8e7e4 Nov 13, 2026
@tim-smart
tim-smart deleted the agent/nelson/52ce529c7cd8 branch November 13, 2026 10:53
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.

1 participant