From 838d41a0a01a25d32229680fcf84dbf84f7302c3 Mon Sep 17 00:00:00 2001 From: James Long Date: Thu, 15 Oct 2026 13:36:22 -0400 Subject: [PATCH] refactor(tui): build prompt and integration views on DialogLayout (#55742) --- .../tui/src/component/dialog-integration.tsx | 220 +++++++++--------- packages/tui/src/ui/dialog-prompt.tsx | 49 ++-- 2 files changed, 142 insertions(+), 127 deletions(-) diff --git a/packages/tui/src/component/dialog-integration.tsx b/packages/tui/src/component/dialog-integration.tsx index 258f2e821af..0a92aedf4fa 100644 --- a/packages/tui/src/component/dialog-integration.tsx +++ b/packages/tui/src/component/dialog-integration.tsx @@ -805,26 +805,31 @@ function OAuthView(props: { }) { const theme = useTheme().surface("dialog") return ( - - - - {(url) => ( - - - - {(instructions) => {instructions()}} - - - )} - - {props.message} - - + } + footer={ + + } + > + + + {(url) => ( + + + + {(instructions) => {instructions()}} + + + )} + + {props.message} + + ) } @@ -973,91 +978,98 @@ function StringChoiceField(props: { ], })) return ( - - (store.editing ? back() : dialog.clear())} /> - {(description) => {description()}} - row.description).length, - Math.max(3, Math.floor(dimensions().height / 2) - 6), - )} - scrollbarOptions={{ visible: false }} - ref={(value: ScrollBoxRenderable) => { - scroll = value - }} - > - - {(row, index) => ( - select(index())}> - - {index() + 1}. {row.label} - - - {(description) => ( - - {description()} - - )} - - - )} - - select(rows.length)}> - {rows.length + 1}. - {store.text || "Type your own answer"}} - > -