Editor has no 'fit to view this path' keyboard shortcut — only the per-path fit button in the right panel and the global Fit-to-View button work; power users with many paths want a per-path shortcut #203
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
src/components/editor/EditorRightPanel.tsx:170renders a per-path "Fit to View" button (maximize icon) for each path in the path list. Clicking it callsonFitPathToView(pathId), which centers and zooms the canvas to fit just that path.grep -n 'onFitPathToView\|onFitPathToView:' src/components/editor/useKeyboardShortcuts.tsreturns 0 matches. The shortcut hook doesn't bind any key to the per-path fit.A user with 5 paths in a design who wants to focus on path 3:
The keyboard equivalent: select path 3, then... nothing. There's no
ForShift+For0shortcut for "fit selected path to view."Where
src/components/editor/EditorRightPanel.tsx:170(per-row maximize icon)src/components/editor/useKeyboardShortcuts.ts(no per-path fit binding)handleFitAllToView(bound to the editor toolbar's fit-to-view button, no keyboard)setSelectedPathIdis set on click; the keyboardTabcycles nodes within a path, not paths (per #194)Suggested fix shape
Add a keybinding to
useKeyboardShortcuts.ts:onFitPathToViewis already a prop on the editor canvas (line 880 of Editor.tsx); it's wired to the right panel's button. The same handler can be invoked from the keyboard hook.The shortcut hint should appear in:
title="Fit to view (F)")Severity
Low. The user has the right panel button. Power users notice.
Discovered by
Gap analysis (2026-10-02) of editor keyboard navigation.
Related
Fixed in commit
b036f66(main).Change:
useKeyboardShortcuts.tsacceptsonFitPathToView+selectedPathIdand binds plainF(no modifier, no drawing, no input focus) to callonFitPathToView(selectedPathId)— the same handler the right-panel Fit button already uses. No-op when no path is selected (matches the disabled right-panel button). Modifier guard (Ctrl/Cmd/Alt/Shift all unset) prevents swallow of browser/system chords (Cmd+F = browser Find, Alt+F = system menu mnemonic).Editor.tsxplumbshandleFitPathToView+selectedPathIdinto the hook call.EditorRightPanel.tsxper-row Fit button gainstitle="Fit to view (F)".Help.tsxeditorShortcuts array gains{ key: F, action: Fit selected path to view }.Verification:
tsc -bcleaneslint .cleanvitest928/928 (+8 new tests pinning the F contract: fires on plain F, no-ops on null selectedPathId, modifier guards for Ctrl/Cmd/Alt/Shift+F, focus skip-list, no precedence leak with Alt+]/Alt+[)Scope note: Per the issue body, the F binding is the keyboard short-cut for the existing right-panel per-path Fit button. The global Fit-to-View button (toolbar) still has no shortcut — that is a separate request (#160 closed for editor side; no per-ticket reopened for global fit).