Skip to content

feat(terminal): name a terminal pane yourself - #280

Closed
vakovalskii wants to merge 1 commit into
mainfrom
feat/rename-terminal-pane
Closed

feat(terminal): name a terminal pane yourself#280
vakovalskii wants to merge 1 commit into
mainfrom
feat/rename-terminal-pane

Conversation

@vakovalskii

Copy link
Copy Markdown
Owner

Запрос

@vakovalskii: «вот тут где сейчас тильда я бы хотел название добавить» — шапка панели показывала только авто-подпись, и при нескольких панелях в одной папке (или нескольких шеллах в $HOME, где у всех ~) их было не различить.

Переименование вкладок уже было; это про панель.

Что сделано

  • ✎ в шапке панели — задать своё имя. Или двойной клик по заголовку.
  • Пустой ответ очищает имя и возвращает авто-подпись (агент → папка → ~).
  • Диалог через codbashPrompt, а не window.prompt — последний в Electron-шелле не работает.

Имя переживает перезапуск

Это была основная часть работы, а не сама кнопка:

  • попадает в снимок сессии (_wsCaptureLayout) и в сохранённые лейауты;
  • восстанавливается во всех пяти местах, где конструируется панель (восстановление сессии, spec-панели, применение лейаута, открытие вкладки, capture) — пропусти одно, и имя молча теряется, ровно как когда-то терялись cwd/prefill;
  • sanitizePane теперь сохраняет name, переиспользуя существующий лимит MAX_NAME = 120 и отклоняя управляющие символы — так же, как остальные поля панели;
  • пустая панель, у которой есть только имя, больше не считается «незначимой» и сохраняется в сессию.

Проверка

  • node --test test/*.test.js256 passed / 0 failed / 2 skipped (добавлено 3 теста: round-trip имени, отклонение управляющих символов, пропуск пустого имени вместо записи)
  • node --check на workspace.js и app.js — сборки нет, синтаксическая ошибка сломала бы весь дашборд
  • Собранный HTML (602 КБ) содержит функцию, разметку кнопки и CSS

Как посмотреть

node bin/cli.js run

Terminal → ✎ в шапке панели → задать имя → перезагрузить страницу, имя на месте.

🤖 Generated with Claude Code

The pane title bar showed only an auto-label — the running agent, the project
folder, or a bare '~' for home. With several panes open in the same folder (or
several shells in $HOME) they were indistinguishable.

You can now give a pane its own name: click the ✎ in its title bar, or
double-click the title. An empty answer clears the name and restores the
auto-label. Uses codbashPrompt (window.prompt is a no-op in the Electron shell).

The name round-trips: it is captured into the session snapshot and saved
layouts, restored at every pane-construction site, and sanitizePane now
preserves it (reusing the existing MAX_NAME=120 cap and rejecting control
characters, like the other pane fields).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vakovalskii added a commit that referenced this pull request Jul 30, 2026
* fix(terminal): dimmed text on a filled background no longer renders invisible

Claude Code (and other TUIs) draw some rows as *dimmed* text on a filled
background — e.g. the grey 'message above' bars. In a codbash pane those bars
came out as empty grey strips with no text at all, while the same output stayed
legible in iTerm.

Cause: xterm's minimumContrastRatio defaults to 1, which disables all contrast
adjustment — and the dim path is gated behind it (xterm.js: 'minimumContrastRatio||(0…)'
and 'minimumContrastRatio/(s.isDim(…)'). The WebGL renderer applies dim by
cutting the foreground alpha, so with no adjustment dim-on-background washes out
to invisible. Both the webgl and canvas addons honor the option.

Fix: set minimumContrastRatio to 4.5 (WCAG AA). xterm only nudges a foreground
when it falls below the ratio, so normal colors are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(terminal): name a terminal pane yourself

The pane title bar showed only an auto-label — the running agent, the project
folder, or a bare '~' for home. With several panes open in the same folder (or
several shells in $HOME) they were indistinguishable.

You can now give a pane its own name: click the ✎ in its title bar, or
double-click the title. An empty answer clears the name and restores the
auto-label. Uses codbashPrompt (window.prompt is a no-op in the Electron shell).

The name round-trips: it is captured into the session snapshot and saved
layouts, restored at every pane-construction site, and sanitizePane now
preserves it (reusing the existing MAX_NAME=120 cap and rejecting control
characters, like the other pane fields).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* release: 7.17.0 — named terminal panes + readable dimmed text

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vakovalskii

Copy link
Copy Markdown
Owner Author

Вошло в 7.17.0 через релиз-кандидат #281 (main @ 8b9bf7d). Закрываю как включённое — в main коммиты пришли squash'ем от RC-ветки, поэтому GitHub не закрыл PR сам.

Сборка подписанного desktop-релиза идёт, ссылку на релиз добавлю следом.

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.

1 participant