fix(terminal): stop advertising the unimplemented Bold Text color override

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-07-20 19:39:27 -07:00
co-authored by Orca
parent 0e7b0ac220
commit cc9432e72d
8 changed files with 27 additions and 25 deletions
+6 -6
View File
@@ -200,15 +200,15 @@ describe('mapGhosttyToOrca — cursor-text', () => {
})
describe('mapGhosttyToOrca — bold-color', () => {
it('maps valid hex to terminalColorOverrides.bold', () => {
// Why: xterm.js ITheme has no bold color slot (xtermjs/xterm.js#6032), so bold-color can never
// render; the importer must list it as unsupported rather than claim it was applied (#8595).
it('reports valid bold-color as unsupported and does not apply it', () => {
const result = mapGhosttyToOrca({ 'bold-color': '#ff0000' })
expect(result.diff).toEqual({
terminalColorOverrides: { bold: '#ff0000' }
})
expect(result.unsupportedKeys).toEqual([])
expect(result.diff).toEqual({})
expect(result.unsupportedKeys).toEqual(['bold-color'])
})
it('rejects invalid bold-color', () => {
it('reports invalid bold-color as unsupported', () => {
const result = mapGhosttyToOrca({ 'bold-color': 'red' })
expect(result.diff).toEqual({})
expect(result.unsupportedKeys).toEqual(['bold-color'])
+7 -7
View File
@@ -199,13 +199,6 @@ export function mapGhosttyToOrca(
return { colorOverrides: { cursorAccent: normalizeHex(v) } }
},
'bold-color': (v) => {
if (!HEX_COLOR_RE.test(v)) {
return null
}
return { colorOverrides: { bold: normalizeHex(v) } }
},
'mouse-hide-while-typing': (v) => {
if (v !== 'true' && v !== 'false') {
return null
@@ -289,6 +282,13 @@ export function mapGhosttyToOrca(
continue
}
// Why: xterm.js ITheme has no bold color slot (xtermjs/xterm.js#6032), so importing
// bold-color would render as a no-op; report it as unsupported instead of silently dropping.
if (key === 'bold-color') {
unsupportedKeys.push(key)
continue
}
if (!value.trim()) {
unsupportedKeys.push(key)
continue
@@ -103,9 +103,11 @@ export const COLOR_OVERRIDE_GROUPS: {
return translate('auto.components.settings.TerminalWindowSection.862e463f7f', 'Bold Text')
},
get description() {
// Why: xterm.js ITheme has no bold color slot (xtermjs/xterm.js#6032); the value is
// preserved but the terminal renderer does not apply it yet. Keep the copy honest.
return translate(
'auto.components.settings.TerminalWindowSection.fb8c6f1967',
'Color for bold text. Falls back to the normal color if not set.'
'auto.components.settings.TerminalWindowSection.605a35d600',
'Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved.'
)
}
}
+2 -2
View File
@@ -7046,7 +7046,6 @@
"cf4437a2f7": "ANSI black color",
"adfdee23cb": "Black",
"68e9f07de0": "ANSI Normal",
"fb8c6f1967": "Color for bold text. Falls back to the normal color if not set.",
"862e463f7f": "Bold Text",
"b2c0857c49": "Text color of selected text",
"8b450b5305": "Selection Foreground",
@@ -7062,7 +7061,8 @@
"79f6bfb76e": "Foreground",
"cf37ff69f6": "Base",
"8abdab9f7c": "Restart now",
"907131d741": "Restarting…"
"907131d741": "Restarting…",
"605a35d600": "Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved."
},
"UIZoomControl": {
"c2c64b24d0": "Reset"
+2 -2
View File
@@ -6986,7 +6986,6 @@
"cf4437a2f7": "Color negro ANSI",
"adfdee23cb": "Negro",
"68e9f07de0": "ANSI normal",
"fb8c6f1967": "Color para texto en negrita. Vuelve al color normal si no se establece.",
"862e463f7f": "Texto en negrita",
"b2c0857c49": "Color del texto seleccionado",
"8b450b5305": "Primer plano de selección",
@@ -7002,7 +7001,8 @@
"79f6bfb76e": "Primer plano",
"cf37ff69f6": "Base",
"8abdab9f7c": "Reiniciar ahora",
"907131d741": "Reiniciando…"
"907131d741": "Reiniciando…",
"605a35d600": "Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved."
},
"UIZoomControl": {
"c2c64b24d0": "Restablecer"
+2 -2
View File
@@ -7008,7 +7008,6 @@
"cf4437a2f7": "ANSI黒色",
"adfdee23cb": "黒",
"68e9f07de0": "ANSI標準",
"fb8c6f1967": "太字のテキストの色。設定されていない場合は、通常の色に戻ります。",
"862e463f7f": "太字のテキスト",
"b2c0857c49": "選択したテキストの文字色",
"8b450b5305": "選択範囲の前景",
@@ -7024,7 +7023,8 @@
"79f6bfb76e": "前景",
"cf37ff69f6": "ベース",
"8abdab9f7c": "今すぐ再起動",
"907131d741": "再起動中…"
"907131d741": "再起動中…",
"605a35d600": "Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved."
},
"UIZoomControl": {
"c2c64b24d0": "リセット"
+2 -2
View File
@@ -6971,7 +6971,6 @@
"cf4437a2f7": "ANSI 블랙 컬러",
"adfdee23cb": "검은색",
"68e9f07de0": "ANSI 일반",
"fb8c6f1967": "굵은 텍스트의 색상입니다. 설정하지 않으면 일반 색상으로 돌아갑니다.",
"862e463f7f": "굵은 글씨",
"b2c0857c49": "선택한 텍스트의 텍스트 색상",
"8b450b5305": "선택 전경",
@@ -6987,7 +6986,8 @@
"79f6bfb76e": "전경",
"cf37ff69f6": "베이스",
"8abdab9f7c": "지금 재시작",
"907131d741": "다시 시작하는 중…"
"907131d741": "다시 시작하는 중…",
"605a35d600": "Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved."
},
"UIZoomControl": {
"c2c64b24d0": "재설정"
+2 -2
View File
@@ -6971,7 +6971,6 @@
"cf4437a2f7": "ANSI 黑色",
"adfdee23cb": "黑色的",
"68e9f07de0": "ANSI 标准",
"fb8c6f1967": "粗体文本的颜色。如果未设置,则返回正常颜色。",
"862e463f7f": "粗体文字",
"b2c0857c49": "所选文本的文本颜色",
"8b450b5305": "选择前景",
@@ -6987,7 +6986,8 @@
"79f6bfb76e": "前景",
"cf37ff69f6": "根据",
"8abdab9f7c": "立即重启",
"907131d741": "正在重新启动..."
"907131d741": "正在重新启动...",
"605a35d600": "Not applied by the terminal renderer yet — xterm.js has no bold color slot. A saved value is preserved."
},
"UIZoomControl": {
"c2c64b24d0": "重置"