feat(v0.3): keybar Claude shortcuts + scrollback search + clickable links
- keybar: add Esc·Esc / ^O / ^T / ^B + per-button tooltips (KEY_MAP 14 keys)
- M1 search: @xterm/addon-search per terminal; 🔍 toolbar button + search box
(Enter=next, Shift+Enter=prev, Esc=close)
- M2 links: @xterm/addon-web-links per terminal (tap URLs Claude prints)
- tab bar split into #tabs (scrollable) + #toolbar (utility cluster) for future
utilities (QR/settings/dashboard)
- Browser-verified: 14 keybar buttons, search highlights matches, no console errors.
199 tests green, typechecks + build ok.
This commit is contained in:
@@ -78,10 +78,18 @@ describe('keybar', () => {
|
||||
expect(KEY_MAP.slash).toHaveLength(1)
|
||||
})
|
||||
|
||||
it('all 10 keys are defined', () => {
|
||||
it('Claude Code control keys map to the right bytes', () => {
|
||||
expect(KEY_MAP.escEsc).toBe('\x1b\x1b') // rewind / clear draft
|
||||
expect(KEY_MAP.ctrlO).toBe('\x0f') // expand transcript
|
||||
expect(KEY_MAP.ctrlT).toBe('\x14') // task list
|
||||
expect(KEY_MAP.ctrlB).toBe('\x02') // background
|
||||
})
|
||||
|
||||
it('all 14 keys are defined', () => {
|
||||
const keys = Object.keys(KEY_MAP)
|
||||
expect(keys).toEqual([
|
||||
'esc',
|
||||
'escEsc',
|
||||
'shiftTab',
|
||||
'arrowUp',
|
||||
'arrowDown',
|
||||
@@ -89,6 +97,9 @@ describe('keybar', () => {
|
||||
'arrowRight',
|
||||
'enter',
|
||||
'ctrlC',
|
||||
'ctrlO',
|
||||
'ctrlT',
|
||||
'ctrlB',
|
||||
'tab',
|
||||
'slash',
|
||||
])
|
||||
@@ -96,8 +107,8 @@ describe('keybar', () => {
|
||||
|
||||
it('all mapped bytes are unique strings', () => {
|
||||
const bytes = Object.values(KEY_MAP)
|
||||
expect(bytes).toHaveLength(10)
|
||||
expect(new Set(bytes).size).toBe(10) // all unique
|
||||
expect(bytes).toHaveLength(14)
|
||||
expect(new Set(bytes).size).toBe(14) // all unique
|
||||
})
|
||||
|
||||
it('ANSI arrow sequences use correct format', () => {
|
||||
|
||||
Reference in New Issue
Block a user