Skip to content

feat(ui): keyboard shortcut cheat sheet overlay#36

Open
advancedresearcharray wants to merge 16 commits into
mainfrom
feat/428-keyboard-shortcut-cheat-sheet
Open

feat(ui): keyboard shortcut cheat sheet overlay#36
advancedresearcharray wants to merge 16 commits into
mainfrom
feat/428-keyboard-shortcut-cheat-sheet

Conversation

@advancedresearcharray

@advancedresearcharray advancedresearcharray commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Implements kiwifs#428 — a searchable keyboard shortcut cheat sheet overlay.

  • ? opens the overlay when focus is not in an input/editor
  • Cmd+/ (or Ctrl+/) via existing shortcuts_help binding
  • HelpCircle toolbar button for mouse users
  • Searchable CommandDialog with shortcuts grouped by category (Navigation, Views, Editor)
  • Platform-aware <kbd> display (⌘ on macOS, Ctrl elsewhere)
  • Custom binding labels when user overrides differ from defaults
  • Esc / click outside dismisses via Dialog + close_overlay binding

Files changed

  • ui/src/components/KeyboardShortcuts.tsx — searchable CommandDialog with grouped sections
  • ui/src/lib/kiwiKeybindings.tsisTypingTarget, shouldOpenShortcutsHelp, isCustomBinding
  • ui/src/lib/kiwiKeybindings.test.ts — 4 new regression tests
  • ui/src/hooks/useKeybindings.ts — returns fully merged defaults record
  • ui/src/App.tsx — typing guard, ? handler, HelpCircle toolbar button
  • ui/src/components/ui/command.tsx — optional title prop for a11y
  • internal/api/handlers_keybindings.go — swagger @Tags ui on GetKeybindings

Test plan

  • go test ./internal/keybindings/... -count=1
  • go test ./internal/api/ -run GetKeybindings -count=1
  • cd ui && npm test -- --run kiwiKeybindings overlayDismiss (17 passed)
  • Manual: press ? outside editor → overlay opens with searchable list
  • Manual: press Cmd+/ → overlay toggles
  • Manual: click HelpCircle in toolbar → overlay opens
  • Manual: Esc / click outside → overlay closes

Closes kiwifs#428

amelia751 and others added 16 commits June 29, 2026 15:49
kiwifs#446)

Standard markdown links like [text](file.md#section) now use the SPA
router with scroll-to-anchor, matching the behavior of [[wiki#heading]]
links. Same-page #anchor links also get smooth scrolling.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve `..` and `.` segments in relative .md#anchor links so that
cross-directory links like `../00-foundations/_index.md#section` produce
clean paths (e.g. `00-foundations/_index.md`) instead of leaving `..`
in the URL and breadcrumb.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Use github.com/fvbommel/sortorder for natural (human/version) sort
so "2-arrays" comes before "10-graphs" without needing explicit
order fields in frontmatter or a tree-order.json sidecar.

- Remove `order` field from TreeEntry (Go + TypeScript)
- Remove PATCH /api/kiwi/tree/order endpoint
- Remove ReadTreeOrder / WriteTreeOrder from local storage
- Replace all order-based sort comparisons with natural sort
- Update all tests to verify natural sort behavior

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Recursively collect problem pages under numbered chapter folders
so subfolders like hashing/ and search-on-answer/ appear in the
progress tracker. Show subfolder labels as section headers within
each chapter group.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ifs#450)

The UI was calling /api/kiwi/local-state but the backend only
exposes /api/kiwi/me/state, causing progress tracking and other
local state to silently fail with 404.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Delete treeOrderPersistence module and its test, remove
persistSiblingOrder calls and destinationChildrenAfterMove helper
from KiwiTree, inline renumberOrderableSiblings identity function,
rename tree_order_test.go → tree_test.go.

Natural sort on filenames is the sole ordering mechanism now.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ew sublabels, MatrixView triangular, GraphEdge labels (kiwifs#452)

- AnnotationBar: parse inline markdown (**bold**, *italic*, `code`) in step text
- ArrayView: add `sublabels` prop for secondary text per cell (e.g. ord values)
- MatrixView: add `centerRows` + `roundCells` props for triangular/staircase grids
- GraphView: render edge `label` when no `weight` is present

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Protect the package-level branding config with an RWMutex so concurrent
server bootstrap in parallel tests no longer triggers the race detector.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Anh Lam <amelia751@users.noreply.github.com>
…se grids (kiwifs#454)

centerRows now accepts "start" | "center" | true (boolean true = "center").
"start" gives left-aligned ragged rows, which creates proper staircase visuals.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
…broken links & orphans APIs (kiwifs#455)

Add server-side wiki-link management so renames keep references intact:

- `RenameDirWithLinks`: extends `RenameDir` to rewrite backlinks in all
  external pages referencing files under the moved directory, matching
  the single-file `RenameWithLinks` behavior.
- `POST /rename-dir?update_links=true` (default): callers now get
  automatic backlink patching on directory renames.
- `GET /links/broken`: live broken-link scanner (reuses janitor logic)
  with fuzzy-match suggestions for each broken target.
- `GET /links/orphans`: live orphan page detection.
- `POST /refactor/fix-broken`: auto-fix broken wiki links by fuzzy-matching
  targets against existing files (supports dry_run preview).

Fuzzy matching ranks candidates: exact path > path-suffix > basename-only.
Targets ending with backslash (table-escaped pipes) are filtered out.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…argets (kiwifs#457)

- Allow _index targets with directory components (e.g. "01-big-o/_index")
  instead of blanket-excluding all _index basenames
- Add stripped-number prefix matching so "06-prefix-sum/_index" correctly
  matches "03-prefix-sum/_index.md" even when numeric prefixes differ
- Adjust score tiers: exact=4, suffix=3, stripped-suffix=2, basename=1
- Keep bare "_index" (no directory component) excluded to avoid ambiguity

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Targets ending with backslash (e.g. [[target\|label]] in tables)
must not be rewritten — the backslash escapes the pipe for markdown
table compatibility.

Co-authored-by: Lam Dao Que Anh <anhlam@Lams-MacBook-Air-9.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add CommandDialog-based shortcut reference with fuzzy filter, plain ? trigger
outside editable fields, HelpCircle toolbar button, and custom-binding labels.

Closes kiwifs#428
Peer-review follow-up for keyboard shortcut cheat sheet overlay.

Signed-off-by: advancedresearcharray <advancedresearcharray@github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…very

Hands-on takeover: re-ran Go and UI tests, confirmed branch commits,
documented broken .git overlay workaround (GIT_DIR=.git.writable).

Co-authored-by: Cursor <cursoragent@cursor.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.

feat(ui): keyboard shortcut cheat sheet overlay

2 participants