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

View File

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