Skip to content

feat(ui): prototype private computed style normalization - #42

Merged
sudo-tee merged 1 commit into
codex/ui-style-baselinefrom
codex/ui-computed-style
Oct 28, 2026
Merged

sudo-tee merged 1 commit into
codex/ui-style-baselinefrom
codex/ui-computed-style

Conversation

@sudo-tee

Copy link
Copy Markdown
Owner

Prototype the Phase 1 style contract without migrating live serializers. Stacked on #41, which keeps ui.styled canonical and ui.themed_style as a compatibility alias.

Add private shared.compute_style(palette, ...) to separate resolved text, box and spacing properties. Reuse existing box-aware merging and token resolution, preserve absent/false overrides, exclude callbacks/identity, and reject unsupported paint fields. A legacy span adapter keeps identity separate and copies padding to avoid shared mutations. Existing group inheritance and hover remain unchanged; callers select state layers explicitly.

Tests compare action span output with the current serializer across four bundled themes and map legacy row paint into the contract. Add a reproducible 25/100/500-node Lua benchmark and document the contract and migration gate.

Validation: 579 Lua tests pass with LuaJIT/Busted; StyLua and git diff --check pass. Zig/native screenshots remain unavailable in this environment.

Performance finding: one run allocated 752 bytes/node in the current path, 1848 when recomputing and adapting, and 720 when adapting a reused snapshot. Recompute timings were higher. Keep the prototype outside the live path; the next component experiment should establish dirty-node reuse or simplify to a flat contract before rollout. These are homogeneous Lua microbenchmarks, not native frame or latency measurements. Phase 1 live adoption is intentionally incomplete.

@sudo-tee
sudo-tee merged commit 26d2bce into codex/ui-style-baseline Oct 28, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

📦 PR builds · 28 Oct 2026

Platform Download
🪟 Windows hollow-windows-pr-26d2bce
🐧 Linux hollow-linux-pr-26d2bce

Build details

Detail Value
🧬 Commit 26d2bce
🕒 Started 28 Oct 2026, 21:31 UTC
✅ Completed 28 Oct 2026, 21:42 UTC
🔗 Build run #65

Artifacts expire after 7 days.

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