From 298af5c1c20443c5e3d5f361366ee29066a423cf Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 18 Jan 2026 20:27:11 +0100 Subject: [PATCH] style(coding-agent): move border above header, use keyHint for consistency --- .../components/session-selector.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/coding-agent/src/modes/interactive/components/session-selector.ts b/packages/coding-agent/src/modes/interactive/components/session-selector.ts index 6e67ac49..c6d8d13b 100644 --- a/packages/coding-agent/src/modes/interactive/components/session-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/session-selector.ts @@ -16,6 +16,7 @@ import { import type { SessionInfo, SessionListProgress } from "../../../core/session-manager.js"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; +import { keyHint, rawKeyHint } from "./keybinding-hints.js"; import { filterAndSortSessions, type SortMode } from "./session-selector-search.js"; type SessionScope = "current" | "all"; @@ -143,10 +144,16 @@ class SessionSelectorHeader implements Component { hintLine2 = ""; } else { const pathState = this.showPath ? "(on)" : "(off)"; - const hint1 = `Tab: scope · re: for regex · "phrase" for exact phrase`; - const hint2 = `Ctrl+R: sort · Ctrl+D: delete · Ctrl+P: path ${pathState}`; - hintLine1 = theme.fg("muted", truncateToWidth(hint1, width, "…")); - hintLine2 = theme.fg("muted", truncateToWidth(hint2, width, "…")); + const sep = theme.fg("muted", " · "); + const hint1 = keyHint("tab", "scope") + sep + theme.fg("muted", 're: regex · "phrase" exact'); + const hint2 = + rawKeyHint("ctrl+r", "sort") + + sep + + rawKeyHint("ctrl+d", "delete") + + sep + + rawKeyHint("ctrl+p", `path ${pathState}`); + hintLine1 = truncateToWidth(hint1, width, "…"); + hintLine2 = truncateToWidth(hint2, width, "…"); } return [`${left}${" ".repeat(spacing)}${rightText}`, hintLine1, hintLine2]; @@ -518,10 +525,10 @@ export class SessionSelectorComponent extends Container implements Focusable { // Add header this.addChild(new Spacer(1)); - this.addChild(this.header); - this.addChild(new Spacer(1)); this.addChild(new DynamicBorder()); this.addChild(new Spacer(1)); + this.addChild(this.header); + this.addChild(new Spacer(1)); // Create session list (starts empty, will be populated after load) this.sessionList = new SessionList([], false, this.sortMode, currentSessionFilePath);