Skip to content

fix(mobile): hardware keyboard shortcuts work as soon as their screen opens - #29679

Open
saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:fix/mobile-keyboard-command-registrations
Open

saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:fix/mobile-keyboard-command-registrations

Conversation

@saphid

@saphid saphid commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Hardware-keyboard shortcuts registered by a newly opened screen were missing from the native enabled-command list until navigation changed. React Compiler dropped an unread registrationVersion memo dependency, so the provider missed registrations made after its first render.

Read the version through registeredCommands(registrationVersion) so the compiled memo invalidates when the registry changes. This preserves the existing native iOS and Android dispatch paths. The integration adapts the regression test's two workspace mocks to main's layout/workspace paths; its assertion is unchanged.

Verification

Integrated with main cc97303, using Node 26.12.1 in Linux Boat:

  • Old mock paths fail during import. With corrected mocks and main's unmodified provider, the mounted regression fails because focusSearch is absent. The candidate passes.
  • check:changed passes format, lint, knip, two package typechecks, the mounted regression and six selected React Compiler checks. The owning provider is compiled with the release React Compiler in the test's react project.
  • Fresh independent review by Claude Opus 5.5, high reasoning, Claude Code through T3 Code, completed with no P1/P2 findings on frozen tree b4c75d141c98fdfe53a2bd73642c255debdbd9cb (task 570cc4c7-c5e1-4ae8-83e6-58e6eb2e7bcd). The reviewer inspected supplied logs and did not rerun tests.

No fresh iPad or Android hardware-keyboard pass was performed. Hosted CI must run on the pushed merge commit; older green checks are historical.

Original implementation: Claude Opus 5.5 in Claude Code, with the previously recorded GPT-6.1 Sol review. Current-main test adaptation and verification: GPT-6.1 Sol in Codex through T3 Code, independently reviewed by Claude Opus 5.5.

… opens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 2, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Nov 2, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5070172

Macroscope's review found this PR approvable — Updates mobile hardware-keyboard shortcuts when screens register their commands, without changing the commands or their actions. The limited refresh and test-configuration changes carry no obvious material risk.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The provider retrieves registered hardware keyboard commands using the registration version. A test checks that focusSearch reaches the native command component, and the React test project includes that test.

Changes: Hardware keyboard commands

Layer / File(s) Summary
Versioned command registration and test
apps/mobile/src/features/keyboard/HardwareKeyboardCommandProvider.tsx, apps/mobile/src/features/keyboard/HardwareKeyboardCommandProvider.test.tsx, apps/mobile/vite.config.ts
The provider retrieves registered commands using the registration version. The test checks that the native command component receives focusSearch, and the React test project includes the test.

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 50701

This change makes hardware keyboard shortcuts available as soon as their screen opens. No merge-blocking risk was found. Physical device testing was not performed, which is normal residual uncertainty.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the primary change: hardware keyboard shortcuts in the mobile app now work as soon as their screen opens. It uses a conventional commit prefix, and the changeset adds a helper that mak…
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.
Description check Passed The description covers the problem (hardware-keyboard shortcuts from a newly opened screen missing from the native enabled-command list because React Compiler dropped the unread registrationVersion me…
Full details: Title check

Explanation

The title names the primary change: hardware keyboard shortcuts in the mobile app now work as soon as their screen opens. It uses a conventional commit prefix, and the changeset adds a helper that makes the compiled memo depend on registrationVersion, which fixes that behavior.

Full details: Description check

Explanation

The description covers the problem (hardware-keyboard shortcuts from a newly opened screen missing from the native enabled-command list because React Compiler dropped the unread registrationVersion memo dependency) and the change (reading the version through registeredCommands(registrationVersion)). It also gives a detailed verification section with commands run, results, reviewer notes, and what was not tested on hardware. Gaps against the template: the header comment asks for a conventional commit title, and the PR description does not show one; the Scope section does not link an issue or a maintainer request, though the objectives cite PR #29679 and the description does not explain why a linked issue is absent; the description does not state the bug is a fix rather than a feature, although the problem framing implies it. The agent attribution line is present. Overall the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a587f51 and 5070172.

Files selected for processing: 2

  • apps/mobile/src/features/keyboard/HardwareKeyboardCommandProvider.test.tsx
  • apps/mobile/vite.config.ts

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

Preserve the registration-version fix and adapt the test mocks to the current workspace modules.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review November 12, 2026 23:50

Dismissing prior approval to re-evaluate 5070172

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant