Skip to content

fix(keybar): use one keyboard icon for the Show/Hide keyboard key on every layout - #5062

Merged
devswha merged 2 commits into
mainfrom
fix/keyboard-key-icon
Nov 30, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/keyboard-key-icon

Conversation

@devswha

@devswha devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner

What

The key that shows or hides the phone keyboard used two icon families: the docked key bar (All keys / Custom) drew PanelBottomOpen / PanelBottomClose, while Lean's floating bar drew Keyboard / KeyboardOff. Worse, the Input line switch on the left of the docked bar also drew Keyboard, so on a Lean bar with the input line on the two keys looked the same.

Now:

  • The Show/Hide keyboard key draws Keyboard when a tap opens the keyboard and KeyboardOff when a tap closes it, on every layout (same Key, same size and stroke, same aria-labels "Show keyboard" / "Hide keyboard").
  • The Input line switch draws TextCursorInput, the icon the input line itself and Settings → Terminal input mode already use, so it never looks like the keyboard key.

Settings previews (layout caps, phone preview) do not draw this key, so they are unchanged. No test pins these icons. Design reference: a keyboard glyph for the keyboard key, like the iPad's own keyboard-dismiss key (DESIGN.md updated).

Screenshots (390, scripts/terminal-keyboard-demo-regression.ts captures, demo data)

Before After
Light, keyboard down
Light, keyboard up
Dark, keyboard down
Dark, keyboard up

Checks

  • bun run typecheck: pass
  • bun test src/conventions.test.ts: 21 pass
  • bun scripts/terminal-keyboard-demo-regression.ts: all PASS (labels, aria-pressed, captures)

…every layout

The docked key bar drew PanelBottomOpen/PanelBottomClose while Lean drew Keyboard/KeyboardOff, and the Input line switch reused the Keyboard glyph. The keyboard key now shows Keyboard (tap opens) or KeyboardOff (tap closes) everywhere, and the Input line switch uses TextCursorInput, the input line's own icon.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • User Interface
    • The keyboard control now uses consistent keyboard icons across layouts, with a crossed-out icon when tapping will hide the keyboard.
    • The Input line switch now has its own distinct icon.
    • The keyboard control’s accessible name and pressed state reflect the action of the next tap.

The keyboard visibility control now uses Keyboard or KeyboardOff based on the next tap, across layouts. The Input line switch now uses TextCursorInput. The design documentation and changelog describe these icon changes.

Changes: Key-bar icons

Layer / File(s) Summary
Icon behavior and documentation
src/components/KeyBar.tsx, DESIGN.md, changelog.d/keyboard-key-icon.md
The keyboard control uses KeyboardOff when the next tap hides the keyboard and Keyboard otherwise, in every layout. The Input line switch uses TextCursorInput. The documentation describes the updated icons and says the control name and aria-pressed reflect the next tap.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#2333: This PR changes the same keyboard key’s label, icon, and aria-pressed state based on tap intent.

Suggested reviewers: mdobro, idrisgit

Merge Risk: Minimal · previous review 396a9

This change only updates the keyboard key and Input line icons and the related documentation. It does not alter keyboard behavior, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Show/Hide keyboard key now uses one keyboard icon family on every layout. It also matches the changeset, which switches KeyBar.tsx to Keyboard/KeyboardOff and Text…
Description check Passed The description covers the problem (two icon families for the same key, and the Input line switch looking like the keyboard key), the resulting behavior on every layout, and the aria-labels. It also l…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the Show/Hide keyboard key now uses one keyboard icon family on every layout. It also matches the changeset, which switches KeyBar.tsx to Keyboard/KeyboardOff and TextCursorInput. It is specific and concise, and the fix(keybar) prefix fits the change.

Full details: Description check

Explanation

The description covers the problem (two icon families for the same key, and the Input line switch looking like the keyboard key), the resulting behavior on every layout, and the aria-labels. It also lists validation commands and results. It does not follow the template's Validation wording exactly, since it does not state whether the full or fast check suite was run, and it does not mention contract-test coverage. The template asks for those only where relevant, and the change is UI-only, so the gap is minor. The description also embeds screenshots that reference an external repository commit, which the reviewer should be able to access.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d348d6c and 396a98f.

Files selected for processing: 3

  • DESIGN.md
  • changelog.d/keyboard-key-icon.md
  • src/components/KeyBar.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@devswha

devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Review round (one round, head 396a98f):

  • Codex (gpt-6.2-sol-fast via axwith): CLEAR. 96 in-memory renders of Lean, All keys and Custom: Keyboard always pairs with "Show keyboard", KeyboardOff with "Hide keyboard", the Input line switch is TextCursorInput. 108 targeted tests pass. Two LOW findings, both DESIGN.md sentences that were already wrong (Lean does show the Input line switch while the line is on; Attach files sits in the scrolling row before the pinned keyboard control).
  • omo gate: runtime change CLEAR. All six layout x state renders are correct; Chat and Settings previews draw no other toggle. Its MEDIUM was about review coverage, not code: Codex's output lacked an overfit/slop assessment. The gate ran that check itself and found no redundant tests or unneeded helpers. Its LOW was the same DESIGN.md Lean line.

Fixed both DESIGN.md LOWs in the follow-up commit (docs only, no code change).

@devswha
devswha merged commit d6129c0 into main Nov 30, 2026
15 checks passed
@devswha

devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 0f376f12c. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

One review round: Codex via axwith CLEAR, omo gate CLEAR on the runtime change (MEDIUM was review coverage only; gate's own overfit/slop pass found none). Both DESIGN.md LOWs fixed in 0f376f1. CI green, 0 unresolved threads.

@devswha
devswha deleted the fix/keyboard-key-icon branch November 30, 2026 12:08
devswha added a commit that referenced this pull request Nov 30, 2026
## Change

Found while testing the phone key bar (#5053, #5059, #5062) on a flip
phone's cover-screen size: with the keyboard up (about 220 CSS px left),
the arrow pad (187 px) covered the bar, including the key that closes
it.

The pad now gets the room above the bar from `KeyPanel`
(`--key-panel-room`) and its three rows shrink into it, never below an
icon's key; when even that does not fit, the pad scrolls instead of
reaching over the bar. Quick replies and History cap their height there
as well. At normal heights nothing changes (pad 187 px at 360x374 and
360x844).

No new control or setting.

**Withdrawn from this PR:** the first commit also mapped a Korean jamo
typed after the bar's Ctrl/Alt to its key's chord (ㅊ to Ctrl+C). Review
showed it is not safe without knowing the layout: Samsung's Cheonjiin
Plus shows ㅊ on the first tap toward ㅉ, Chromium can keep the preedit
past the blur that was meant to end it (ㅊ then ㅏ came out as 차 on
Gboard), and the commit filter could drop or leak text. A wrong control
key reaching the terminal is worse than today's typed jamo, so the last
commit removes it; the branch's net diff is the arrow pad only.

## Validation

- Measured on a live preview (isolated Ovis + herdr-core), Lean bar,
phone touch emulation: pad top/bottom vs bar top at 360x844 591/778 vs
786, 360x374 121/308 vs 316, 360x220 8/154 vs 162 (rows 41 px), 360x150
8/89 vs 97 (rows 26 px, icons fit, pad scrolls). Before the fix at
360x220 the pad ended at 195, over the bar at 162.
- `scripts/key-bar-pinned-history-regression.ts`: new case "the arrow
pad fits above the bar on a short screen"; all cases pass on this
branch, and the new case fails on origin/main. One local run hit the
existing `echo desk_only` wait (the flake another lane is fixing); the
rerun passed.
- `bun run typecheck` (exit 0), `bun test scripts/changelog-fold.test.ts
src/conventions.test.ts`.
- Not run locally: `bun run check fast` / `full` (CI runs them; this PC
was over 85% CPU).
devswha added a commit that referenced this pull request Nov 30, 2026
…d panels keep the prompt in sight (#5087)

One key bar PR, folded from #5077 and #5081 to cut CI reruns (on the
owner's word). Each part kept its own review round in its PR; the
commits here are those PRs' commits cherry-picked unchanged onto main
(every commit's `git patch-id` matches its original), #5077's first,
then #5081's. No new code in those commits. Added since: fc66de7 (the
editor lane's fix for CodeRabbit's nine threads on this PR,
cherry-picked unchanged from 078b6e8) and Part 3 below (from the
keybar-qa lane, bundled by area).

Validation of the fold: `bun run typecheck` (exit 0), `bun test
src/lib/terminalInput src/components/KeyBar src/lib/keyBar
src/lib/i18n.test.ts src/conventions.test.ts
scripts/changelog-fold.test.ts` (246 pass),
`scripts/key-bar-input-paths-regression.ts` (all pass) on the combined
branch; the rest is left to CI.

Note: Part 2 leaves KeyBar.tsx untouched as its text says; Parts 1 and 3
change it.

## Part 1: keys work mid-word, a held Ctrl applies to composed letters
(was #5077)

### Change

From the owner's own use of the phone key bar (#5053, #5059, #5062) on a
Galaxy phone:

1. **Key bar keys did nothing mid-word.** While the phone keyboard
composed a word (a Korean syllable half typed), `PaneTerminal` disabled
the whole bar (`disabled={composing || …}`), so Esc, Tab, arrows and
Ctrl looked dead. Now a key, a modifier, the arrow pad, a quick reply,
History, a text key or Paste first sends the word, once
(`CompositionHelper.commitNow` finalizes it synchronously, so the order
is word then key), then acts; a blur and a focus end the word in the
input method with the keyboard left up, and the input method's own later
end of it sends nothing. The keyboard show/hide key keeps refusing
mid-word as before.
2. **A held Ctrl/Alt was ignored by keyboards that compose Latin
letters.** A keyboard with predictive text composes even English words,
so a letter typed under the bar's Ctrl came out as text with the whole
word (Ctrl locked + c, c, c typed "ccc" in Claude Code). The letter now
goes out at once as its chord, and the composition's text so far counts
as sent (`markCompositionSent`), so the word's commit never repeats it.
Only a single Latin letter: a Korean jamo says nothing of the key it was
typed on (an earlier attempt at mapping jamo was withdrawn in #5070's
review: multi-tap layouts start other letters with the same jamo).
3. History now follows a chord as its control (Ctrl+C starts a fresh
line), not as the letter typed with it.
4. A locked modifier (two taps) shows a small lock under its name, in
place of the locked line; one tap still only lights it for the next key.
The owner did not know which was which.

| | Before | After |
|---|---|---|
| All keys, Ctrl tapped once (unchanged) | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-ctrl-once-light.png"
width="390"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-ctrl-once-light.png"
width="390"> |
| All keys, Ctrl locked, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-before-ctrl-locked-light.png"
width="390"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-after-ctrl-locked-light.png"
width="390"> |
| All keys, Ctrl locked, dark | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-before-ctrl-locked-dark.png"
width="390"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/full-after-ctrl-locked-dark.png"
width="390"> |
| Lean, Ctrl locked, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/lean-before-ctrl-locked-light.png"
width="390"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/lean-after-ctrl-locked-light.png"
width="390"> |

"Before" is the same build with the lock hidden and the old locked line
shown (390 px, DPR 3, live preview).

No new control or setting.

### Real-agent pass (Android emulator, Chrome 133, Gboard, real touch)

Claude Code 2.1.330 (Haiku 4.5) and Codex (GPT-6-Luna) through the team
proxy, each in its own HOME, in an isolated Ovis + herdr-core. "Bytes"
is what the bar sent (recorded on the page's socket); the same keys send
the same bytes on Lean, All keys and Custom (new browser test, case 1).

| Scenario | Claude Code | Codex | Layout(s) |
|---|---|---|---|
| Arrows + Enter in a menu (folder trust) | pass (pad Down, Enter) |
pass (pad Down, Up, Enter) | Lean, Custom |
| Esc | pass (clears input) | pass ("esc again to edit") | all |
| Tab | pass | pass (sends / queues) | all |
| Shift+Tab mode switch | pass (accept edits, then plan) | pass (BackTab
key: Plan mode) | All keys, Custom |
| Ctrl+C, Ctrl+C twice | pass (clears, then exits) | pass (^C pad key;
exits on the second) | Lean, Custom |
| Ctrl+O, Ctrl+R (phone keyboard letter) | pass (transcript, history
search) | n/a | All keys |
| Ctrl lock + c, c, c (Gboard) | pass (3 x ctrl+c, lock stays) | - |
Lean, All keys |
| Ctrl lock + composed letters (predictive keyboard, CDP composition on
the device) | pass after this PR (was "ccc") | - | Lean |
| Alt once / Alt lock | pass (alt+b x2, lock icon; unlocked b types b) |
pass (alt+tab; alt+esc x2) | All keys, Custom |
| Two-step key (Ctrl+X, Ctrl+E) | - | pass (ctrl+x, ctrl+e) | Custom |
| Text key (no Enter) | - | pass (typed into the prompt) | Custom |
| Quick reply | - | pass ("no" sent) | Custom |
| History pick | - | pass (put in the input line, unsent) | Custom |
| Korean mid-syllable then Esc / Tab / Ctrl / Enter / quick reply / pad
arrow | pass after this PR (syllable once, then the key; was: key
ignored) | pass after this PR | Lean, All keys, Custom |
| Korean jamo under Ctrl (ㅊ) | typed as text, Ctrl stays (unchanged, see
#5070) | same | all |
| Keyboard show / hide key | pass | pass | all |
| Paste key | preview is http, so the clipboard cannot be read: shows
its note (https app unaffected) | same | all |

**Does the bar cover the terminal?** Measured on the device (grid bottom
vs the top of the bar, pill, panels and input line), Claude Code idle at
its prompt: keyboard down, Lean 722 vs 726, All keys/Custom 722 vs 735;
keyboard up, Lean 414 vs 413 (the pill's 1 px border), All keys/Custom
423 vs 423. The grid moves up with the keyboard so its last rows sit
right above the bar; nothing is hidden in these states. Two cases still
cover rows and are left for the owner's call (not in this PR):
- the arrow pad, a popover, covers the last rows it sits over (Claude's
input row here): <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/finding-arrow-pad-over-claude-input.png"
width="240">
- a flip phone's cover screen with Gboard up leaves 42 CSS px: only the
tab strip shows, the grid and the bar are under the keyboard: <img
src="https://raw.githubusercontent.com/devswha/ovis/1fc76f010dcbb847158909c7b72a86e26eb65114/finding-cover-screen-keyboard-up.png"
width="240">

### Validation

- Android emulator (Chrome 133, Gboard Korean and English, real touch
via adb) against a live preview with an isolated Ovis + herdr-core, in a
shell and in real Claude Code (team proxy, Haiku 4.5): 가나 then Esc
mid-syllable sends "가나" then ESC; 다 then Tab, 가 then Ctrl, 나 then a
quick reply, 가 then the arrow pad's Left each send the syllable first,
once, then the key; the next syllable is typed as itself; the keyboard
stays up throughout. A predictive-text composition (CDP
`Input.imeSetComposition` on the device's Chrome) under a locked Ctrl
sends ctrl+c three times and the lock stays.
- New `scripts/key-bar-input-paths-regression.ts` (added to
ci-browser.sh): (1) Lean, All keys and a Custom bar send identical
frames for Esc, Tab, Up, Enter, ^C and Ctrl+r; (2) a locked Ctrl applies
to composed letters and shows its lock; (3) a key pressed mid-syllable
sends the syllable first, once. Passes here; on the base commit (2) and
(3) fail.
- `bun run typecheck` (exit 0); `bun test src/lib/terminalInput
src/components/KeyBar src/lib/keyBar.test.ts src/lib/keys.test.ts
src/lib/sentHistory.test.ts src/lib/useTypedKeys.hook.test.ts`,
conventions tests; `terminal-keyboard-demo-regression.ts` (20 PASS),
`key-bar-hold-repeat-regression.ts` (14 PASS),
`terminal-paste-insert-demo-regression.ts` (4 PASS).
- Left to CI: the herdr-backed browser scripts (`terminal-composition`,
`terminal-ipad-ime`, `keybar-focus`, `ui-ime`): this PC was too loaded
to build and run them locally.

## Part 2: feat(keybar): arrange the key bar by dragging keys onto a
phone that draws the real bar (was #5081)

Edit key bar becomes a place to arrange keys by hand, the way a phone's
home screen is arranged: a palette of keys over a phone's lower end that
draws the real key bar. The owner asked for this (a friendlier key bar
customisation, with keys dragged onto a phone mock); screenshots are
from an isolated session.

### Change
- **A phone that draws the real bar.** The editor (`KeyBarEditor`) keeps
a phone's lower end at the bottom: a strip of terminal, then the real
`KeyBar` with this device's layout: on a touch screen with its Input
line switch, Paste and keyboard control (and the mic where dictation is
on), on a desktop the keys alone, as the terminal draws it there. On a
phone it is as wide as the sheet, so the bar is drawn at the size the
terminal draws it; on a desktop it is `390px`. Its keys type nothing
there: a press picks a key.
- **A palette above it**, in three groups: **Basic keys**, **Function
keys** (the three panel keys by name, then the rest of the catalog) and
**My keys** (the keys you made, each with a delete button, then **New
key**, which opens the form for a text key or a combination in place). A
key that is on the bar is filled.
- **Drag.** Hold a key (400 ms, with a short buzz where the device has
one) or drag it with a mouse. The bar's keys step aside to show where it
lands; held at an end of the row, the row scrolls. A key passes a
neighbour when the middle of its cap passes the middle of that
neighbour's place, so a key held and let go where it was stays there,
and the slot saved is the slot shown. Dropped on the bar it is added
there, or moved there when the bar already has it. A bar key let go off
the bar is taken off; while one is up the terminal strip says so.
Release saves once; Escape or a cancelled touch leaves the bar as it
was. A swipe still scrolls the palette and the bar's row.
- **Fixed keys say why.** The mic, the keyboard control, the Input line
switch, Paste and Attach are not keys of the bar (the bar draws them
itself): they cannot be lifted, and a press says so in the status line.
- **Never drag-only.** A tap on a palette key puts it at the bar's end
or takes it off. A picked key gets **Move left**, **Move right** and
**Remove** beside its cap and place (`^C · 3/12`). With a keyboard the
bar is one tab stop: arrow keys choose a key, Shift with an arrow moves
it, Delete takes it off.
- **Undo and Restore defaults.** Undo steps back through the visit's
changes (20 at most), each only while the bar is still as that change
left it: another tab's change of the bar is taken up at once and is
never undone from here. Restore defaults returns the All keys row and
keeps the bar that was there as the Custom one.
- **Keys you made are kept.** A text key, a sequence or a combination
stays in My keys when it leaves the bar (new device setting
`keyBarOwnKeys`, through `sanitizeSettings`), until its delete button
removes it, from the bar and from a custom bar set aside too. My keys
hold 64; past that New key makes none and says so.
- Starting from Lean or All keys works as before: the editor edits the
bar the device has, and the first change makes it Custom.

### How it is built
- `src/lib/keyBarEdit.ts`: every edit (place, shift, remove, forget,
reset) is one reducer, `editKeyBar`, which hands back the very state it
was given when nothing changes, so an undo step is made only of a real
change.
- `src/lib/keyBarDrag.ts`: picking a key up. A mouse or pen is followed
through pointer events; a finger through touch events (as
`lib/touchReorder.ts` does), because only a touch move can be cancelled
once the key is up.
- `src/lib/keyBarDrop.ts`: where the carried key would land and the
bar's keys stepping aside. Transforms only: nothing in the document
changes place until the drop, so the touch that carries a bar key keeps
its target.
- `KeyBar.tsx` is not changed (another branch is working on key
behaviour there). The editor silences the bar's own key handlers in the
capture phase and marks the picked key and the tab stop on its buttons
after each render.
- The old list editor's CSS and strings are removed; `Move {name}
up/down` now has one user (the agent settings) and moved to that part's
dictionary.

### Design note (src/AGENTS.md)
None of the coding-agent apps DESIGN.md compares against has a key bar
to arrange, so the gesture is the phone's own: a home screen's hold,
drag and drop into the dock, under a palette of what can be added, as a
system's customize-toolbar sheet lays it out. DESIGN.md's Key bar
paragraphs are updated.

### Stored format, mixed versions
- New `ovis:key-bar-own` = the keys you made (`KeyBarItem[]`).
`ovis:key-bar` is unchanged. Device-only; no HTTP/WS contract change, no
new control in the chat composer.
- A tab still on the old code never writes `ovis:key-bar-own`, so its
saves cannot drop the keys you made (the first version of this PR kept
them inside `ovis:key-bar`, which that tab rewrites; the review caught
it).

### Not in this PR
- Paste cannot be moved: it is not an item of `keyBarItems`. Making it
one needs a change in `KeyBar.tsx` and the stored format.
- A bar edited from Lean becomes Custom and loses the floating look, as
before (`PaneTerminal.tsx` decides that from the layout).

### Accessibility (WCAG 2.2 AA, probed in Chromium on the built surface)
| Item | Result | Evidence |
|---|---|---|
| Contrast (1.4.3, 1.4.11) | PASS | group headings, status, New key
5.97:1 light / 5.82:1 dark; key caps 14.3:1 / 11.8:1; a key on the bar
15.2:1 / 12.0:1 |
| Focus visible (2.4.7, 2.4.11) | PASS | the bar's focused key keeps
`.key:focus-visible`'s ring in both themes; nothing covers it |
| Target size (2.5.8) | PASS | palette keys 44x46 (36 high with the
bar's own expander), tools 44x44, a key's delete button 34x44 |
| Keyboard (2.1.1, 2.1.2) | PASS | add and remove with the palette's
toggles, choose with arrows, move with Shift and an arrow, Delete, Undo,
Restore defaults; Escape puts a carried key back, the next one leaves
the editor |
| Dragging (2.5.7) | PASS | every drag has a tap or button path (above)
|
| Reflow (1.4.10) | PASS | `settings-pages-demo-regression.ts`: the key
bar editor fits 320, 360 and 390 px in en, ko, ja and zh; no sideways
scroll at 360x374 |
| Motion | PASS | the keys' step-aside transition is off under
`prefers-reduced-motion` |
| Names | PASS | palette keys are toggles (`aria-pressed`) with spoken
names; the phone is a group named Key bar preview with the keyboard's
keys as its description; the status line is `role="status"` |

### Validation
- `bun run check fast`: workflow syntax, generated types, generated
themes, typecheck and build ok; unit tests 1 failure in 1,366 files,
`src/lib/markdownPreview.test.ts` "previews a bare address of 50,000
open parentheses" (its worker's 2 s deadline, on a PC at load average
128). That file is not touched here and passes alone (18 pass). After
the rebase on main: typecheck and the touched suites again (238 pass)
- New unit tests: `src/lib/keyBarEdit.test.ts` (18: place at a spot,
move instead of adding twice, a full bar, own keys kept, shift ends,
remove, forget, no-op identity, reset keeps the custom bar, drop slot
geometry, undo limit), `src/components/KeyBarEditor.test.tsx` (14: tap
adds and removes and saves, fixed keys say why, a bar key's press opens
no panel and picks, tools stop at the end, Shift+arrow keeps the focus,
Delete, Undo after Restore defaults, a made key stays in My keys until
deleted), `src/lib/settings.test.ts` (own keys sanitized, device scope,
kept through an older tab's save). They fail on main (the modules and
the setting do not exist) and each was shown red against a mutation of
its owner: the full-bar guard, the silenced bar click, `own` left out of
the stored record, a removed own key not kept, and after the review: a
text key the bar could not pick, Undo over another tab's change, own
keys read back from the key bar record, a deleted key left in the custom
bar, a focus request left pending by a refused move.
- Browser regressions rewritten for the new editor and run here on the
demo: `scripts/key-bar-customization-demo-regression.ts` (8 PASS:
long-press drag last-to-first with edge scrolling, one save on release,
reload persistence, Escape / touchcancel / no-op cancellation, swipes
that scroll without moving a key, mouse reorder, palette-to-bar add at
the drop spot, drag off to remove, fixed keys that say why, then the
existing add / combination / modifier / empty-bar / defaults flow),
`scripts/sticky-modifiers-regression.ts` (exit 0),
`scripts/settings-pages-demo-regression.ts` (exit 0; a key the bar's own
scrolling row hides is not counted as cut off).
- Review: one round, two reviewers. The first found no HIGH or MEDIUM
(three LOW); Codex (via axwith) found one HIGH and nine MEDIUM, all
fixed in the second commit: own keys dropped by an older tab's save (now
their own storage key), a stale editor overwriting another tab's bar and
Undo erasing it (storage changes are taken up, Undo checks the bar), a
key held by its edge moving on release (the cap's middle against the
neighbours' places), the release saving a slot one past the one shown
(no scroll on drop), Escape's release toggling the palette key, a drag
ended by another pointer, a keyboard edit during a drag, text keys
disabled in the bar the editor draws, a deleted key left in the custom
bar set aside, the 65th own key lost silently; and the LOWs: the mic and
phone controls drawn where the terminal has none, the focus lost after
Remove, a pending focus request, a hold surviving a sheet drag.
- Real touch on an Android emulator (Chrome 133, `adb shell input
motionevent`, my own read-only instance): tap adds; long press and drag
adds at the spot, reorders, and takes a key off; a quick and a slow
swipe scroll the row and the palette and move nothing; a long press on
the keyboard key lifts nothing; a tap picks the key under the finger;
Remove and Undo. At a folded phone's cover size (360x374 screen, a
360x266 page under Chrome's bars): add by drag and drag off. Found and
fixed there: a long press focuses the key about 100 ms after the lift,
which showed it as picked while it was carried. This ran before the
review fixes; after them the same drags were repeated in Chromium with
touch events and in the rewritten browser regression.
- Looked at: 390x844, 360x740, 360x374 and 1280x900, light and dark, in
the idle, picked, New key, drag-in and drag-off states; Lean (floating)
bar in the editor, light and dark.
- Not run: the full integration and browser job (CI runs it), iOS Safari
(the touch path is the one `lib/touchReorder.ts` already uses there, but
this editor was not driven on a device).

### Screenshots (before = main 71e37b0, after = this branch; isolated
session, Korean UI)
| | Before | After |
|---|---|---|
| Phone 390, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/before-390-light.png"
width="300"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-390-light.png"
width="300"> |
| Phone 390, dark | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/before-390-dark.png"
width="300"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-390-dark.png"
width="300"> |
| 360x374 (a folded phone's cover), light | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/before-360x374-light.png"
width="300"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-360x374-light.png"
width="300"> |
| Desktop 1280, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/before-desktop-light.png"
width="420"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-desktop-light.png"
width="420"> |

| Dragging a key in | Dragging a key off | A picked key | New key |
|---|---|---|---|
| <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-drag-add-390-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-drag-off-390-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-picked-390-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-new-key-390-light.png"
width="220"> |

| Phone 360, light | Phone 360, dark | Dragging in, dark |
|---|---|---|
| <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-360-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-360-dark.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/after-drag-add-390-dark.png"
width="220"> |

Real touch on the Android emulator (add at a spot, reorder, drag off),
and the cover size with a key being dragged off. Both were recorded
before the review fixes, when the editor still drew a mic with dictation
off:

<img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/android-real-touch.gif"
width="300"> <img
src="https://raw.githubusercontent.com/devswha/ovis/60a39f16b25fab6870e85201edc9a35c73fff95a/android-cover-drag-off.png"
width="300">

## Part 3: the arrow pad at the right edge, the cursor row above key-bar
panels, Korean letters under Ctrl, History's caret (keybar-qa)

The owner's decisions after using the bar (relayed by the lead):
- **Arrow pad** opens at the right edge (it covered an agent's prompt
and menus read from the left), and while the pad, Quick replies or
History is open the terminal is drawn moved up under it (a transform, no
resize of the shared pty) so the cursor's row, an agent's prompt or the
picked menu line, stays in sight. Not while history is read or over a
folded grid; it follows grid resizes and host scrolls, and never moves
the cursor's row past the pane's top. A press on the grid that closes
the panel only closes it (its release and click reach nothing, since the
grid moves back as it closes). A bar a wide window hides shows no panel.
- **Korean letter under Ctrl/Alt**: a jamo names no key on multi-tap
layouts, so nothing is sent for it, the modifier stays, and a note says
to use the English keyboard or the bar's ^C (ko/ja/zh). Read from
whether the modifier was on when the letter was typed, so Safari's held
syllable flushed by a later ^C still goes out; hardware chords and bar
keys are untouched.
- **History**: the picked line goes into the input line with the caret
after it (it was at the start, so typing went in front of it); the focus
and keyboard stay there.

Measured on the Android emulator (Chrome, Gboard, real touch) against
real Claude Code: with the keyboard up, the pad sits at the right and
Claude's prompt row stays above it (grid moved up 162 px), Quick replies
33 px; nothing is lifted once it closes. Ctrl then ㅊ sends nothing and
shows the note, Ctrl stays; Korean typed without Ctrl goes as usual;
Gboard English with Ctrl locked sends ctrl+c on each c. History pick:
focus in the input line, caret at the end, keyboard up.

Review: Codex via axwith on the first commit (BLOCK: tap-through on
dismiss, folded grids, scrollback, resize, wide windows, Hangul guard
timing) fixed in the second commit. Tests: three new cases in
`scripts/key-bar-input-paths-regression.ts` (Korean letter under Ctrl,
pad at the right edge with the cursor row above it, History caret), all
pass with the rest.

---------

Co-authored-by: sisyphus-dev-ai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant