[PR #13503] feat: add tui.no_terminal_padding_x config option #14694

Closed
opened 2026-02-16 18:19:28 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13503

State: closed
Merged: No


Summary

Adds configuration option to remove horizontal padding in the terminal interface.

Fixes #9955

Changes

  • Added tui.no_terminal_padding_x boolean config option
  • Follows existing tui.* config pattern (like tui.diff_style, tui.scroll_speed)
  • Conditionally applies padding based on config value
  • CSS rules target terminal/console containers

Implementation

Config (packages/opencode/src/config/config.ts):

tui: {
  no_terminal_padding_x: z.boolean().optional()
}

Integration (packages/opencode/src/cli/cmd/tui/routes/session/index.tsx):

const noTerminalPaddingX = createMemo(() => 
  sync.data.config.tui?.no_terminal_padding_x ?? false
)

<box
  paddingLeft={noTerminalPaddingX() ? 0 : 2}
  paddingRight={noTerminalPaddingX() ? 0 : 2}
>

CSS (packages/ui/src/styles/no-padding-x.css):

  • Removes padding from terminal/console/TUI containers
  • Imported in main styles with proper layering

Usage

{
  "tui": {
    "no_terminal_padding_x": true
  }
}

Notes

  • Backward compatible (defaults to normal padding when not configured)
  • Only affects terminal content area, not dialogs or menus
  • Provides ~4 columns additional horizontal space
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13503 **State:** closed **Merged:** No --- ## Summary Adds configuration option to remove horizontal padding in the terminal interface. Fixes #9955 ## Changes - Added `tui.no_terminal_padding_x` boolean config option - Follows existing `tui.*` config pattern (like `tui.diff_style`, `tui.scroll_speed`) - Conditionally applies padding based on config value - CSS rules target terminal/console containers ## Implementation **Config** (`packages/opencode/src/config/config.ts`): ```typescript tui: { no_terminal_padding_x: z.boolean().optional() } ``` **Integration** (`packages/opencode/src/cli/cmd/tui/routes/session/index.tsx`): ```typescript const noTerminalPaddingX = createMemo(() => sync.data.config.tui?.no_terminal_padding_x ?? false ) <box paddingLeft={noTerminalPaddingX() ? 0 : 2} paddingRight={noTerminalPaddingX() ? 0 : 2} > ``` **CSS** (`packages/ui/src/styles/no-padding-x.css`): - Removes padding from terminal/console/TUI containers - Imported in main styles with proper layering ## Usage ```json { "tui": { "no_terminal_padding_x": true } } ``` ## Notes - Backward compatible (defaults to normal padding when not configured) - Only affects terminal content area, not dialogs or menus - Provides ~4 columns additional horizontal space
yindo added the pull-request label 2026-02-16 18:19:28 -05:00
yindo closed this issue 2026-02-16 18:19:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14694