Skip to content

feat(controller): new tabs start on the address bar, an arrow-and-hand pointer, a smooth glide - #105

Open
lippdev wants to merge 1 commit into
feat/xbox-keyboardfrom
feat/newtab-keyboard-and-cursor
Open

lippdev wants to merge 1 commit into
feat/xbox-keyboardfrom
feat/newtab-keyboard-and-cursor

Conversation

@lippdev

@lippdev lippdev commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Stacked on #104 ← #103 ← #101.

Summary

  • New tab = ready to type. Navigation.newTab now calls Shell.typeInAddress(), which runs enterChrome() and then opens the keyboard on the address. That covers the + button, Ctrl+T, the menu and --new-tab.

    • Confirming the address sends focus-page, so the page that loads gets the D-pad, as in Edge.
    • A tab view grabs the window's focus about 10 ms after it is attached (traced with focus events). While the keyboard types into the address, the shell takes the focus back on the next tick. It has to wait a tick because the tab is told it gained focus before the shell is told it lost it.
  • Address field follows the tab until the user types in it. Before, a field that kept the focus stayed blank while the page loaded.

  • Pointer from the reference: a white arrow with a black edge, which turns into a pointing hand over links, buttons, form controls and anything with cursor: pointer. The tip of the arrow and of the finger is the click spot.

  • Smooth movement. Measured as distinct positions drawn per second while the stick is held:

    • before: 15/s, with gaps up to 83 ms
    • stick read every poll, scaled by elapsed time: 39/s
    • plus the page gliding to the newest position on requestAnimationFrame: 137/s (on the 144 Hz test monitor)

    The main process also draws only the newest position (no queue). Clicks always use the newest position, never the drawn one.

Test plan

  • npm run typecheck
  • npm test (118 passed)
  • npm run test:e2e (61 passed, 3 skipped), with two new tests:
    • a new tab opens with the keyboard up and the shell holding the focus, and the D-pad types into the address
    • the pointer is an arrow over plain content and a hand over a button
  • Screenshots of the arrow and the hand; frame-rate measurement before and after

🤖 Generated with Claude Code

…d pointer, a smooth glide

- A new tab (the + button, Ctrl+T, the menu, --new-tab) opens with the
  address field focused and the controller keyboard up on it. Confirming
  the address hands the focus to the page that loads, as in Edge. A tab
  view takes the window's focus as it is attached, so while the keyboard
  types into the address the focus goes back to the shell.
- The address field follows the tab's address until the user types in it,
  so a page that loads while the field has the focus shows its address.
- The pointer is a white arrow with a black edge, and a pointing hand over
  links, buttons and anything a page gives cursor: pointer; the tip of
  either is where the click lands.
- The pointer used to jump 15 times a second. The stick now moves it on
  every poll, scaled by the time since the last one so the speed is the
  same; the main process draws only the newest position; and the page
  glides the pointer to it on every frame of the screen (about 140 per
  second on the test monitor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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