Files
Handy/.github/workflows/code-quality.yml
Brian McBrayer 141f981d4d fix: emit parseable names for compound shortcut keys (#1862)
* fix: emit parseable names for compound shortcut keys

global-hotkey rejects spaced tokens like "scroll lock", so Scroll Lock
and similar keys failed to register from the Tauri shortcut recorder.
Store compact names both backends accept, keep friendly UI labels, and
add a standalone regression test for the mapping.

* test: assert compound shortcut keys parse on both backends

Locks the #1848 compact-name invariant against both global-hotkey and
handy-keys so the Tauri recorder fix cannot silently break HandyKeys.

* test: only assert compound keys parse successfully on both backends

Drop the spaced-form failure checks; the useful guarantee is that the
compact names work with both Tauri and HandyKeys parsers.

* refactor: drop unused legacy spaced-key normalize path

getKeyName already emits compact compound names in the same binary, and
normalizeKey is only used during live recording — so the spaced→compact
fallback never ran in practice and only preserved the old bug shape.

* test: streamline shortcut key coverage

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-09-19 15:13:46 +08:00

63 lines
1.4 KiB
YAML

name: "code quality"
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "src/**"
- "src-tauri/src/catalog/catalog.json"
- "scripts/**"
- "package.json"
- "bun.lock"
- ".eslintrc*"
- "eslint.config.*"
- ".prettierrc*"
- "tsconfig*"
- "tailwind.config.*"
- ".github/workflows/**"
pull_request:
paths:
- "src/**"
- "src-tauri/src/catalog/catalog.json"
- "scripts/**"
- "package.json"
- "bun.lock"
- ".eslintrc*"
- "eslint.config.*"
- ".prettierrc*"
- "tsconfig*"
- "tailwind.config.*"
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check translation consistency
run: bun run check:translations
- name: Check model language coverage
run: bun run check:model-languages
- name: Test keyboard utilities
run: bun run test:keyboard
- name: Run ESLint
run: bun run lint
- name: Run prettier
run: bun run format:check