Problem
BOXEN_UI_BUF_MAX = 256 in frontier-cli/boxen_ui.c:54 is a fixed cap on dialog input. The legacy read_line_with_editing in dialog_prompts.c:64-128 starts at 128 and grows via realloc unbounded.
Long paths (Jump targets), URLs, passphrases, table addresses routinely exceed 256 bytes. Past the cap, insert_char (boxen_ui.c:197) silently drops the keystroke — no feedback. Default values exceeding 256 bytes are truncated at boxen_ui.c:395-402 without warning.
This is a behavioral regression vs the linenoise path.
Fix
Make the input buffer grow on demand:
typedef struct {
/* ... */
char *buf; // heap-allocated, grows via realloc
int cap; // current capacity
int len;
int cursor;
/* ... */
} ui_ctx_t;
Initial capacity 256 (matches today's behavior for short input). Grow by doubling when insert_char would overflow. Cap at some sensible upper bound (8 KB? 64 KB?) to prevent runaway allocations from a stuck-key. On hit-cap, beep + drop (visible feedback rather than silent drop).
run_input allocates, the modal closes path frees, the return-strdup-then-free pattern stays unchanged.
Context
Acceptance
Problem
BOXEN_UI_BUF_MAX = 256infrontier-cli/boxen_ui.c:54is a fixed cap on dialog input. The legacyread_line_with_editingindialog_prompts.c:64-128starts at 128 and grows viareallocunbounded.Long paths (Jump targets), URLs, passphrases, table addresses routinely exceed 256 bytes. Past the cap,
insert_char(boxen_ui.c:197) silently drops the keystroke — no feedback. Default values exceeding 256 bytes are truncated atboxen_ui.c:395-402without warning.This is a behavioral regression vs the linenoise path.
Fix
Make the input buffer grow on demand:
Initial capacity 256 (matches today's behavior for short input). Grow by doubling when
insert_charwould overflow. Cap at some sensible upper bound (8 KB? 64 KB?) to prevent runaway allocations from a stuck-key. On hit-cap, beep + drop (visible feedback rather than silent drop).run_inputallocates, the modal closes path frees, the return-strdup-then-free pattern stays unchanged.Context
/gatereview of feat(repl): C.0.7g boxen<->UserTalk UI bridge Phase 1 (input prompts) #793 (Phase 1 UI bridge), 2026-06-23planning/phase_c/BOXEN_USERTALK_UI_BRIDGE.md(listed as "Phase 1.1 follow-up")dialog.getPassword(passphrase policy hazard)Acceptance
tools/tui-tests/tests/test_06_ui_bridge.pyexercises a >256-char input