fix: use width-stable icons in the status bar
⏱ (U+23F1) and ⏵ (U+23F5) are text-default emoji: string-width counts them as 1 column but Windows Terminal, iTerm and others render them as 2. That makes a status-bar line drift wider than Ink's layout math expects, so the live region below it under-erases on re-render and leaves stranded copies of the bar in scrollback. Swap in ⏳ (a full RGI emoji, unambiguously 2) and ▸ (a plain geometric shape, unambiguously 1). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13e6540cdf
commit
e6795effe1
1 file changed
+7
-2
@@ -99,6 +99,11 @@ export const StatusBar = memo(function StatusBar({
|
||||
const modelMinutes = modelTimeMs / 60_000;
|
||||
const burnRate = modelMinutes >= 0.1 ? outputTokens / modelMinutes : null;
|
||||
|
||||
// Icons here are deliberately either full RGI emoji (📁 🔑 ⏳ 🔥 — string-width and terminals
|
||||
// agree they're 2 wide) or plain geometric shapes (◆ ▸ — agree they're 1 wide). Avoid
|
||||
// text-default emoji like ⏱ U+23F1 / ⏵ U+23F5: string-width calls them 1 but many terminals
|
||||
// (Windows Terminal, iTerm) render them 2, so a line drifts wider than Ink thinks and the live
|
||||
// region below leaves stranded copies of itself in scrollback on every re-render.
|
||||
return (
|
||||
<Box flexDirection="column" width="100%" paddingX={1}>
|
||||
<Box gap={1}>
|
||||
@@ -123,13 +128,13 @@ export const StatusBar = memo(function StatusBar({
|
||||
<Text dimColor>│</Text>
|
||||
<Text dimColor>🔑 {sessionId.slice(0, 8)}</Text>
|
||||
<Text dimColor>│</Text>
|
||||
<Text dimColor>⏱ {formatElapsed(elapsedMs)}</Text>
|
||||
<Text dimColor>⏳ {formatElapsed(elapsedMs)}</Text>
|
||||
<Text dimColor>│</Text>
|
||||
<Text dimColor>🔥 {burnRate === null ? "—" : `${formatTokenCount(burnRate)}/min`}</Text>
|
||||
</Box>
|
||||
<Box gap={1} justifyContent="space-between">
|
||||
<Text color={MODE_COLORS[permMode]}>
|
||||
⏵⏵ {MODE_LABELS[permMode]} (shift+tab to cycle)
|
||||
▸▸ {MODE_LABELS[permMode]} (shift+tab to cycle)
|
||||
</Text>
|
||||
<Text color="yellow">/export · /compact · /help · /exit</Text>
|
||||
</Box>
|
||||
|
||||
Reference in new issue
Block a user