Skip to content

Commit 634cd8c

Browse files
authored
chore: hide "Switch to CLI" button; stop release.sh double-building (#269)
- Remove the desktop-only "Switch to CLI" dashboard-header button (and its now-unused switchToCli/Terminal imports) — surface switching isn't released yet, so the button shouldn't be exposed. - release.sh no longer calls build-desktop-resources.sh explicitly: cargo tauri build's beforeBuildCommand already runs it, so the previous flow rebuilt the frontend + workerd bundles twice.
1 parent 3244f6d commit 634cd8c

2 files changed

Lines changed: 7 additions & 31 deletions

File tree

‎desktop/scripts/release.sh‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,14 @@ fi
7171
VERSION=$(read_version)
7272
echo "== target release: v$VERSION"
7373

74-
# --- 3. Build bundled resources (frontend + workerd; bakes OAuth) ---------
75-
echo "== building desktop resources (frontend + control-plane workerd)..."
76-
sh "$SCRIPT_DIR/build-desktop-resources.sh"
77-
78-
# --- 4. Signed + notarized app build --------------------------------------
79-
echo "== cargo tauri build (signed + notarized; this takes a while)..."
74+
# --- 3. Signed + notarized app build --------------------------------------
75+
# cargo tauri build's beforeBuildCommand (tauri.conf.json) already runs
76+
# build-desktop-resources.sh (frontend + control-plane workerd; bakes OAuth),
77+
# so we do NOT invoke it here — doing both rebuilt everything twice.
78+
echo "== cargo tauri build (builds resources via beforeBuildCommand, then signs + notarizes; this takes a while)..."
8079
( cd "$SRC_TAURI" && cargo tauri build )
8180

82-
# --- 5. Preflight gate + publish ------------------------------------------
81+
# --- 4. Preflight gate + publish ------------------------------------------
8382
echo "== publishing v$VERSION..."
8483
sh "$SCRIPT_DIR/publish-release.sh"
8584

‎frontend/src/app/(app)/dashboards/page.tsx‎

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
XCircle,
2929
Clock,
3030
BarChart3,
31-
Terminal,
3231
LogIn,
3332
} from "lucide-react";
3433
import { toast } from "sonner";
@@ -55,7 +54,6 @@ import { TrialBanner } from "@/components/subscription/TrialBanner";
5554
import { DesktopVersionBadge } from "@/components/DesktopVersionBadge";
5655
import { DashboardsTabs } from "@/components/desktop/DashboardsTabs";
5756
import { API, DESKTOP_MODE } from "@/config/env";
58-
import { switchToCli } from "@/lib/tauri-bridge";
5957
import {
6058
listDashboards,
6159
createDashboard,
@@ -420,28 +418,7 @@ export default function DashboardsPage() {
420418
<Tooltip content="Toggle theme">
421419
<ThemeToggle />
422420
</Tooltip>
423-
{DESKTOP_MODE && (
424-
<Tooltip content="Switch to CLI (opens a terminal)">
425-
<Button
426-
variant="ghost"
427-
size="icon-sm"
428-
onClick={async () => {
429-
try {
430-
const ok = await switchToCli();
431-
if (ok) {
432-
toast.success("Opening the CLI in Terminal…");
433-
} else {
434-
toast.error("CLI switch unavailable (Tauri bridge not found)");
435-
}
436-
} catch (e) {
437-
toast.error(`Could not switch to CLI: ${e}`);
438-
}
439-
}}
440-
>
441-
<Terminal className="w-4 h-4" />
442-
</Button>
443-
</Tooltip>
444-
)}
421+
{/* "Switch to CLI" button removed until surface-switching ships. */}
445422
<Tooltip content="Settings">
446423
<Button variant="ghost" size="icon-sm" onClick={() => router.push("/settings")}>
447424
<Settings className="w-4 h-4" />

0 commit comments

Comments
 (0)