Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

Add quick access to Plugins settings (#36153)

Jinjing76653fbd06be
diff --git a/src/main/browser/browser-guest-shortcut-forwarding.test.ts b/src/main/browser/browser-guest-shortcut-forwarding.test.ts
index 2c923a8f2c6..84a08d818c1 100644
--- a/src/main/browser/browser-guest-shortcut-forwarding.test.ts
+++ b/src/main/browser/browser-guest-shortcut-forwarding.test.ts
@@ -161,6 +161,29 @@ describe('setupGuestShortcutForwarding', () => {
guestOffMock = vi.fn()
})
+ it('replays the Plugins shortcut once and preserves unbound overrides', () => {
+ let keybindings = { 'view.plugins': ['Mod+Shift+X'] }
+ setupGuestShortcutForwarding({
+ browserTabId,
+ guest: makeGuest(),
+ resolveRenderer: () => makeRenderer(),
+ getKeybindings: () => keybindings
+ })
+
+ const input = { key: 'X', code: 'KeyX', shift: true }
+ expect(triggerBeforeInput(input)).toHaveBeenCalledOnce()
+ expect(rendererSendMock).toHaveBeenCalledWith(
+ 'ui:browserPageTabShortcut',
+ expect.objectContaining(input)
+ )
+ expect(triggerBeforeInput({ ...input, isAutoRepeat: true })).toHaveBeenCalledOnce()
+ expect(rendererSendMock).toHaveBeenCalledTimes(1)
+
+ keybindings = { 'view.plugins': [] }
+ expect(triggerBeforeInput(input)).not.toHaveBeenCalled()
+ expect(rendererSendMock).toHaveBeenCalledTimes(1)
+ })
+
it('commits Ctrl+Tab switching from focused guest pages on generic release events', () => {
setupGuestShortcutForwarding({
browserTabId,
diff --git a/src/main/browser/browser-guest-tab-shortcut.ts b/src/main/browser/browser-guest-tab-shortcut.ts
index 336ab581fc2..d239d0de4da 100644
--- a/src/main/browser/browser-guest-tab-shortcut.ts
+++ b/src/main/browser/browser-guest-tab-shortcut.ts
@@ -13,7 +13,7 @@ const TAB_ACTIONS_WITHOUT_KEYBOARD_OWNER = new Set<KeybindingActionId>([
'tab.openMarkdown'
])
-/** A focused page hands every tab-scope chord to Orca, as Chrome reserves its tab shortcuts. */
+/** A focused page hands tab chords and the Plugins launcher back to Orca. */
export function matchesGuestTabShortcut(
input: WindowShortcutInput,
platform: NodeJS.Platform,
@@ -22,7 +22,7 @@ export function matchesGuestTabShortcut(
): boolean {
return KEYBINDING_DEFINITIONS.some(
(definition) =>
- definition.scope === 'tabs' &&
+ (definition.scope === 'tabs' || definition.id === 'view.plugins') &&
!TAB_ACTIONS_WITHOUT_KEYBOARD_OWNER.has(definition.id) &&
(definition.id !== 'tab.newSimulator' || isMobileEmulatorEnabled) &&
keybindingMatchesAction(definition.id, input, platform, keybindings)
diff --git a/src/renderer/src/app-shell/active-tab-rename-target.ts b/src/renderer/src/app-shell/active-tab-rename-target.ts
new file mode 100644
index 00000000000..c90f8290bb3
--- /dev/null
+++ b/src/renderer/src/app-shell/active-tab-rename-target.ts
@@ -0,0 +1,15 @@
+import type { AppState } from '@/store/types'
+
+export function resolveActiveTabRenameTarget(
+ activeWorktreeId: string | null,
+ store: Pick<AppState, 'activeTabId' | 'activeTabType' | 'getActiveTab'>
+): string | null {
+ if (store.activeTabType === 'terminal') {
+ return store.activeTabId
+ }
+ if (store.activeTabType !== 'agent-session' || !activeWorktreeId) {
+ return null
+ }
+ const activeTab = store.getActiveTab(activeWorktreeId)
+ return activeTab?.contentType === 'agent-session' ? activeTab.id : null
+}
diff --git a/src/renderer/src/app-shell/app-command-handlers.ts b/src/renderer/src/app-shell/app-command-handlers.ts
index 0dbe0e341d3..dcfbd7969ce 100644
--- a/src/renderer/src/app-shell/app-command-handlers.ts
+++ b/src/renderer/src/app-shell/app-command-handlers.ts
@@ -1,4 +1,3 @@
-import { useShallow } from 'zustand/react/shallow'
import { canShowRightSidebarForView } from '@/lib/right-sidebar-visibility'
import { isFloatingWorkspacePanelFocused } from '@/lib/floating-workspace-terminal-actions'
import { hasVisibleOverlay } from '@/lib/visible-overlay'
@@ -19,12 +18,17 @@ import {
import { useAppStore } from '../store'
import type { usePluginCommands } from '@/store/plugin-panels'
import { isGitRepoKind } from '../../../shared/repo-kind'
+import { openPluginsSettings } from '@/lib/open-plugins-settings'
+import { resolveActiveTabRenameTarget } from './active-tab-rename-target'
+import { createPluginsSettingsShortcutHandler } from './plugin-settings-shortcut-handler'
import type {
KeybindingActionId,
KeybindingContext,
PhysicalModifierToken
} from '../../../shared/keybindings'
import { shortcutPlatform } from './app-window-chrome'
+export { useAppShortcutActions } from './use-app-shortcut-actions'
+import type { useAppShortcutActions } from './use-app-shortcut-actions'
type AppStoreState = ReturnType<typeof useAppStore.getState>
@@ -62,41 +66,12 @@ export type AppShortcutState = {
workspaceChromeActive: boolean
}
-export function useAppShortcutActions() {
- // One shallow action subscription avoids an equality check per action on every store mutation.
- return useAppStore(
- useShallow((s) => ({
- toggleSidebar: s.toggleSidebar,
- toggleRightSidebar: s.toggleRightSidebar,
- setRightSidebarOpen: s.setRightSidebarOpen,
- setRightSidebarTab: s.setRightSidebarTab,
- showRightSidebarFiles: s.showRightSidebarFiles,
- showRightSidebarSearch: s.showRightSidebarSearch,
- openDiffNotesSendMenuForActiveWorktree: s.openDiffNotesSendMenuForActiveWorktree
- }))
- )
-}
-
export function getKeybindingContext(target: EventTarget | null): KeybindingContext {
return target instanceof HTMLElement && target.classList.contains('xterm-helper-textarea')
? 'terminal'
: 'app'
}
-/** Terminal rename uses its backing entity ID; structured chat uses its unified tab ID. activeTabId stays on the last terminal, matching TabGroupPanel resolution. */
-function resolveRenameTargetTabId(activeWorktreeId: string | null): string | null {
- const store = useAppStore.getState()
- if (store.activeTabType === 'terminal') {
- return store.activeTabId
- }
- if (store.activeTabType !== 'agent-session' || !activeWorktreeId) {
- return null
- }
- const activeTab = store.getActiveTab(activeWorktreeId)
- return activeTab?.contentType === 'agent-session' ? activeTab.id : null
-}
-
-/** Return whether each action claimed the chord so unavailable surfaces fall through. Palette/menu invocations omit input. */
export function createAppCommandHandlers(
state: AppShortcutState,
input?: ShortcutDispatchInput,
@@ -221,7 +196,7 @@ export function createAppCommandHandlers(
return false
}
// Resolve both terminal and structured-chat rename targets; a terminal-only gate silently ignores chat.
- const tabId = resolveRenameTargetTabId(activeWorktreeId)
+ const tabId = resolveActiveTabRenameTarget(activeWorktreeId, useAppStore.getState())
if (!tabId) {
return false
}
@@ -278,6 +253,12 @@ export function createAppCommandHandlers(
return claim('view.tasks', () => store.openTaskPage())
}
],
+ [
+ 'view.plugins',
+ createPluginsSettingsShortcutHandler(input?.target, () =>
+ claim('view.plugins', openPluginsSettings)
+ )
+ ],
[
'sidebar.right.toggle',
() =>
diff --git a/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts b/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts
new file mode 100644
index 00000000000..21e0e4ad492
--- /dev/null
+++ b/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts
@@ -0,0 +1,15 @@
+import { isPairedWebClientWindow } from '@/lib/desktop-window-chrome'
+import { isEditableTarget } from '@/lib/editable-target'
+
+export function createPluginsSettingsShortcutHandler(
+ target: EventTarget | null | undefined,
+ claim: () => boolean
+): () => boolean {
+ return () => {
+ // Why: rich-text editors use Mod+Shift+X for strikethrough.
+ if (isPairedWebClientWindow() || isEditableTarget(target ?? null)) {
+ return false
+ }
+ return claim()
+ }
+}
diff --git a/src/renderer/src/app-shell/use-app-shortcut-actions.ts b/src/renderer/src/app-shell/use-app-shortcut-actions.ts
new file mode 100644
index 00000000000..4be66a4454b
--- /dev/null
+++ b/src/renderer/src/app-shell/use-app-shortcut-actions.ts
@@ -0,0 +1,17 @@
+import { useShallow } from 'zustand/react/shallow'
+import { useAppStore } from '../store'
+
+export function useAppShortcutActions() {
+ // One shallow action subscription avoids an equality check per action on every store mutation.
+ return useAppStore(
+ useShallow((s) => ({
+ toggleSidebar: s.toggleSidebar,
+ toggleRightSidebar: s.toggleRightSidebar,
+ setRightSidebarOpen: s.setRightSidebarOpen,
+ setRightSidebarTab: s.setRightSidebarTab,
+ showRightSidebarFiles: s.showRightSidebarFiles,
+ showRightSidebarSearch: s.showRightSidebarSearch,
+ openDiffNotesSendMenuForActiveWorktree: s.openDiffNotesSendMenuForActiveWorktree
+ }))
+ )
+}
diff --git a/src/renderer/src/app-shell/use-global-keybindings.ts b/src/renderer/src/app-shell/use-global-keybindings.ts
index f0e6ce380df..b5a295b044e 100644
--- a/src/renderer/src/app-shell/use-global-keybindings.ts
+++ b/src/renderer/src/app-shell/use-global-keybindings.ts
@@ -219,6 +219,9 @@ export function useGlobalKeybindings(args: {
) {
return
}
+ if (matchShortcut('view.plugins') && handlers.get('view.plugins')?.()) {
+ return
+ }
for (const actionId of PLUGIN_COMMAND_ALIAS_ACTION_IDS) {
if (matchShortcut(actionId) && handlers.get(actionId)?.()) {
return
diff --git a/src/renderer/src/components/plugins/list/PluginsSectionDescription.tsx b/src/renderer/src/components/plugins/list/PluginsSectionDescription.tsx
new file mode 100644
index 00000000000..47672f1de27
--- /dev/null
+++ b/src/renderer/src/components/plugins/list/PluginsSectionDescription.tsx
@@ -0,0 +1,21 @@
+import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo'
+import { useShortcutKeyDetails } from '@/hooks/useShortcutLabel'
+import { translate } from '@/i18n/i18n'
+
+export function PluginsSectionDescription({ text }: { text: string }): React.JSX.Element {
+ const shortcut = useShortcutKeyDetails('view.plugins')
+ return (
+ <>
+ {text}
+ {shortcut.keys.length > 0 ? (
+ <span className="ml-2 inline-flex items-center gap-1.5 whitespace-nowrap align-middle">
+ {translate(
+ 'auto.components.plugins.list.PluginsSectionDescription.openWith',
+ 'Open anytime with'
+ )}
+ <ShortcutKeyCombo keys={shortcut.keys} doubleTap={shortcut.doubleTap} />
+ </span>
+ ) : null}
+ </>
+ )
+}
diff --git a/src/renderer/src/components/settings/PluginsSettingsSection.tsx b/src/renderer/src/components/settings/PluginsSettingsSection.tsx
index dfce17713a5..1de7fa70db1 100644
--- a/src/renderer/src/components/settings/PluginsSettingsSection.tsx
+++ b/src/renderer/src/components/settings/PluginsSettingsSection.tsx
@@ -1,5 +1,5 @@
import { isPluginAutoUpdateOn } from '../../../../shared/plugins/catalog/plugin-update-policy'
-import { useEffect, useRef, useState } from 'react'
+import { useEffect, useEffectEvent, useRef, useState } from 'react'
import { toast } from 'sonner'
import type { PluginHostInstallSource, PluginHostListEntry } from '../../../../preload/api-types'
import type { GlobalSettings } from '../../../../shared/global-settings-types'
@@ -12,6 +12,7 @@ import { PluginRollbackDialog } from '../plugins/dialogs/PluginRollbackDialog'
import { PluginsHeaderActions } from '../plugins/list/PluginSettingsMenu'
import { PluginSettingsOverview } from '../plugins/list/PluginSettingsOverview'
import { PluginsAlphaNotice } from '../plugins/list/PluginsAlphaNotice'
+import { PluginsSectionDescription } from '../plugins/list/PluginsSectionDescription'
import { getPluginsSectionPresentation } from './plugins-search'
import { SettingsSection } from './SettingsSection'
import { usePluginLogs } from '../plugins/state/use-plugin-logs'
@@ -111,6 +112,13 @@ export function PluginsSettingsSection({
}
}
+ const loadPluginListForSubscription = useEffectEvent(async (): Promise<void> => {
+ await loadPluginList(window.api.plugins.list())
+ if (mountedRef.current) {
+ setLoading(false)
+ }
+ })
+
const clearBusy = (pluginKey: string): void => {
if (mountedRef.current) {
setBusyPluginKeys((current) => new Set([...current].filter((key) => key !== pluginKey)))
@@ -164,15 +172,9 @@ export function PluginsSettingsSection({
return
}
setLoading(true)
- const load = async (): Promise<void> => {
- await loadPluginList(window.api.plugins.list())
- if (mountedRef.current) {
- setLoading(false)
- }
- }
- void load()
+ void loadPluginListForSubscription()
const unsubscribe = window.api.plugins.onChanged(() => {
- void loadPluginList(window.api.plugins.list())
+ void loadPluginListForSubscription()
})
return () => {
listRequestRef.current += 1
@@ -326,6 +328,7 @@ export function PluginsSettingsSection({
<SettingsSection
id="plugins"
{...sectionPresentation}
+ description={<PluginsSectionDescription text={sectionPresentation.description} />}
hideHeader={featureEnabled && page.openKey !== null}
bodyClassName="space-y-6 rounded-none border-0 bg-transparent p-0 shadow-none"
headerAction={
diff --git a/src/renderer/src/components/settings/SettingsSection.tsx b/src/renderer/src/components/settings/SettingsSection.tsx
index 95836960ddf..b10f7b2d90e 100644
--- a/src/renderer/src/components/settings/SettingsSection.tsx
+++ b/src/renderer/src/components/settings/SettingsSection.tsx
@@ -13,7 +13,7 @@ export const ActiveSettingsSectionProvider = ActiveSettingsSectionContext.Provid
type SettingsSectionProps = {
id: string
title: string
- description: string
+ description: React.ReactNode
searchEntries?: SettingsSearchEntry[]
children?: React.ReactNode
className?: string
diff --git a/src/renderer/src/components/settings/keybinding-title-copy.ts b/src/renderer/src/components/settings/keybinding-title-copy.ts
index 11a73e85858..fe4274e41fd 100644
--- a/src/renderer/src/components/settings/keybinding-title-copy.ts
+++ b/src/renderer/src/components/settings/keybinding-title-copy.ts
@@ -35,6 +35,7 @@ const STATIC_TITLE_COPY = {
translate('keybindings.title.workspaceSelectByIndex', 'Select Workspace 1–9'),
'voice.dictation': () => translate('keybindings.title.voiceDictation', 'Dictation'),
'view.tasks': () => translate('keybindings.title.viewTasks', 'Open Tasks'),
+ 'view.plugins': () => translate('keybindings.title.viewPlugins', 'Open Plugins'),
'sidebar.left.toggle': () => translate('keybindings.title.sidebarLeftToggle', 'Toggle Sidebar'),
'sidebar.right.toggle': () =>
translate('keybindings.title.sidebarRightToggle', 'Toggle Right Sidebar'),
diff --git a/src/renderer/src/components/status-bar/PluginsStatusSegment.tsx b/src/renderer/src/components/status-bar/PluginsStatusSegment.tsx
new file mode 100644
index 00000000000..ace508dbb31
--- /dev/null
+++ b/src/renderer/src/components/status-bar/PluginsStatusSegment.tsx
@@ -0,0 +1,38 @@
+import { Blocks } from 'lucide-react'
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
+import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo'
+import { useShortcutKeyComboDetails } from '@/hooks/useShortcutLabel'
+import { openPluginsSettings } from '@/lib/open-plugins-settings'
+import { translate } from '@/i18n/i18n'
+
+export function PluginsStatusSegment(): React.JSX.Element {
+ const shortcut = useShortcutKeyComboDetails('view.plugins')
+ const label = translate('auto.components.status.bar.PluginsStatusSegment.label', 'Plugins')
+
+ return (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <button
+ type="button"
+ className="inline-flex cursor-pointer items-center rounded px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent/70 hover:text-foreground"
+ aria-label={label}
+ onClick={openPluginsSettings}
+ >
+ <Blocks className="size-3" />
+ </button>
+ </TooltipTrigger>
+ <TooltipContent side="top" sideOffset={4}>
+ <span className="inline-flex items-center gap-2">
+ {label}
+ {shortcut.map((combo) => (
+ <ShortcutKeyCombo
+ key={`${combo.doubleTap}:${combo.keys.join('+')}`}
+ keys={combo.keys}
+ doubleTap={combo.doubleTap}
+ />
+ ))}
+ </span>
+ </TooltipContent>
+ </Tooltip>
+ )
+}
diff --git a/src/renderer/src/components/status-bar/StatusBarSurface.tsx b/src/renderer/src/components/status-bar/StatusBarSurface.tsx
index 0b571d0f315..52dfff63eff 100644
--- a/src/renderer/src/components/status-bar/StatusBarSurface.tsx
+++ b/src/renderer/src/components/status-bar/StatusBarSurface.tsx
@@ -20,6 +20,7 @@ import { UpdateStatusSegment } from './UpdateStatusSegment'
import { SkillUpdateStatusSegment } from './SkillUpdateStatusSegment'
import { NativeChatResumeStatusSegment } from './NativeChatResumeStatusSegment'
import { CaffeinateStatusSegment } from './CaffeinateStatusSegment'
+import { PluginsStatusSegment } from './PluginsStatusSegment'
import { RemoteServerUpdateStatusSegment } from './RemoteServerUpdateStatusSegment'
import { TOGGLE_FLOATING_TERMINAL_EVENT } from '@/lib/floating-terminal'
import { FloatingTerminalIconContextMenu } from '@/components/floating-terminal/FloatingTerminalIconContextMenu'
@@ -291,7 +292,10 @@ export function StatusBarSurface({
>
<div ref={segmentsRef} className="flex w-max items-center gap-3">
{!isPairedWebClientWindow() ? (
- <CaffeinateStatusSegment iconOnly={segmentsIconOnly} />
+ <>
+ <PluginsStatusSegment />
+ <CaffeinateStatusSegment iconOnly={segmentsIconOnly} />
+ </>
) : null}
<RemoteServerUpdateStatusSegment iconOnly={segmentsIconOnly} />
<SkillUpdateStatusSegment iconOnly={segmentsIconOnly} />
diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json
index 87043c0760b..933f8e37c27 100644
--- a/src/renderer/src/i18n/locales/en.json
+++ b/src/renderer/src/i18n/locales/en.json
@@ -5040,6 +5040,9 @@
},
"mainWorktree": "main worktree",
"detached": "detached"
+ },
+ "PluginsStatusSegment": {
+ "label": "Plugins"
}
}
},
@@ -18902,6 +18905,11 @@
"cancel": "Cancel",
"add": "Add catalog",
"body": "A link asked to show {{value0}} from this catalog. Add catalogs only from people you trust."
+ },
+ "list": {
+ "PluginsSectionDescription": {
+ "openWith": "Open anytime with"
+ }
}
}
},
@@ -22386,7 +22394,8 @@
"terminalSplitDown": "Split terminal down",
"terminalSwitchInputSource": "Switch input source / language (native)",
"newAgentTab": "New {{agent}} tab",
- "tabNewBrowserSplitRight": "New browser tab in right split"
+ "tabNewBrowserSplitRight": "New browser tab in right split",
+ "viewPlugins": "Open Plugins"
},
"group": {
"global": "Global",
diff --git a/src/renderer/src/lib/open-plugins-settings.ts b/src/renderer/src/lib/open-plugins-settings.ts
new file mode 100644
index 00000000000..8dd8f6f1d2d
--- /dev/null
+++ b/src/renderer/src/lib/open-plugins-settings.ts
@@ -0,0 +1,7 @@
+import { useAppStore } from '@/store'
+
+export function openPluginsSettings(): void {
+ const state = useAppStore.getState()
+ state.openSettingsTarget({ pane: 'plugins', repoId: null })
+ state.openSettingsPage()
+}
diff --git a/src/shared/keybindings/definitions-core-1.ts b/src/shared/keybindings/definitions-core-1.ts
index ffca77ff2a6..5e4455aa585 100644
--- a/src/shared/keybindings/definitions-core-1.ts
+++ b/src/shared/keybindings/definitions-core-1.ts
@@ -180,6 +180,15 @@ export const KEYBINDING_DEFINITION_CORE_1: readonly KeybindingDefinition[] = [
searchKeywords: ['shortcut', 'tasks', 'github issues', 'linear'],
defaultBindings: platformBindings([])
},
+ {
+ id: 'view.plugins',
+ title: 'Open Plugins',
+ group: 'Global',
+ scope: 'global',
+ searchKeywords: ['shortcut', 'plugins', 'extensions', 'marketplace'],
+ // Why: mirrors VS Code's Extensions view chord.
+ defaultBindings: platformBindings(['Mod+Shift+X'])
+ },
{
id: 'sidebar.left.toggle',
title: 'Toggle Sidebar',
diff --git a/src/shared/keybindings/types.ts b/src/shared/keybindings/types.ts
index bd37d3cb8c9..dcbac43b096 100644
--- a/src/shared/keybindings/types.ts
+++ b/src/shared/keybindings/types.ts
@@ -40,6 +40,7 @@ export type KeybindingActionId =
| 'workspace.selectByIndex'
| 'voice.dictation'
| 'view.tasks'
+ | 'view.plugins'
| 'dashboard.toggle'
| 'sidebar.left.toggle'
| 'sidebar.right.toggle'