refactor(app): remove Console feature entirely
Per user request: the "显示控制台 / Show console" button in the top-right header and the bottom drawer it opened are no longer needed — the Runs section already renders the same log tail in-page via RunDetail, so the drawer was a duplicate surface. Deleted the entire feature instead of leaving a hidden toggle that attracts bugs. Removed files: - src/renderer/views/ConsoleView.tsx (126 LOC) Removed renderer integration points: - App.tsx: header "Show/Hide console" button, ConsoleView render, setConsoleOpen(true) call after startRun, TerminalWindow icon import - views/sections/ExecutionSections.tsx: onOpenConsole callback, setConsoleOpen subscription - components/runs/RunCenter.tsx: onOpenConsole prop (removed from forwarding chain) - components/runs/RunDetail.tsx: onOpenConsole prop + the Lightning "Open console" ActionButton. The cancel-run button remains as the sole Panel action now that the console entry point is gone. - hooks/useUIController.ts: consoleOpen / setConsoleOpen subscription - hooks/useDesktopEvents.ts: "toggle-console" shortcut dispatcher - state/slices/navigation.ts: consoleOpen field, setConsoleOpen, toggleConsole actions, and the two auto-open-on-navigate triggers that used to flip the drawer when jumping to a run Removed main-process integration: - main/desktop-shell-menu.ts: "Toggle Console" menu item + CmdOrCtrl+` accelerator - main/desktop-shell-window.ts: onShortcut union type narrowed - shared/types/events.ts: ShortcutEvent action union narrowed Removed i18n keys (zh + en): - app.hideConsole / app.showConsole - console.title / console.noRuns / console.close - common.openLog / common.noRunSelected / common.waitingForLog - runs.openConsole Log capture itself (logBufferRef in useCompanyController + run-log events) is unchanged — the Runs section still displays it. Nothing was moved to a "disabled but present" state; the feature is out of the tree entirely. Typecheck and lint pass.
This commit is contained in:
1 parent
dfebced29f
commit
fd6471988a
13 files changed
+12
-230
No files matched your search
@@ -7,7 +7,6 @@ export interface NavigationSlice {
|
||||
commandPaletteOpen: boolean;
|
||||
commandPaletteSearch: string;
|
||||
selectedPaletteIndex: number;
|
||||
consoleOpen: boolean;
|
||||
sidebarCollapsed: boolean;
|
||||
companySwitcherOpen: boolean;
|
||||
setSection: (section: SectionId) => void;
|
||||
@@ -15,8 +14,6 @@ export interface NavigationSlice {
|
||||
toggleCommandPalette: () => void;
|
||||
setCommandPaletteSearch: (search: string) => void;
|
||||
setSelectedPaletteIndex: (index: number) => void;
|
||||
setConsoleOpen: (open: boolean) => void;
|
||||
toggleConsole: () => void;
|
||||
setSidebarCollapsed: (collapsed: boolean) => void;
|
||||
toggleSidebar: () => void;
|
||||
setCompanySwitcherOpen: (open: boolean) => void;
|
||||
@@ -34,7 +31,6 @@ export const createNavigationSlice: StateCreator<
|
||||
commandPaletteOpen: false,
|
||||
commandPaletteSearch: "",
|
||||
selectedPaletteIndex: 0,
|
||||
consoleOpen: false,
|
||||
sidebarCollapsed: false,
|
||||
companySwitcherOpen: false,
|
||||
setSection: (section) =>
|
||||
@@ -66,14 +62,6 @@ export const createNavigationSlice: StateCreator<
|
||||
set((state) => {
|
||||
state.selectedPaletteIndex = index;
|
||||
}),
|
||||
setConsoleOpen: (open) =>
|
||||
set((state) => {
|
||||
state.consoleOpen = open;
|
||||
}),
|
||||
toggleConsole: () =>
|
||||
set((state) => {
|
||||
state.consoleOpen = !state.consoleOpen;
|
||||
}),
|
||||
setSidebarCollapsed: (collapsed) =>
|
||||
set((state) => {
|
||||
state.sidebarCollapsed = collapsed;
|
||||
@@ -98,7 +86,6 @@ export const createNavigationSlice: StateCreator<
|
||||
else if (section === "approvals") state.selectedApprovalId = entityId;
|
||||
else if (section === "runs") {
|
||||
state.selectedRunId = entityId;
|
||||
state.consoleOpen = true;
|
||||
} else if (section === "goals") state.selectedGoalId = entityId;
|
||||
else if (section === "projects") state.selectedProjectId = entityId;
|
||||
else if (section === "connectors") state.selectedConnectorId = entityId;
|
||||
@@ -116,7 +103,6 @@ export const createNavigationSlice: StateCreator<
|
||||
if (matchingRun) {
|
||||
state.selectedRunId = matchingRun.id;
|
||||
state.selectedTaskId = matchingRun.taskId;
|
||||
state.consoleOpen = true;
|
||||
return;
|
||||
}
|
||||
state.selectedTaskId = entityId;
|
||||
|
||||
Reference in new issue
Block a user