Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { COOKIE_KEYS } from '@/configs/keys'
import { SandboxInspectProvider } from '@/features/dashboard/sandbox/inspect/context'
import SandboxInspectFilesystem from '@/features/dashboard/sandbox/inspect/filesystem'
import SandboxInspectViewer from '@/features/dashboard/sandbox/inspect/viewer'
import { cn } from '@/lib/utils'
import { resolveTeamIdInServerComponent } from '@/lib/utils/server'
import { getSandboxRoot } from '@/server/sandboxes/get-sandbox-root'
import ClientOnly from '@/ui/client-only'
Expand Down Expand Up @@ -40,12 +39,7 @@ export default async function SandboxInspectPage({
rootPath={rootPath}
seedEntries={res?.data?.entries ?? []}
>
<ClientOnly
className={cn(
'flex flex-1 gap-4 overflow-hidden p-3 md:p-6',
'max-md:sticky max-md:top-0 max-md:min-h-[calc(100vh-var(--protected-navbar-height))]'
)}
>
<ClientOnly className="max-md:absolute max-md:inset-0 flex flex-1 gap-4 overflow-hidden p-3 md:p-6">
<SandboxInspectFilesystem rootPath={rootPath} />
<SandboxInspectViewer />
</ClientOnly>
Expand Down
4 changes: 2 additions & 2 deletions src/features/dashboard/sandbox/inspect/incompatible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export default function SandboxInspectIncompatible({
team_id: teamIdOrSlug,
template_name_or_id: templateNameOrId,
})
}, [trackInteraction, teamIdOrSlug])
}, [trackInteraction, teamIdOrSlug, templateNameOrId])

return (
<div className="flex h-full w-full flex-col items-center justify-center p-4 md:justify-center">
<div className="flex flex-1 min-h-0 max-md:absolute max-md:inset-0 w-full max-md: flex-col items-center justify-center p-4 md:justify-center">
<div className="text-fill-highlight pointer-events-none absolute -top-30 -right-100 -z-10 flex overflow-hidden">
<AsciiBackgroundPattern className="w-1/2" />
<AsciiBackgroundPattern className="mi w-1/2 -scale-x-100" />
Expand Down
10 changes: 7 additions & 3 deletions src/features/dashboard/sandbox/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ export default function SandboxLayout({
}

return (
<div className="flex max-h-svh h-full min-h-0 flex-1 flex-col max-md:overflow-y-auto">
<div className="flex max-h-svh h-full min-h-0 flex-1 flex-col max-md:h-auto max-md:min-h-svh max-md:overflow-y-auto">
{header}

<DashboardTabs type="path" layoutKey="tabs-indicator-sandbox">
<DashboardTabs
type="path"
layoutKey="tabs-indicator-sandbox"
className="max-md:sticky max-md:top-0 max-md:z-20 max-md:bg-bg max-md:min-h-svh"
>
<DashboardTab
id="inspect"
label="Inspect"
className="flex flex-col max-h-full"
className="flex flex-col max-h-full relative"
>
{isEnvdVersionCompatibleForInspect ? (
children
Expand Down
2 changes: 1 addition & 1 deletion src/ui/dashboard-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function DashboardTabsComponent({
className="w-fit flex-none"
asChild
>
<Link href={tab.href} prefetch>
<Link href={tab.href}>
{tab.icon}
{tab.label}
</Link>
Expand Down
Loading