fix: show empty state for unmanaged apps on Deployments tab
Previously showed an infinite spinner because unmanaged apps have no PostgreSQL record. Now shows an "Unmanaged Application" message with a link to create a managed app. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -553,7 +553,19 @@ function AppDetailView({ appId: appSlug, environments, selectedEnv }: { appId: s
|
||||
const envMap = useMemo(() => new Map(environments.map((e) => [e.id, e])), [environments]);
|
||||
const sortedVersions = useMemo(() => [...versions].sort((a, b) => b.version - a.version), [versions]);
|
||||
|
||||
if (!app) return <PageLoader />;
|
||||
if (!app) {
|
||||
return (
|
||||
<div style={{ padding: '40px 24px' }}>
|
||||
<EmptyState
|
||||
title="Unmanaged Application"
|
||||
description={`"${appSlug}" is a discovered application registered by agents. To manage deployments, create it as a managed app first.`}
|
||||
/>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', marginTop: 16 }}>
|
||||
<Button variant="primary" onClick={() => navigate('/apps/new')}>Create Managed App</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const env = envMap.get(app.environmentId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user