Skip to content

Add rich text widgets and native input - #77

Open
treeform wants to merge 3 commits into
masterfrom
codex/native-chat-documents
Open

treeform wants to merge 3 commits into
masterfrom
codex/native-chat-documents

Conversation

@treeform

@treeform treeform commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Styled chat output needs one selection across headings, paragraphs, links, code, and quotes. This adds a read-only richTextBox widget in silky/richtextboxes.nim, with styled spans and blocks, streaming updates, link hover underlines, and pointer cursors. Regular textBox inputs retain their single-font layout and editing API. The rich widget composes the shared plain-text selection state while keeping its formatting and layout caches in its own module.

Editable textboxes forward native bulk edits and accessibility state through Windy, and support Enter to submit with Shift+Enter for a newline. Programmatic focus captures typing immediately when a popup opens, before its first draw. Fonts can be rasterized at the actual display density while retaining logical metrics. Glyph placement and deferred layout preserve the pixel grid, and atlas sampling happens before fragment clipping to avoid edge artifacts. The existing themed button also accepts a minimum size for full-width sidebar rows.

Validation: native, semantic, and Metal nim check; regression tests covering plain and rich textboxes, ordered input, programmatic focus, buttons, atlas metadata, density, decorations, rules, nested quotes, layout/clipping, and shader generation. Rich-text layout also passes with Metal. Validation used fresh clones at the exact dependency lockfile commits. The new regression tests are included in the existing eight-platform CI matrix; Windows-only CPU smoke was skipped locally.

Uses the text-input API from the merged treeform/windy#207. nimby.lock pins its tested commit (8e1e2499a050bcbb1546f239b8c3a8b1b16748c0) so CI uses the required API. This PR contains only the Runway-related library changes, with no application or chat data.

@treeform treeform changed the title Add native styled chat text and input Add rich text widgets and native input Nov 11, 2026
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