Repository navigation
Sync CUI main: voice, creative controls, and hardened bindings - #23
Merged
Merged
Conversation
added 2 commits
November 16, 2026 09:22
CUI's main is 148 commits past the 1.4.0 tag: forty new functions, thirty-six new structs, and two header sections the binding had never seen (Voice and Creative controls). Every one of those functions now has a decided status. 532 C functions, 0 pending. Three quarters of the work was deciding, not generating. The generator learned four things the new headers need: - an array whose length is one of the widget's own parameters is checked before the call, so a short span cannot be over-read (ToolbarRadio's labels, the step slider's stop names, the voice owners, the sankey node colors); - a `const uint8_t *` is a byte per item, not a string; - a `const cui_color *` converts element by element into the arena, because `Color` and `cui_color` are different structs; - a pointer to a const enum is an array of that enum. And one thing the wrappers needed: a scalar the widget writes through, like a treemap's selected tile or a clip's played fraction, becomes a `ref` parameter with an overload that passes null for the callers who do not want it. That is what keeps `ui.Treemap(id, items, opts)` compiling when the widget gains a selection. Three widgets are hand-written, because a generated record cannot own a pointer per item: `ui.CanvasControls` (every toggle carries its own `bool *`), `ui.PaletteStrip` (colors and lock flags, both edited in place, counted once) and `ui.SelectionBar` (the flags native clears itself). Each owns those flags in the frame arena and copies them back into the caller's span. `CuiVoice` resamples a clip without a frame, the way `CuiCron` parses a schedule. Two functions came out of a section exclusion that was no longer true: `ui.SetClipboard` and `ui.GetClipboard` are what CUI added for a "Copy path" menu item, not platform input. The gallery has three new pages — Creative controls, Collaboration and Voice — because a component nobody can see is a component nobody trusts. Two records gained a field upstream (GanttTask.State, GaugeBand.Name) and cui_spinner became cui_spinner_ex; `ui.Spinner(size)` still compiles. Gates: build -warnaserror, 1108 tests, format clean, regen -NoDiff with 15 contract checks and no catalog drift, api-surface reviewed by set difference (two constructor signatures, both the gain of a field), templates verified in 85 s, AOT 3 180 544 B (0 IL warnings), frames 0.92 ms mean with 0 B allocated, every app shape inside its budget. The AOT budget moved with the executable and both are recorded in PERFORMANCE.md with the cause.
Preserve caller-owned const arrays in record write-back, pass null for seedless palettes, reject mismatched palette buffers and overflowing step ranges, and reject overlapping voice resampling buffers. Promote native event flags to typed results and validate optional injections against their own function. Test native play/speed, shuffle, toggle, selection clear and short-array behavior; measure the actual new gallery pages at zero steady-state allocation. Compare complete header declaration sets: upstream added 36 functions and 32 structs, not the moved/reformatted declarations counted before. Keep spinner compatibility visible. Correct the release notes, authoring guide and size history. Alternating isolated baseline/new-pin runs confirm 0.82-0.84 versus 0.94 ms; track profiling that regression instead of claiming noise. Verified: warn-as-error build; 1129 tests; format clean; regen no diff with 17 contract checks and catalog freshness; template verification 69.9 s; AOT 3177984 B with no IL warnings; combined frame/AOT/all-shape budgets pass; sync status consistent; refreshed light/dark screenshots.
Move the version knob, the template default, the gallery's embedded version, the changelog section and the prose that names the release, then regenerate the API catalog so its version agrees. AOT stays 3 177 984 B with no IL warnings; frame budget unchanged.
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.
Sync
Pin CUI to
6e6b353, 148 commits after v1.4.0. There is no newer tag. Complete header snapshots and the generated IR agree: 36 new functions, 32 new structs, no removed functions, and one new header section (Creative controls). The existing Voice section gains its widgets.cui_spinnerremains as a compatibility export alongsidecui_spinner_ex.Coverage: 532 C functions, 0 PENDING, 194 options, 111 records, 302 generated wrappers, 181 manual, 6 excluded, 4 variadic.
Three new gallery pages, light and dark:
Review and hardening
Five behavioral regression cases were observed failing before the fixes, then passing afterward. Native/CUI remains pristine; no patches.
Surface
Against main, docs/API-SURFACE.txt set difference has two removals, both constructors gaining upstream fields: GanttTask.State and GaugeBand.Name. Against the first sync commit, 21 signatures change from Int32 to their documented event enums (including extension/static forms); this is deliberate new pre-1.0 surface.
Verification
Performance decision — not noise
An isolated main worktree (5fbab51) with its own freshly built CUI 1.4.0 library measured 0.82, 0.84, 0.82 ms. Alternating new-pin runs measured 0.94, 0.94, 0.94 ms, all at 1280×720 with 0 B/frame. This is a repeatable roughly 14% frame regression across the sync, not proven noise or a consequence established merely by a larger binary.
The frame ceiling moves explicitly from 0.90 to 1.00 ms; the AOT ceiling from 2.95 to 3.20 MB. PERFORMANCE.md records the comparison, SIZE.md separates historical profile measurements from current sizes, and PLAN.md tracks profiling the regression. Native fixes still belong upstream.