Repository navigation
Conversation
…0/11 reply echo on POSIX Non-agent panes (plain shells with prompt themes like Oh My Posh) also emit OSC 10;? / 11;? during startup. Without PtyStartupIngress, the renderer answers the query and the cooked-mode echo leaks as visible text: "10;rgb:ffff/ffff/ffff11;rgb:2828/2c2c/3434". The fix for stablyai#12112 only armed PtyStartupIngress for agent panes. This extends it to all panes by falling back to getTerminalViewColorQueryReplyColors() (the terminal view-attribute store) when getStartupTerminalColorQueryReplyColors() returns null for non-agent panes — the same pattern already used in orca-runtime.ts for the daemon/remote path. Fixes stablyai#14306
📝 WalkthroughWalkthroughPTY startup paths now use terminal-view colors when request-specific startup colors are unavailable. Regression tests cover OSC 10/11 replies, cooked-mode echo suppression, coalesced shell prompt output, and renderer-only reply leakage. Spanish, Japanese, Korean, and Chinese locales now include caffeinate status and agent-awake settings translations. Merge Risk: 🔵 Low · up to The change is mergeable, with a minor Korean-language follow-up: three agent-related labels remain in English, causing a limited localization inconsistency without functional impact. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0efc38be-0009-4bec-87ed-b797efa9a5bd
📒 Files selected for processing (2)
src/main/ipc/pty.tssrc/renderer/src/components/terminal-pane/issue-non-agent-pane-startup-color-reply-leak.repro.test.ts
…eply leak test Address CodeRabbit review: guard against ingress dropping the whole coalesced chunk by asserting the prompt text survives suppression.
|
Addressed in 4b9df55: added |
Add 13 missing i18n keys per locale (52 total) for the keep-awake corner chip and settings panel. Previously these showed English fallback text on Chinese, Japanese, Korean, and Spanish UIs. CaffeinateStatusSegment (10 keys): on/auto/off/active/inactive labels, ariaLabel, title, and mode descriptions. agent-awake-copy (3 keys): modeTitle, modeDescriptionWindows, modeDescriptionDefault. ja uses "Agent" (Latin) per codebase convention enforced by locale-phrase-fixes policy. Closes stablyai#14490
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d46744fe-1598-492f-b581-2f5cb28d0117
📒 Files selected for processing (4)
src/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.
| "e5995ce268": "agents 작업 중 컴퓨터를 깨어 있게 유지", | ||
| "95d3031db2": "agents가 작업하는 동안 이 컴퓨터와 디스플레이를 깨어 있게 유지합니다. 뚜껑을 닫을 때의 동작은 이 기기의 전원 설정을 따릅니다.", | ||
| "a42f6fbdd8": "agents가 작업하는 동안 이 컴퓨터와 디스플레이를 깨어 있게 유지합니다. Orca는 전원 정책에 따라 뚜껑이 닫혀 있을 때도 이 기기를 깨어 있게 유지하도록 요청합니다." | ||
| "a42f6fbdd8": "agents가 작업하는 동안 이 컴퓨터와 디스플레이를 깨어 있게 유지합니다. Orca는 전원 정책에 따라 뚜껑이 닫혀 있을 때도 이 기기를 깨어 있게 유지하도록 요청합니다.", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- target locale entries ---'
sed -n '3505,3530p;9128,9145p' src/renderer/src/i18n/locales/ko.json
printf '%s\n' '--- English counterparts and nearby keys ---'
rg -n -C 2 '"a42f6fbdd8"|CaffeinateStatusSegment|agent.awake|agents' src/renderer/src/i18n/locales/en.json src/renderer/src/i18n/locales/ko.json
printf '%s\n' '--- product terminology in Korean locale ---'
rg -n '"[^"]*(에이전트|agents)[^"]*"' src/renderer/src/i18n/locales/ko.json | head -80Repository: stablyai/orca
Length of output: 50370
🏁 Script executed:
#!/bin/bash
python3 - <<'PY'
import json
from pathlib import Path
en = json.loads(Path("src/renderer/src/i18n/locales/en.json").read_text())
ko = json.loads(Path("src/renderer/src/i18n/locales/ko.json").read_text())
def get(obj):
for part in ("settings", "agent-awake-copy"):
obj = obj[part]
return obj
for key, source in get(en).items():
translated = get(ko).get(key)
if "agent" in source.lower() or "agents" in source.lower() or "agents" in str(translated).lower():
print(f"{key}: en={source!r} | ko={translated!r}")
PY
nl -ba src/renderer/src/i18n/locales/ko.json | sed -n '9130,9145p'Repository: stablyai/orca
Length of output: 324
🏁 Script executed:
#!/bin/bash
python3 - <<'PY'
import json
from pathlib import Path
def find_key(value, target, path=()):
if isinstance(value, dict):
for key, child in value.items():
if key == target:
yield path + (key,), child
yield from find_key(child, target, path + (key,))
elif isinstance(value, list):
for i, child in enumerate(value):
yield from find_key(child, target, path + (str(i),))
for locale in ("en", "ko"):
data = json.loads(Path(f"src/renderer/src/i18n/locales/{locale}.json").read_text())
matches = list(find_key(data, "agent-awake-copy"))
print(f"{locale}: {len(matches)} match(es)")
for path, block in matches:
print("path:", ".".join(path))
for key, value in block.items():
print(f" {key}: {value!r}")
lines = Path("src/renderer/src/i18n/locales/ko.json").read_text().splitlines()
for i, line in enumerate(lines, 1):
if '"agent-awake-copy"' in line or '"e5995ce268"' in line or '"95d3031db2"' in line or '"a42f6fbdd8"' in line:
print(f"{i}: {line}")
PYRepository: stablyai/orca
Length of output: 1889
Translate all generic agent references in agent-awake-copy.
Change agents to 에이전트 in e5995ce268, and change agents가 to 에이전트가 in 95d3031db2 and a42f6fbdd8.
Summary
PtyStartupIngressfor agent panes; this extends it to all panes by falling back togetTerminalViewColorQueryReplyColors()(the terminal view-attribute store) whengetStartupTerminalColorQueryReplyColors()returns null for non-agent panesorca-runtime.tsfor the daemon/remote path:launchOpts.terminalColorQueryReplies ?? getTerminalViewColorQueryReplyColors()Root cause
OSC 10;?/OSC 11;?during startupPtyStartupIngressis not armed, so the query reaches the renderer's xtermsendInputImmediate— reply goes back to the PTY10;rgb:ffff/ffff/ffff11;rgb:2828/2c2c/3434Changes
src/main/ipc/pty.ts: Added?? getTerminalViewColorQueryReplyColors()fallback at both local (line ~4822) and daemon (line ~6269) spawn pathssrc/renderer/src/components/terminal-pane/issue-non-agent-pane-startup-color-reply-leak.repro.test.ts: New repro test verifying echo suppression with view-attribute colors on POSIXTest plan
pty-startup-ingress.test.ts— 42 tests passpty-startup-ingress-live-query-reply.test.ts— 10 tests passissue-12112-agent-pane-startup-color-reply-leak.repro.test.ts— 4 tests passterminal-capability-replies.test.ts— 14 tests passFixes #14306