ui(drawer): reorder tabs Config first, default to Config

This commit is contained in:
hsiegeln
2026-04-23 16:15:29 +02:00
parent e00848dc65
commit 0ae27ad9ed
2 changed files with 5 additions and 5 deletions

View File

@@ -60,11 +60,11 @@ describe('CheckpointDetailDrawer', () => {
expect(screen.getByText(/alice/)).toBeInTheDocument(); expect(screen.getByText(/alice/)).toBeInTheDocument();
}); });
it('Logs tab is selected by default', () => { it('Config tab is selected by default', () => {
renderDrawer(); renderDrawer();
// Tabs from DS may render as buttons or tabs role — be lenient on the query // Tabs from DS may render as buttons or tabs role — be lenient on the query
const logsTab = screen.getByText(/^logs$/i); const configTab = screen.getByText(/^config$/i);
expect(logsTab).toBeInTheDocument(); expect(configTab).toBeInTheDocument();
}); });
it('disables Restore when JAR is pruned', () => { it('disables Restore when JAR is pruned', () => {

View File

@@ -24,7 +24,7 @@ type TabId = 'logs' | 'config';
export function CheckpointDetailDrawer({ export function CheckpointDetailDrawer({
open, onClose, deployment, version, appSlug, envSlug, onRestore, currentForm, open, onClose, deployment, version, appSlug, envSlug, onRestore, currentForm,
}: Props) { }: Props) {
const [tab, setTab] = useState<TabId>('logs'); const [tab, setTab] = useState<TabId>('config');
const archived = !version; const archived = !version;
const title = ( const title = (
@@ -67,8 +67,8 @@ export function CheckpointDetailDrawer({
active={tab} active={tab}
onChange={(t) => setTab(t as TabId)} onChange={(t) => setTab(t as TabId)}
tabs={[ tabs={[
{ value: 'logs', label: 'Logs' },
{ value: 'config', label: 'Config' }, { value: 'config', label: 'Config' },
{ value: 'logs', label: 'Logs' },
]} ]}
/> />
<div className={styles.tabContent}> <div className={styles.tabContent}>