Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
be02e80
[feat] Implement shortcuts management panel with categorized commands
Myestery Aug 1, 2025
dda25af
feat: Add shortcuts tab and categorize commands in command store
Myestery Aug 1, 2025
1968333
feat: Add category to sidebar tab and extend bottom panel interface
Myestery Aug 1, 2025
10300f8
feat: Add shortcuts toggle button to sidebar and re order mindmap
Myestery Aug 1, 2025
b37d8d4
feat: Enhance bottom panel store with multi-panel support and shortcu…
Myestery Aug 1, 2025
e2efdd0
npm run locale
Myestery Aug 1, 2025
96ecb88
Merge branch 'main' into bottom-keybindings
Myestery Aug 1, 2025
06a7e66
cleanup commands and style
Myestery Aug 1, 2025
0f6b4ca
Merge branch 'main' into bottom-keybindings
Myestery Aug 1, 2025
d737a84
Reset src/locales to main branch state
Myestery Aug 2, 2025
197c8dd
[bugfix] Fix pre-commit hook cross-platform compatibility (#4643)
huchenlei Aug 1, 2025
912c64f
Ignore Claude local config (#4649)
benceruleanlu Aug 1, 2025
6cf4d69
[fix] Add type guard for SubgraphDefinition to improve TypeScript inf…
christian-byrne Aug 2, 2025
9c85776
[fix] Fix viewport sync in minimap and subgraphs navigation (#4644)
christian-byrne Aug 2, 2025
84123c5
[feat] Add keyboard shortcuts localization to main.json
Myestery Aug 2, 2025
f26d967
Merge branch 'main' into bottom-keybindings
Myestery Aug 2, 2025
d73d627
unit and browser tests
Myestery Aug 2, 2025
dce73e5
use correct type in EssentialsPanel
Myestery Aug 4, 2025
471ddf4
[refactor] Simplify command subcategory grouping in EssentialsPanel a…
Myestery Aug 4, 2025
34351f5
fix unused css
Myestery Aug 4, 2025
7c5ab4e
feat: add aria-label for keybinding display accessibility
Myestery Aug 4, 2025
732bcc4
fix: use filtered subcategories for rendering shortcuts
Myestery Aug 4, 2025
af90f5d
adjust keyboard shortcuts margins and responsiveness
Myestery Aug 7, 2025
256997e
fix playwright tests
Myestery Aug 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Add shortcuts tab and categorize commands in command store
  • Loading branch information
Myestery committed Aug 1, 2025
commit dda25afe512c66419e799255288a4284c9a402e3
27 changes: 27 additions & 0 deletions src/composables/bottomPanelTabs/useShortcutsTab.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { markRaw } from 'vue'
import { useI18n } from 'vue-i18n'

import EssentialsPanel from '@/components/bottomPanel/tabs/shortcuts/EssentialsPanel.vue'
import ViewControlsPanel from '@/components/bottomPanel/tabs/shortcuts/ViewControlsPanel.vue'
import { BottomPanelExtension } from '@/types/extensionTypes'

export const useShortcutsTab = (): BottomPanelExtension[] => {
const { t } = useI18n()

return [
{
id: 'shortcuts-essentials',
title: t('shortcuts.essentials'),
component: markRaw(EssentialsPanel),
type: 'vue',
targetPanel: 'shortcuts'
},
{
id: 'shortcuts-view-controls',
title: t('shortcuts.viewControls'),
component: markRaw(ViewControlsPanel),
type: 'vue',
targetPanel: 'shortcuts'
}
]
}
24 changes: 24 additions & 0 deletions src/composables/useCoreCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-plus',
label: 'New Blank Workflow',
menubarLabel: 'New',
category: 'essentials' as const,
function: () => workflowService.loadBlankWorkflow()
},
{
id: 'Comfy.OpenWorkflow',
icon: 'pi pi-folder-open',
label: 'Open Workflow',
menubarLabel: 'Open',
category: 'essentials' as const,
function: () => {
app.ui.loadFile()
}
Expand All @@ -108,6 +110,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-save',
label: 'Save Workflow',
menubarLabel: 'Save',
category: 'essentials' as const,
function: async () => {
const workflow = useWorkflowStore().activeWorkflow as ComfyWorkflow
if (!workflow) return
Expand All @@ -120,6 +123,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-save',
label: 'Save Workflow As',
menubarLabel: 'Save As',
category: 'essentials' as const,
function: async () => {
const workflow = useWorkflowStore().activeWorkflow as ComfyWorkflow
if (!workflow) return
Expand All @@ -132,6 +136,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-download',
label: 'Export Workflow',
menubarLabel: 'Export',
category: 'essentials' as const,
function: async () => {
await workflowService.exportWorkflow('workflow', 'workflow')
}
Expand All @@ -149,6 +154,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Undo',
icon: 'pi pi-undo',
label: 'Undo',
category: 'essentials' as const,
function: async () => {
await getTracker()?.undo?.()
}
Expand All @@ -157,6 +163,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Redo',
icon: 'pi pi-refresh',
label: 'Redo',
category: 'essentials' as const,
function: async () => {
await getTracker()?.redo?.()
}
Expand All @@ -165,6 +172,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.ClearWorkflow',
icon: 'pi pi-trash',
label: 'Clear Workflow',
category: 'essentials' as const,
function: () => {
const settingStore = useSettingStore()
if (
Expand Down Expand Up @@ -206,6 +214,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.RefreshNodeDefinitions',
icon: 'pi pi-refresh',
label: 'Refresh Node Definitions',
category: 'essentials' as const,
function: async () => {
await app.refreshComboInNodes()
}
Expand All @@ -214,6 +223,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Interrupt',
icon: 'pi pi-stop',
label: 'Interrupt',
category: 'essentials' as const,
function: async () => {
await api.interrupt(executionStore.activePromptId)
toastStore.add({
Expand All @@ -228,6 +238,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.ClearPendingTasks',
icon: 'pi pi-stop',
label: 'Clear Pending Tasks',
category: 'essentials' as const,
function: async () => {
await useQueueStore().clear(['queue'])
toastStore.add({
Expand All @@ -250,6 +261,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Canvas.ZoomIn',
icon: 'pi pi-plus',
label: 'Zoom In',
category: 'view-controls' as const,
function: () => {
const ds = app.canvas.ds
ds.changeScale(
Expand All @@ -263,6 +275,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Canvas.ZoomOut',
icon: 'pi pi-minus',
label: 'Zoom Out',
category: 'view-controls' as const,
function: () => {
const ds = app.canvas.ds
ds.changeScale(
Expand All @@ -276,6 +289,7 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.Canvas.FitView',
icon: 'pi pi-expand',
label: 'Fit view to selected nodes',
category: 'view-controls' as const,
function: () => {
if (app.canvas.empty) {
toastStore.add({
Expand Down Expand Up @@ -341,6 +355,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-play',
label: 'Queue Prompt',
versionAdded: '1.3.7',
category: 'essentials' as const,
function: async () => {
const batchCount = useQueueSettingsStore().batchCount
await app.queuePrompt(0, batchCount)
Expand All @@ -351,6 +366,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-play',
label: 'Queue Prompt (Front)',
versionAdded: '1.3.7',
category: 'essentials' as const,
function: async () => {
const batchCount = useQueueSettingsStore().batchCount
await app.queuePrompt(-1, batchCount)
Expand Down Expand Up @@ -383,6 +399,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-cog',
label: 'Show Settings Dialog',
versionAdded: '1.3.7',
category: 'view-controls' as const,
function: () => {
dialogService.showSettingsDialog()
}
Expand All @@ -392,6 +409,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-sitemap',
label: 'Group Selected Nodes',
versionAdded: '1.3.7',
category: 'essentials' as const,
function: () => {
const { canvas } = app
if (!canvas.selectedItems?.size) {
Expand Down Expand Up @@ -435,6 +453,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-volume-off',
label: 'Mute/Unmute Selected Nodes',
versionAdded: '1.3.11',
category: 'essentials' as const,
function: () => {
toggleSelectedNodesMode(LGraphEventMode.NEVER)
app.canvas.setDirty(true, true)
Expand All @@ -445,6 +464,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-shield',
label: 'Bypass/Unbypass Selected Nodes',
versionAdded: '1.3.11',
category: 'essentials' as const,
function: () => {
toggleSelectedNodesMode(LGraphEventMode.BYPASS)
app.canvas.setDirty(true, true)
Expand All @@ -455,6 +475,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-pin',
label: 'Pin/Unpin Selected Nodes',
versionAdded: '1.3.11',
category: 'essentials' as const,
function: () => {
getSelectedNodes().forEach((node) => {
node.pin(!node.pinned)
Expand Down Expand Up @@ -528,6 +549,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-list',
label: 'Toggle Bottom Panel',
versionAdded: '1.3.22',
category: 'view-controls' as const,
function: () => {
useBottomPanelStore().toggleBottomPanel()
}
Expand All @@ -537,6 +559,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-eye',
label: 'Toggle Focus Mode',
versionAdded: '1.3.27',
category: 'view-controls' as const,
function: () => {
useWorkspaceStore().toggleFocusMode()
}
Expand Down Expand Up @@ -762,6 +785,7 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-sitemap',
label: 'Convert Selection to Subgraph',
versionAdded: '1.20.1',
category: 'essentials' as const,
function: () => {
const canvas = canvasStore.getCanvas()
const graph = canvas.subgraph ?? canvas.graph
Expand Down
3 changes: 3 additions & 0 deletions src/stores/commandStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface ComfyCommand {
versionAdded?: string
confirmation?: string // If non-nullish, this command will prompt for confirmation
source?: string
category?: 'essentials' | 'view-controls' // For shortcuts panel organization
}

export class ComfyCommandImpl implements ComfyCommand {
Expand All @@ -29,6 +30,7 @@ export class ComfyCommandImpl implements ComfyCommand {
versionAdded?: string
confirmation?: string
source?: string
category?: 'essentials' | 'view-controls'

constructor(command: ComfyCommand) {
this.id = command.id
Expand All @@ -40,6 +42,7 @@ export class ComfyCommandImpl implements ComfyCommand {
this.versionAdded = command.versionAdded
this.confirmation = command.confirmation
this.source = command.source
this.category = command.category
}

get label() {
Expand Down