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:
ZacharyZhang-NY committed 2026-04-17 20:32:34 -04:00
1 parent dfebced29f
commit fd6471988a
13 files changed
+12 -230

No files matched your search

-9
View File
@@ -41,8 +41,6 @@ export const en: Record<string, string> = {
"app.commandPalette": "Command palette",
"app.refresh": "Refresh",
"app.console": "Console",
"app.hideConsole": "Hide console",
"app.showConsole": "Show console",
"app.collapse": "Collapse",
"app.expand": "Expand",
"app.noResults": "No results for",
@@ -296,9 +294,6 @@ export const en: Record<string, string> = {
"common.started": "Started",
"common.finished": "Finished",
"common.cost": "Cost",
"common.openLog": "Open log",
"common.noRunSelected": "No run selected",
"common.waitingForLog": "Waiting for log output...",
"common.sections": "Sections",
"common.agents": "Agents",
"common.tasks": "Tasks",
@@ -307,9 +302,6 @@ export const en: Record<string, string> = {
"common.projects": "Projects",
// ── Console panel ──
"console.title": "Console",
"console.noRuns": "No runs",
"console.close": "Close console",
// ── Entity labels (command palette sections) ──
"entity.sections": "Sections",
@@ -795,7 +787,6 @@ export const en: Record<string, string> = {
"runs.noRunsMatch": "No runs match this filter",
"runs.noRunsMatchDetail": "Try another filter.",
"runs.runDetail": "Run detail",
"runs.openConsole": "Open console",
"runs.cancelRun": "Cancel run",
"runs.noSummary": "No summary yet",
"runs.unknownAgent": "Unknown agent",
-9
View File
@@ -41,8 +41,6 @@ export const zh: Record<string, string> = {
"app.commandPalette": "命令面板",
"app.refresh": "刷新",
"app.console": "控制台",
"app.hideConsole": "隐藏控制台",
"app.showConsole": "显示控制台",
"app.collapse": "收起",
"app.expand": "展开",
"app.noResults": "未找到匹配结果",
@@ -296,9 +294,6 @@ export const zh: Record<string, string> = {
"common.started": "开始时间",
"common.finished": "结束时间",
"common.cost": "费用",
"common.openLog": "打开日志",
"common.noRunSelected": "未选择运行",
"common.waitingForLog": "等待日志输出...",
"common.sections": "版块",
"common.agents": "智能体",
"common.tasks": "任务",
@@ -307,9 +302,6 @@ export const zh: Record<string, string> = {
"common.projects": "项目",
// ── 控制台面板 ──
"console.title": "控制台",
"console.noRuns": "暂无运行",
"console.close": "关闭控制台",
// ── 实体标签(命令面板分类) ──
"entity.sections": "版块",
@@ -795,7 +787,6 @@ export const zh: Record<string, string> = {
"runs.noRunsMatch": "没有匹配此筛选条件的运行",
"runs.noRunsMatchDetail": "换个筛选试试。",
"runs.runDetail": "运行详情",
"runs.openConsole": "打开控制台",
"runs.cancelRun": "取消运行",
"runs.noSummary": "暂无摘要",
"runs.unknownAgent": "未知智能体",