Repository navigation
fix(settings): show the default word separators as an editable value - #28336
Conversation
|
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Priority: Severity of issue fixed: Medium Merge Risk:
|
Double-click selected across spaces when a custom Word Separators value omitted the space. The field was empty with the default (which starts with an invisible space) only as a placeholder, so users rebuilt the list without it. Like xterm.js, VS Code and Ghostty, Orca keeps respecting the configured value exactly; the field now shows the default as its value, offers Reset when customized, and warns when no space is included. Fixes stablyai#28335 Co-authored-by: Kazuki Hanai <kazukihanai@sakana.ai>
d2b47db to
4767ccd
Compare
|
Thanks for tracking this down, @kazuki-hanai. Your diagnosis of #28335 was right. We changed the approach, though, and rewrote the branch. You're still credited as co-author. Why the approach changed: most terminals respect the configured separator list exactly, and so does xterm.js, which Orca's setting is passed to. VS Code ( What was really confusing was the settings field. It was empty, and the default appeared only as a placeholder. That placeholder starts with an invisible space and disappears once you start typing, so it was easy to rebuild the list without the space. The field now:
We removed the old description key from all the locale catalogs. This will merge once CI is green. |
ELI5
If you customize the terminal's "Word Separators" setting and the value does not contain a space (the placeholder's leading space is invisible, so this is easy to do by accident), double-clicking a word selects the whole line. Orca now always treats spaces and tabs as word boundaries, no matter what the setting says.
What Changed
normalizeTerminalWordSeparatorinsrc/shared/terminal-word-separator-settings.ts: prepend space and tab to a custom separator list when missing; returnundefinedfor empty or non-string values so the xterm default still appliesterminalWordSeparatoris passed to xterm:terminal-pane-manager-options.ts(regular and floating panes) andpreview-terminal-options.ts(dashboard preview)Why
The setting is forwarded to xterm's
wordSeparatoras-is, and xterm treats only the configured characters as boundaries. A value like()[]{},'"silently disables whitespace as a boundary, so double-click selection expands across the entire line. No configuration plausibly wants double-click selection to cross spaces, so whitespace is now force-included instead of trusting the raw setting.Linked Issue
Fixes #28335
Visual Proof
Captured with the repo's bundled (patched) xterm build rendering
dig-style output, dispatching a real double-click on the IP address. Before uses the raw separator value()[]{},'"-; after uses the same value passed throughnormalizeTerminalWordSeparator.Before (selection expands to the whole line):
After (only the word under the cursor is selected):
Testing
pnpm test src/shared/terminal-word-separator-settings.test.ts src/renderer/src/components/dashboard-popout/preview-terminal-options.test.tspassespnpm tcand the changed-files quality gate passPlaywright harness against the bundled xterm build confirms the selection behavior (screenshots above): before selects
example.com. 60 IN A 198.51.100.142, after selects198.51.100.142Tested on macOS; the change is pure string normalization with no platform-specific behavior
I manually tested these changes locally (verified via the xterm harness above, not a full app run)
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude Code (Claude Fable 5), reviewed and verified by the submitter.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No security, SSH/remote, mobile, or wire-compatibility impact: the normalization happens renderer-side right before the value reaches xterm, and the stored setting is unchanged. Backwards compatible: unset or empty settings still fall through to the xterm default.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code