Problem
frontier-cli/boxen_ui.c:291 only accepts printable ASCII:
if (ev->key.key == BOXEN_KEY_NONE && ev->key.ch >= 0x20 && ev->key.ch < 0x7F) {
insert_char(ctx, (char)ev->key.ch);
}
boxen delivers Unicode codepoints in key.ch. The legacy read_line_with_editing stored the single byte without any range check. UTF-8 paste / IME input is silently rejected by the bridge but accepted by the legacy reader.
Fix
Widen the accept range to include codepoints > 0x7F. Encode each codepoint as UTF-8 (1-4 bytes) into the buffer. The render path at boxen_ui.c:170-171 treats buf[i] as a single byte cell — needs to be updated to advance by codepoint width, not byte width, for correct cursor positioning. The > prefix and field width math stay the same.
Caveats:
- East-Asian wide characters take 2 cells per codepoint —
boxen_window_content_width plus a wcwidth-style helper needed
- Backspace should delete one codepoint, not one byte
dialog_get_int should still reject non-digit codepoints (keep the existing ch_is_acceptable_int check on the input filter)
This compounds with #795 (buffer growth) — both touch the input buffer representation.
Context
Acceptance
Problem
frontier-cli/boxen_ui.c:291only accepts printable ASCII:boxen delivers Unicode codepoints in
key.ch. The legacyread_line_with_editingstored the single byte without any range check. UTF-8 paste / IME input is silently rejected by the bridge but accepted by the legacy reader.Fix
Widen the accept range to include codepoints > 0x7F. Encode each codepoint as UTF-8 (1-4 bytes) into the buffer. The render path at
boxen_ui.c:170-171treatsbuf[i]as a single byte cell — needs to be updated to advance by codepoint width, not byte width, for correct cursor positioning. The>prefix and field width math stay the same.Caveats:
boxen_window_content_widthplus a wcwidth-style helper neededdialog_get_intshould still reject non-digit codepoints (keep the existingch_is_acceptable_intcheck on the input filter)This compounds with #795 (buffer growth) — both touch the input buffer representation.
Context
/gatereview of feat(repl): C.0.7g boxen<->UserTalk UI bridge Phase 1 (input prompts) #793, 2026-06-23Acceptance
test_06_ui_bridge.pypaste/insert a multibyte character and assert it round-trips throughdialog.getString