Skip to content

alexhancock/tui-improvements#8736

Merged
alexhancock merged 3 commits into
mainfrom
alexhancock/tui-improvements
Apr 22, 2026
Merged

alexhancock/tui-improvements#8736
alexhancock merged 3 commits into
mainfrom
alexhancock/tui-improvements

Conversation

@alexhancock
Copy link
Copy Markdown
Collaborator

Summary

A grab bag of three TUI improvements

  1. Remove some permissioning code which looks to be around from early/experimental commits to this client that weren't being used
  2. Fix scrolling which broke somehow, and make resize handling more robust
  3. Redo the "expandable tool calls" UX. You can now arrow key between them and hit space to open one.

Testing

Local usage

Related Issues

N/A

Screenshots/Demos (for UX changes)

Screen.Recording.2026-04-21.at.3.56.28.PM.mov

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

goose/ui/text/src/tui.tsx

Lines 743 to 745 in 9fc263f

() => ({
sessionUpdate: async (params: SessionNotification) => {
const update = params.update;

P1 Badge Handle ACP permission requests in interactive text UI

This GooseClient callback no longer provides a requestPermission handler, so the interactive TUI cannot answer ACP permission prompts for gated tool calls. On the server side, handle_tool_permission_request sends an ACP permission request and converts request errors into Permission::Cancel, which means these operations are automatically denied instead of letting the user approve them. Reintroduce a requestPermission callback here (or an explicit allow/deny policy) to avoid silently cancelling permission-gated actions.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/text/src/tui.tsx
Comment on lines +997 to 1000
if (ch === " " && selectedToolCallIdx !== null) {
setToolCallExpandedScroll(0);
setToolCallExpanded(true);
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict space-to-expand shortcut while editing input

The global key handler opens the expanded tool-call view on any space press whenever a tool call is selected, without checking whether the prompt input is currently being edited. After selecting a tool call with arrows, pressing space while typing the next prompt will unexpectedly open the panel and disrupt normal message entry. Limit this shortcut to a non-editing context (or require a modifier) so space remains safe for typing.

Useful? React with 👍 / 👎.

Comment on lines +106 to +108
<Box key={`${keyPrefix}-hdr`} height={1}>
<Text color={TEXT_SECONDARY} bold>
{label}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Truncate expanded tool title in fixed-height row

This label is rendered inside a fixed height={1} row but uses default Ink wrapping. If info.title exceeds the available width, Ink wraps to extra lines and does not clip overflow for fixed-height boxes, which can break the expanded card layout. Render this row with truncation (and/or pre-truncate to width) to keep the height budget stable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't wait for "goose" default cli to delegate to this!

@alexhancock alexhancock force-pushed the alexhancock/tui-improvements branch from 9fc263f to 4ad2156 Compare April 21, 2026 22:35
@alexhancock
Copy link
Copy Markdown
Collaborator Author

@michaelneale A few more things IMO and then I think we can consider! 'Agree will be great

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

goose/ui/text/src/tui.tsx

Lines 743 to 746 in 4ad2156

() => ({
sessionUpdate: async (params: SessionNotification) => {
const update = params.update;
if (update.sessionUpdate === "agent_message_chunk") {

P1 Badge Restore requestPermission callback for ACP tool approvals

This callback object now only exposes sessionUpdate, so the text TUI no longer handles ACP requestPermission RPCs. The server still issues those requests for approval-gated tools (handle_tool_permission_request in crates/goose/src/acp/server.rs), and failed permission requests are converted to Permission::Cancel, which means interactive text sessions can no longer approve sensitive tool calls that previously could proceed. Please keep a requestPermission handler here (and in --text mode) so approval-required workflows are not silently downgraded to cancellation.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (overflows) {
const above = startIdx;
elements.push(
<Box key="exp-up" width={safeWidth} height={1} justifyContent="center">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Constrain expanded panel filler rows to content width

The expanded body container is rendered at contentWidth, but this row uses width={safeWidth} (same pattern also appears in the pad/down rows), so overflow-state chrome is wider than its parent. In Ink, overflow is not clipped, so when the expanded tool output is scrollable (or padded), these rows can bleed into the card border/adjacent cells and break the fixed-height layout. Use contentWidth for these rows to keep the panel within its width budget.

Useful? React with 👍 / 👎.

@alexhancock alexhancock added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit 23b3b3d Apr 22, 2026
23 checks passed
@alexhancock alexhancock deleted the alexhancock/tui-improvements branch April 22, 2026 00:57
lifeizhou-ap added a commit that referenced this pull request Apr 22, 2026
* main:
  feat: extend goose2 context window ux with auto-compaction (#8721)
  improve goose2 agent management flows (#8737)
  alexhancock/tui-improvements (#8736)
  fix: add strict:false to Responses API tools and gpt-5.4 to known models (#8636)
  persist and reliably apply chat model selection (#8734)
  merge goose-acp crate into goose (#8726)
  docs: AGENTS.md section on goose2 desktop backend architecture (#8732)
  feat: goose2 message bubble + action tray (#8720)
  consolidate provider ACP methods onto inventory (#8710)
  ci: declare and enforce MSRV of 1.91.1 (#8670)
  fix(ui): correct grammar in apps view description (#8668) (#8679)
  Stop load openai fast model for openapi compatible custom endpoint (#8644)
lifeizhou-ap added a commit that referenced this pull request Apr 22, 2026
* main: (41 commits)
  removed the specific code owner for documentation change (#8749)
  fix(providers): handle missing delta field in streaming chunks (#8700)
  refactor(providers): extract http_status module and rename handle_status_openai_compat (#8620)
  fix(providers/openai): accept streaming chunks with both reasoning fields (#8715)
  feat: associate threads with projects (#8745)
  upgrade goose sdk and tui to be compatible with the latest agentclientprotocol/sdk package (#8667)
  feat: extend goose2 context window ux with auto-compaction (#8721)
  improve goose2 agent management flows (#8737)
  alexhancock/tui-improvements (#8736)
  fix: add strict:false to Responses API tools and gpt-5.4 to known models (#8636)
  persist and reliably apply chat model selection (#8734)
  merge goose-acp crate into goose (#8726)
  docs: AGENTS.md section on goose2 desktop backend architecture (#8732)
  feat: goose2 message bubble + action tray (#8720)
  consolidate provider ACP methods onto inventory (#8710)
  ci: declare and enforce MSRV of 1.91.1 (#8670)
  fix(ui): correct grammar in apps view description (#8668) (#8679)
  Stop load openai fast model for openapi compatible custom endpoint (#8644)
  feat(hooks): add Husky git hooks for ui/goose2 (#8577)
  fix: links in chat could not be opened (#8544)
  ...
lifeizhou-ap added a commit that referenced this pull request Apr 23, 2026
* main: (34 commits)
  fix(goose-server): cache TLS cert to disk to avoid slow startup on first launch (#8174)
  feat: add Exa AI-powered search tool (#8487)
  fix: preprompt would show after loading session (#8744)
  commands to acp+ migration: extensions management (#8733)
  feat: desktop notification when goose finishes a task (#8647)
  harden code review skill for async state and default-resolution bugs (#8740)
  Feature/at agent mention (#8571)
  fix: removed hardcoded dependency of goose-acp-macro (#8753)
  perf: split agent setup into staged phases to reduce startup blocking (#8746)
  Add /skills command (#8600)
  Replace deprecated Claude ACP package links (#8625)
  removed the specific code owner for documentation change (#8749)
  fix(providers): handle missing delta field in streaming chunks (#8700)
  refactor(providers): extract http_status module and rename handle_status_openai_compat (#8620)
  fix(providers/openai): accept streaming chunks with both reasoning fields (#8715)
  feat: associate threads with projects (#8745)
  upgrade goose sdk and tui to be compatible with the latest agentclientprotocol/sdk package (#8667)
  feat: extend goose2 context window ux with auto-compaction (#8721)
  improve goose2 agent management flows (#8737)
  alexhancock/tui-improvements (#8736)
  ...
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.

2 participants