Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/components/vault/vault-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ export function VaultWorkModeContent({ focusId }: { focusId?: string | undefined

if (runtime.state === 'loading') {
return (
<div className="text-muted-foreground flex items-center gap-2 px-1 py-6 text-sm">
<div className="text-muted-foreground flex items-center gap-2 px-4 py-6 text-sm">
<Loader2 className="size-4 animate-spin" aria-hidden />
{t('storageInitializing')}
</div>
);
}
if (runtime.state === 'unavailable') {
return (
<div className="flex flex-col gap-3 px-1 py-4">
<div className="flex flex-col gap-3 px-4 py-4">
<p className="text-destructive text-sm font-medium" role="alert">
{t(`errors.${runtime.code}`)}
</p>
Expand Down Expand Up @@ -421,7 +421,7 @@ export function VaultManagerPanel({ manager, facade, focusId }: VaultManagerPane
};

return (
<div className="flex flex-col gap-4 pb-6">
<div className="flex flex-col gap-4 px-4 pb-6">
<WorkModeSwitcher
facade={facade}
onModeChange={setMode}
Expand Down
8 changes: 7 additions & 1 deletion tests/e2e/vault-mode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ test.describe('Vault work mode', () => {
// Create form (name + password + confirm).
const createForm = drawer.getByTestId('vault-create-form');
await expect(createForm).toBeVisible({ timeout: 15_000 });
await createForm.getByLabel('Vault name').fill(VAULT_NAME);
const nameInput = createForm.getByLabel('Vault name');
const drawerBox = await drawer.boundingBox();
const inputBox = await nameInput.boundingBox();
if (!drawerBox || !inputBox) throw new Error('Work Mode drawer geometry is unavailable');
expect(inputBox.x - drawerBox.x).toBeGreaterThanOrEqual(16);
expect(drawerBox.x + drawerBox.width - inputBox.x - inputBox.width).toBeGreaterThanOrEqual(16);
await nameInput.fill(VAULT_NAME);
await createForm.getByLabel('Vault password', { exact: true }).fill(VAULT_PASSWORD);
await createForm.getByLabel('Confirm vault password').fill(VAULT_PASSWORD);
await createForm.getByRole('button', { name: 'Create vault' }).click();
Expand Down
Loading