Skip to content

feat(tui): add permission_prompt size options - #41978

Closed
AliAltivate wants to merge 1 commit into
anomalyco:devfrom
AliAltivate:permission-prompt-height
Closed

feat(tui): add permission_prompt size options#41978
AliAltivate wants to merge 1 commit into
anomalyco:devfrom
AliAltivate:permission-prompt-height

Conversation

@AliAltivate

Copy link
Copy Markdown

Issue for this PR

Closes #28191

Type of change

  • New feature

What does this PR do?

Adds two optional tui.json options to control the permission prompt panel:

  • permission_prompt.max_height — max height of the panel when not fullscreen (defaults to 15, the previous hardcoded value).
  • permission_prompt.default_expanded — open the permission prompt in fullscreen by default (false).

The height was previously hardcoded (maxHeight: 15) in packages/tui/src/routes/session/permission.tsx. When a large diff needs approval, 15 lines is often too small and users had to press ctrl+f every time. Both options are optional and backward-compatible: behavior is unchanged unless the user opts in.

Schema added in packages/tui/src/config/index.tsx following the existing prompt/cursor config patterns; default_expanded only takes effect when the prompt supports fullscreen (the main permission stage).

How did you verify your code works?

  • Added config decode coverage in packages/tui/test/config.test.tsx (valid values pass, max_height: 0 throws).
  • Ran bun test test/config.test.tsx in packages/tui — 9 pass.
  • Ran bun typecheck from packages/tui and the full root bun typecheck — clean.

Screenshots / recordings

N/A (behavior only; no new UI surface).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

FEATURE: TUI permission prompt - configurable default height and expanded state

1 participant