feat(coding-agent): make fullscreen the default TUI mode

This commit is contained in:
Armin Ronacher
2026-10-01 17:26:35 +02:00
parent c2f65d8f13
commit 88ff80b986
8 changed files with 17 additions and 16 deletions
+1
View File
@@ -10,6 +10,7 @@
### Changed
- Changed the default TUI mode to fullscreen. Set `tuiMode` to `"regular"` or pass `--tui-mode regular` to keep the terminal's normal scrollback.
- `/login` now offers "Sign in with Radius" at the top level, as the last option, with its status. After a Radius sign-in, `/login` offers to configure the Radius MCP server in the global `mcp.json` with `"auth": { "provider": "radius" }` and reloads. Cancelling a login returns to the menu it was started from.
- The provider docs page is renamed to [Providers](docs/providers.md), its "Cloud Providers" section is now "Provider Specific Config", and it documents Radius first.
- MCP OAuth credentials are now stored per server name and URL, so MCP servers with the same URL can sign in with different accounts. Credentials stored by URL alone move to the first server that uses them ([#10252](https://github.com/earendil-works/pi/issues/10252)).
+1 -1
View File
@@ -229,7 +229,7 @@ See [Configuration](configuration.md) for saved configuration, [Security](securi
- `--append-system-prompt <text|path>`<br>
Appends text or an existing file to the system prompt and is repeatable.
- `--tui-mode <mode>`<br>
Uses `regular` or `fullscreen` terminal mode.
Uses `fullscreen` (default) or `regular` terminal mode.
- `--verbose`<br>
Shows verbose interactive startup information, overriding `quietStartup`.
- `-a`, `--approve`<br>
+1 -1
View File
@@ -91,7 +91,7 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida
|---|---|---|---|
| `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. |
| `quietStartup` | boolean \| `"header"` | `false` | `true` hides the startup header and loaded-resource listing. `"header"` keeps the header (version and key hints) but hides the model scope line and loaded-resource listing. |
| `tuiMode` | `"regular" \| "fullscreen"` | `"regular"` | Interactive terminal UI mode. |
| `tuiMode` | `"regular" \| "fullscreen"` | `"fullscreen"` | Interactive terminal UI mode. |
| `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
| `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
| `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. |
+1 -1
View File
@@ -83,7 +83,7 @@ Use `/share` to upload the session and get a viewer link. With Radius authentica
## Adjust the terminal
Regular mode uses the terminal's normal scrollback. Fullscreen mode keeps the editor and status area fixed while the transcript scrolls within the terminal window. Choose a mode through `/settings` or `--tui-mode`.
Fullscreen mode, the default, keeps the editor and status area fixed while the transcript scrolls within the terminal window. Regular mode uses the terminal's normal scrollback. Choose a mode through `/settings` or `--tui-mode`.
Terminal support for mouse input, keyboard shortcuts, and inline images varies. See [Terminal Setup](terminal-setup.md) for platform-specific configuration and [Keybindings](keybindings.md) for every configurable shortcut. Run `/hotkeys` to inspect the shortcuts active in your current session.
+1 -1
View File
@@ -323,7 +323,7 @@ ${chalk.bold("Options:")}
--export <file> Export session file to HTML and exit
--list-models [search] List available models (with optional fuzzy search)
--verbose Force verbose startup (overrides quietStartup setting)
--tui-mode <mode> TUI mode: regular (default) or fullscreen
--tui-mode <mode> TUI mode: fullscreen (default) or regular
--approve, -a Trust project-local files for this run
--no-approve, -na Ignore project-local files for this run
--offline Disable startup network operations (same as PI_OFFLINE=1)
@@ -181,7 +181,7 @@ export interface Settings {
httpIdleTimeoutMs?: number; // HTTP header/body idle timeout in milliseconds; 0 disables it
cacheWarming?: CacheWarmingMode; // default: "streaming"; global only because each refresh costs money
websocketConnectTimeoutMs?: number; // WebSocket connect/open handshake timeout in milliseconds; 0 disables it
tuiMode?: TuiMode; // default: "regular"
tuiMode?: TuiMode; // default: "fullscreen"
fullscreenExitOutput?: FullscreenExitOutput; // default: "transcript"; no effect in regular TUI mode
fullscreenScrollbar?: ScrollViewScrollbar; // default: "auto"; no effect in regular TUI mode
fullscreenCopyOnSelect?: boolean; // default: true; no effect in regular TUI mode
@@ -1346,7 +1346,7 @@ export class SettingsManager {
}
getTuiMode(): TuiMode {
return this.settings.tuiMode === "fullscreen" ? "fullscreen" : "regular";
return this.settings.tuiMode === "regular" ? "regular" : "fullscreen";
}
setTuiMode(mode: TuiMode): void {
@@ -705,7 +705,7 @@ export class SettingsSelectorComponent extends Container {
{
id: "tui-mode",
label: "TUI mode",
description: "Interface layout; fullscreen mode is experimental",
description: "Interface layout; regular mode uses the terminal's normal scrollback",
currentValue: config.tuiMode,
values: ["regular", "fullscreen"],
},
@@ -478,33 +478,33 @@ describe("SettingsManager", () => {
});
describe("TUI mode", () => {
it("defaults to regular and persists fullscreen mode", async () => {
it("defaults to fullscreen and persists regular mode", async () => {
const manager = SettingsManager.create(projectDir, agentDir);
expect(manager.getTuiMode()).toBe("regular");
expect(manager.getTuiMode()).toBe("fullscreen");
manager.setTuiMode("fullscreen");
manager.setTuiMode("regular");
await manager.flush();
expect(manager.getTuiMode()).toBe("fullscreen");
expect(manager.getTuiMode()).toBe("regular");
const savedSettings = JSON.parse(readFileSync(join(agentDir, "settings.json"), "utf-8"));
expect(savedSettings.tuiMode).toBe("fullscreen");
expect(savedSettings.tuiMode).toBe("regular");
});
it("falls back to regular for unsupported values", () => {
it("falls back to fullscreen for unsupported values", () => {
writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ tuiMode: "other" }));
const manager = SettingsManager.create(projectDir, agentDir);
expect(manager.getTuiMode()).toBe("regular");
expect(manager.getTuiMode()).toBe("fullscreen");
});
it("does not recognize the old uiMode setting", () => {
writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ uiMode: "fullscreen" }));
writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ uiMode: "regular" }));
const manager = SettingsManager.create(projectDir, agentDir);
expect(manager.getTuiMode()).toBe("regular");
expect(manager.getTuiMode()).toBe("fullscreen");
});
});