Repository navigation
feat(shortcuts): remap single-key shortcuts per device - #93
Merged
Merged
Conversation
Effective bindings (defaults + per-device overrides) in src/lib/shortcuts.ts with a subscribe/get store and useShortcuts hook; Settings → Pintasan lets users change, reset and reset all single-key shortcuts, rejecting conflicts and forbidden keys. Cheat-sheet, sidebar and command palette hints follow the effective keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s UI Unit tests for which bindings are remappable, forbidden keys, same-scope and global conflicts, override merging, stale storage and the store's subscribe/persist cycle. Component tests for record, reject, Esc/Tab cancel, per-row reset and "Reset all". Recording now refuses Ctrl/Cmd/Alt combos (only the key string was validated before) and Tab leaves record mode instead of being swallowed, so there is no keyboard trap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On coarse pointers each project tree row is at least 44px tall with no vertical padding, so the centred 44px hit area of the expander and add-sub-project buttons fills the row rather than spilling into the rows above and below; the name link spans the full row height. Desktop rows are unchanged. ACCESSIBILITY.md updated for 2.1.4 (now remappable per device) and 2.5.8 (project tree gap closed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Deployment failed for project demo-2ndbrain.ilramdhan.dev with the following error: Learn More: https://vercel.com/ilramdhans-projects?upgradeToPro=build-rate-limit |
|
Deployment failed for project second-brain with the following error: Learn More: https://vercel.com/ilramdhans-projects?upgradeToPro=build-rate-limit |
ilramdhan
marked this pull request as ready for review
October 8, 2026 09:18
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single-key shortcuts can now be remapped per device (WCAG 2.1.4), and the project tree's touch hit areas no longer overlap (WCAG 2.5.8).
Shortcut remapping
src/lib/shortcuts.tsis now the source of effective bindings:SHORTCUTSstays the defaults;applyOverrides,findConflict,remapShortcut,parseOverrides,isAllowedShortcutKeyare pure; a small store (getEffectiveShortcuts,subscribeShortcuts,setShortcutKey,resetShortcut,resetAllShortcuts) persists{ id: key }in localStorage (second-brain-shortcut-overrides, try/catch like the single-key switch). Invalid, unknown, non-remappable or conflicting stored entries are dropped on read.matchShortcutdefaults to the effective bindings, so the handlers in_authenticated.tsx,use-keyboard-nav.ts(lists, kanban, timeline,NotesBoard) andcalendar.tsxfollow remaps without further changes.useShortcuts()(src/hooks/use-shortcuts.ts,useSyncExternalStore) re-renders the?cheat-sheet, the sidebar "Tugas cepat" key hint and new CommandMenu hints (quick task, shortcut sheet).Ctrl/⌘+Kand arrow/Enter/Home/End/Esc (inList) bindings stay fixed and are shown read-only ("Tetap").ShortcutSettings: "Ubah" → record mode (next key; Esc cancels, Tab cancels and moves focus so there is no keyboard trap), per-row reset, "Reset semua". Errors arerole=alert, successrole=status.src/lib/i18n/core.ts;kbDescriptionnow shows the effective cheat-sheet key.Project tree touch targets (
/projects, tree view,TreeNodeinprojects.index.tsx)coarse:rows aremin-h-11withpy-0, so the centred 44pxtap-areaof theicon-smexpander / add-sub-project buttons fills the row height instead of spilling into neighbouring rows; the name link stretches to the full row height. Desktop unchanged. No changes tobutton.tsx.ACCESSIBILITY.md updated (2.1.4 now remappable per device; 2.5.8 project tree gap closed, generic remaining gap kept).
Closes #
Type of change
feat– new featurefix– bug fixrefactor/perf– no behavior change / performancedocs/test/chore/ciHow to test
n: status "Tugas cepat sekarang N". Leave settings;nopens quick task,qdoes nothing; sidebar showsN;?sheet and ⌘K palette hint showN.t: "Sudah dipakai untuk Lompat ke hari ini" (calendar). PressTab/F5/Ctrl+P: refused.Esccancels.s;smoves down,↓still works. Calendar: remapt→o./projectstree view rows are 44px; expander and + buttons don't overlap rows above/below. Desktop look unchanged.Screenshots / recordings
Not captured (agent run). UI uses existing
Button/IconButtonvariants and kbd styling from the cheat-sheet.Checklist
bun run lint,bunx tsc --noEmitandbun run testpass locally (eslint 0 errors, prettier clean, tsc clean, vitest 106 files / 1106 tests)bun run buildpasses (vite buildOK;check-migrationsandcheck-n8nOK)AGENTS.md(Button system, no raw<button>, no height/colour overrides)*.server.ts/ server functions and are never exposed viaVITE_*ACCESSIBILITY.md)ACCESSIBILITY.md)mainNotes for reviewers
navNextin "list" does not affectcalDownin "calendar" (separate scopes), matching the owner rule "global conflicts with every scope"./projects(tree view), not the app sidebar; the sidebar has no project tree.anyShifton quick task is preserved, soNandnboth work.🤖 Generated with Claude Code