Recursive AI

Changelog

All oneui Go docs

1.0.1

Fixed

  • Form submission in the reference document. A click on a submit button (a button of type submit or with no type or an unknown one, an input of type submit or image) now submits its form owner: the form's submit event is raised, bubbles, and can be cancelled, as in the HTML Standard. The form owner follows the form attribute; disabled controls and fieldsets, type=button and type=reset never submit; a required control without a value blocks submission (its invalid event is raised and it takes focus) unless the submitter has formnovalidate or the form has novalidate. Enter in a text-like field submits implicitly: through a click on the form's first submit button, or directly when the form has at most one such field and no submit button. Enter or Space on a focused submit button, and a click on a label for one, submit too. The click and the submit run as one user action, so they commit as one change set. invalid is now reported as an event that does not bubble (changeset.BubblesNot).
  • Browser backend: forms submit natively, so handlers see the browser's own submit event once; the bridge cancels the submission's navigation for a form with no action, so a form with on:submit no longer reloads the page.

Added

  • oneuitest.Page.Press(selector, key).

1.0.0 — 2026-12-05

The API as it stands for 1.0.

HTML rendering

  • oneui generate writes a RenderHTML(w io.Writer) error method on every component with a template, and oneui.RenderHTML(w, c) calls it for any oneui.Component (oneui.HTMLRenderer is the interface, oneui.ErrNotRenderable the error, tested with errors.Is). It writes the markup for the component's current state without nodes or change sets, for first paint and server-side rendering. The output is the reference document's serialisation after a mount, with a two-way binding's DOM property written as the HTML attribute with the same meaning (value, checked; a textarea's value as content), and U+00A0 written as the character. oneui.HTMLRenderer documents what it contains and when to mount instead.

Performance

  • Mounting a list roughly halves its allocations and time, and updating one row of a long keyed list no longer visits the others: a row whose item (a value type) and index are unchanged skips its row bindings, and a list whose keys did not change skips the reconcile. Rows and bindings take one allocation each, the context swaps its two change buffers instead of copying, and the reference document keeps nodes in a dense table. No API or protocol change.

Packages

  • oneui: the component runtime. Component is sealed on purpose: embed Base and implement Build and Update.
  • oneui/oneuitest: Mount(t, component) mounts a component in the reference document with a manual clock and returns a Page with Click, Type, Text, HTML and Advance. Each action applies what the component did and fails the test on an error.
  • oneui/changeset: change-set protocol 3, JSON and binary encodings, a constructor for each change kind (NewSetText, NewInsert, ...), bounded decoders (Limits).
  • oneui/dom: the reference document with selector and accessibility queries. dom.New(dom.WithMaxCommits(n)); Query returns an error wrapping ErrNotFound when nothing matches; a *Node has Click, Input, Dispatch and SetBox.
  • oneui/template: the template and stylesheet parser. Parse, ParseCSS and ParseInline return error; *template.Error wraps ErrSyntax, ErrorList holds several, Errors(err) lists them.
  • oneui/gen and the oneui command: gen is Generate, Input, Result, Diagnostic and GeneratedMark. Diagnostic is an error (File, Line, Col, Msg, ID); Result.Err() joins them and wraps ErrDiagnostics; a Go syntax error in a source file is returned as a *Diagnostic with an empty ID. The command prints every problem as file:line:col: ... and exits 0, 1 or 2 (see go doc ./cmd/oneui).
  • oneui/reload: Template, Result, Status, Cause and Available, for template reload in programs built with the oneui_reload tag.
  • oneui/rt and oneui/rt/reload: support code that generated files call. Outside the compatibility promise and versioned with the generator: generated files check rt.RuntimeVersion at start-up and stop with a message to run go generate again when it differs.
  • oneui/ui and oneui/ui/kit: the engine-free retained UI tree and the widget kit.
  • oneui/browser (GOOS=js GOARCH=wasm): the browser backend. browser.Glue() returns the bundled script.

Names and shapes

  • oneui.NodeID names a node; oneui.Append (0) as the "before" argument places a node last. Arguments are (parent, child, before) everywhere, including Base.Mount and Context.MountAt.
  • oneui.ElementRef is the type of ref="{Name}" fields.
  • Handlers take *oneui.Event; there are no per-kind event types.
  • Rect and Size fields are X, Y, W, H and W, H in changeset and ui.
  • oneui.WithErrorHandler receives problems the context cannot return to a caller (browser.WithErrorHandler likewise).
  • Scheduler.Schedule returns a *Timer; Timer.Stop reports whether it stopped the call, like time.Timer. Loop.Post returns false once the loop is closed.
  • oneui.New connects a sink that has SetDispatcher (the reference document, the browser host) to the context.
  • Context.Batch(fn) is the only way to batch. Base.Runtime and Base.SetRuntime hold generated code's update scope.
  • oneui.Format is rt.Format; ScrollAlign is the scroll alignment of ScrollIntoView.
  • ui: Element.SetAcceptsText and AcceptsText, IDSelector, Element.TextContent, BoxSizingBorder and BoxSizingContent, Tree.SetValue and Tree.Value.
  • ui/kit: constructors take required arguments positionally and the rest as options (kit.ID, kit.Kind, kit.Placeholder, kit.Horizontal, kit.ShowValue, kit.Danger, kit.OnCancel, kit.ConfirmText, kit.CancelText); lists and tables take ListOptions and TableOptions. Clipboards belong to a Host (kit.WithClipboard, Host.SetTreeClipboard); there is no package-level clipboard.

Generated code

The generated files use named state-bit constants, role-named parameters (parent, before), oneui.Append, and no empty import. Setters of types Go cannot compare say they always update.