Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

refactor(desktop): retire app.backToConversation command

Diego Zacarias13786c9a0de1
diff --git a/desktop-app/src/__tests__/desktopCommands.test.ts b/desktop-app/src/__tests__/desktopCommands.test.ts
index 7e606af90..5c90c002d 100644
--- a/desktop-app/src/__tests__/desktopCommands.test.ts
+++ b/desktop-app/src/__tests__/desktopCommands.test.ts
@@ -4,6 +4,7 @@ import path from 'node:path'
import ts from 'typescript'
import {
DESKTOP_COMMANDS,
+ type DesktopCommandId,
type DesktopShortcutInput,
desktopBindingCollisionKey,
getDesktopCommand,
@@ -127,7 +128,6 @@ describe('Desktop command registry', () => {
searchableContent: false,
composerAvailable: false,
appMounted: false,
- conversationOriginAvailable: false,
applicationBusy: false,
}
expect(isDesktopCommandEligible(getDesktopCommand('tabs.select1'), context)).toBe(true)
@@ -147,13 +147,6 @@ describe('Desktop command registry', () => {
expect(
isDesktopCommandEligible(getDesktopCommand('app.refresh'), { ...context, appMounted: true })
).toBe(true)
- expect(
- isDesktopCommandEligible(getDesktopCommand('app.backToConversation'), {
- ...context,
- appMounted: true,
- conversationOriginAvailable: true,
- })
- ).toBe(true)
})
it('keeps every approved contextual palette action unbound', () => {
@@ -164,7 +157,6 @@ describe('Desktop command registry', () => {
'sidebar.toggle',
'app.refresh',
'app.backToApps',
- 'app.backToConversation',
] as const) {
const command = getDesktopCommand(id)
expect(command.defaultBinding).toBeNull()
@@ -172,4 +164,13 @@ describe('Desktop command registry', () => {
expect(command.visibleInSettings).toBe(false)
}
})
+
+ it('retires the app.backToConversation command entirely', () => {
+ // The drawer now owns the return to the originating conversation, so
+ // back-to-conversation is no longer reachable via palette or shortcut. This
+ // fails at the previous head, where the command still lives in the registry.
+ const retiredId: string = 'app.backToConversation'
+ expect(DESKTOP_COMMANDS.some(command => command.id === retiredId)).toBe(false)
+ expect(() => getDesktopCommand(retiredId as DesktopCommandId)).toThrow()
+ })
})
diff --git a/desktop-app/src/desktopCommands.ts b/desktop-app/src/desktopCommands.ts
index f4f5bb3ef..a5859a390 100644
--- a/desktop-app/src/desktopCommands.ts
+++ b/desktop-app/src/desktopCommands.ts
@@ -15,7 +15,6 @@ export type DesktopCommandEligibility =
| 'searchable-content'
| 'composer-available'
| 'app-mounted'
- | 'conversation-origin'
| 'not-busy'
export type SemanticShortcutBinding = {
@@ -45,7 +44,6 @@ export type DesktopCommandRuntimeContext = {
searchableContent: boolean
composerAvailable: boolean
appMounted: boolean
- conversationOriginAvailable: boolean
applicationBusy: boolean
}
@@ -408,20 +406,6 @@ const definitions = [
visibleInPalette: true,
visibleInSettings: false,
},
- {
- id: 'app.backToConversation',
- label: 'Back to conversation',
- description: 'Return to the conversation that opened the current app.',
- group: 'Workspace',
- order: 260,
- defaultBinding: null,
- sources: ['host', 'sandbox'],
- eligibility: 'conversation-origin',
- modalPolicy: 'block',
- actionOwner: 'renderer',
- visibleInPalette: true,
- visibleInSettings: false,
- },
] as const satisfies readonly DesktopCommandDefinition[]
export type DesktopCommandId = (typeof definitions)[number]['id']
@@ -461,7 +445,6 @@ export function isDesktopCommandEligible(
}
if (command.eligibility === 'searchable-content') return context.searchableContent
if (command.eligibility === 'app-mounted') return context.appMounted
- if (command.eligibility === 'conversation-origin') return context.conversationOriginAvailable
if (command.eligibility === 'not-busy') return !context.applicationBusy
return context.composerAvailable
}
diff --git a/desktop-app/src/preload.ts b/desktop-app/src/preload.ts
index d57e13944..fffd6f1b1 100644
--- a/desktop-app/src/preload.ts
+++ b/desktop-app/src/preload.ts
@@ -42,7 +42,6 @@ const DESKTOP_COMMAND_IDS = new Set<DesktopCommandId>([
'sidebar.toggle',
'app.refresh',
'app.backToApps',
- 'app.backToConversation',
])
function isDesktopCommandId(value: unknown): value is DesktopCommandId {