diff --git a/artifacts/tx-os/src/components/app-dock.tsx b/artifacts/tx-os/src/components/app-dock.tsx index 0011b2c7..02296671 100644 --- a/artifacts/tx-os/src/components/app-dock.tsx +++ b/artifacts/tx-os/src/components/app-dock.tsx @@ -33,11 +33,19 @@ export function AppDock({ currentSlug }: AppDockProps) { const lang = i18n.language; const { data: apps } = useListApps({ query: { queryKey: getListAppsQueryKey() } }); + // Match Home's source-of-truth contract: same `useListApps` query + // key and the same `isActive` filter Home applies in its + // orderedApps effect (home.tsx L365). We don't subscribe to Home's + // local drag-reorder state here because that state is intentionally + // a Home-only UX surface; the dock just mirrors the API order, same + // as Home's `orderedApps ?? apps` fallback on first render. const others = (apps ?? []).filter( (a) => a.isActive && a.slug !== currentSlug, ); - if (others.length < 1) return null; + // Skip the degenerate single-button dock: if the user only has one + // other app to switch to, the dock adds no real value. + if (others.length <= 1) return null; const openApp = (app: App) => { logAppOpen(app.id).catch(() => {}); diff --git a/artifacts/tx-os/src/pages/my-orders.tsx b/artifacts/tx-os/src/pages/my-orders.tsx index 124b07c7..ce6ea6de 100644 --- a/artifacts/tx-os/src/pages/my-orders.tsx +++ b/artifacts/tx-os/src/pages/my-orders.tsx @@ -25,6 +25,7 @@ import { } from "lucide-react"; import { Button } from "@/components/ui/button"; import { OrderServiceModal } from "@/components/order-service-modal"; +import { AppDock } from "@/components/app-dock"; import { AlertDialog, AlertDialogAction, @@ -514,6 +515,7 @@ export default function MyOrdersPage() { resolveImage={resolveServiceImageUrl} initialNotes={reorderTarget?.notes ?? null} /> + ); } diff --git a/artifacts/tx-os/src/pages/notifications.tsx b/artifacts/tx-os/src/pages/notifications.tsx index 59472e66..7c8b4f43 100644 --- a/artifacts/tx-os/src/pages/notifications.tsx +++ b/artifacts/tx-os/src/pages/notifications.tsx @@ -10,6 +10,7 @@ import { useQueryClient } from "@tanstack/react-query"; import { ArrowRight, ArrowLeft, Bell, CheckCheck } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; +import { AppDock } from "@/components/app-dock"; import { formatDateTime } from "@/lib/i18n-format"; import { useAuth } from "@/contexts/AuthContext";