Skip to content

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

fix(apps): hide absent Antigravity Desktop in installed apps (#10189)

Jiarui Fan102611eae487
diff --git a/src/components/apps/AppsPage.tsx b/src/components/apps/AppsPage.tsx
index 520a7ed3d..17e3caa16 100644
--- a/src/components/apps/AppsPage.tsx
+++ b/src/components/apps/AppsPage.tsx
@@ -128,7 +128,11 @@ const ROW_BY_APP = Object.fromEntries([
...TOOL_NAMES.map((tool) => [TOOL_APP_IDS[tool], { kind: "tool", tool }]),
]) as Record<AppId, Row>;
-type RowSection = { key: string; title: string; rows: Row[] };
+type RowSection = {
+ key: "all" | "installed" | "notInstalled";
+ title: string;
+ rows: Row[];
+};
const rowKey = (row: Row): AppId =>
row.kind === "desktop"
@@ -466,7 +470,7 @@ export function AppsPage() {
</div>
);
- const renderRow = (row: Row) =>
+ const renderRow = (row: Row, section: RowSection["key"]) =>
row.kind === "zcode" ? (
<AppRow
key="zcode"
@@ -536,7 +540,12 @@ export function AppsPage() {
}))
}
visibility={visibilitySwitch(TOOL_APP_IDS[row.tool])}
- subRow={row.tool === "agy" ? agyDesktopSubRow : undefined}
+ subRow={
+ row.tool === "agy" &&
+ (section !== "installed" || agyDesktopStatus?.installed)
+ ? agyDesktopSubRow
+ : undefined
+ }
/>
);
@@ -707,7 +716,7 @@ export function AppsPage() {
<div className="divide-y divide-border overflow-hidden rounded-panel border border-border bg-surface">
{section.rows.map((row) => (
<SortableAppRow key={rowKey(row)} id={rowKey(row)}>
- {renderRow(row)}
+ {renderRow(row, section.key)}
</SortableAppRow>
))}
</div>
@@ -715,7 +724,7 @@ export function AppsPage() {
</DndContext>
) : (
<div className="divide-y divide-border overflow-hidden rounded-panel border border-border bg-surface">
- {section.rows.map(renderRow)}
+ {section.rows.map((row) => renderRow(row, section.key))}
</div>
)}
</section>
diff --git a/tests/components/AppsPage.test.tsx b/tests/components/AppsPage.test.tsx
index a18107c75..1e6ae189e 100644
--- a/tests/components/AppsPage.test.tsx
+++ b/tests/components/AppsPage.test.tsx
@@ -717,6 +717,23 @@ describe("AppsPage visibility column", () => {
}
});
+ it.each([false, true])(
+ "shows Desktop under an installed Antigravity CLI only when Desktop is installed (%s)",
+ async (desktopInstalled) => {
+ missing.clear();
+ mocks.agyDesktopStatus.installed = desktopInstalled;
+
+ await renderApps();
+
+ expect(rowApps("appsPage.sectionInstalled")).toContain("agy");
+ const row = card("Antigravity CLI");
+ expect(row.getAllByRole("switch")).toHaveLength(1);
+ expect(row.queryByText("Antigravity Desktop") !== null).toBe(
+ desktopInstalled,
+ );
+ },
+ );
+
it("attaches Antigravity Desktop detection under Antigravity CLI and shares the single sidebar switch", async () => {
vi.resetModules();
missing.clear();