Phone-width layout fixes (ENB-23)
CI / integration (push) Successful in 12s
CI / check (push) Successful in 16s

Checked at 390px and 360px in a headless mobile Chrome; no horizontal overflow
on any page.

- Tables become stacked cards on phones, with column names from data-label and
  row actions underneath instead of off the edge.
- Nav fits on one line; chips no longer wrap mid-name; less nested padding.
- Graph opens at a fixed readable zoom on phones with a pan/zoom hint, and
  scrolls to the details card when a node or label is tapped.
- Add the missing headings and wide layout to the user, entity and group forms
  (previously only the token form had them).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-20 13:34:21 +01:00
1 parent 0882d35123
commit 61bb6d912a
11 files changed
+154 -23

No files matched your search

+4 -3
View File
@@ -74,10 +74,10 @@ export function EntitiesTab({ client }: { client: BaoClient }) {
{entities.data?.map((e) => (
<tr key={e.id}>
<td>{e.name}</td>
<td>
<td data-label="Aliases">
<NameChips names={e.aliases.map((a) => a.name)} />
</td>
<td>
<td data-label="Policies">
<PolicyChips policies={e.policies} />
</td>
<td>
@@ -110,7 +110,8 @@ export function EntitiesTab({ client }: { client: BaoClient }) {
</button>
)}
{draft && (
<form onSubmit={submit} aria-label={draft.isNew ? 'New entity' : `Edit ${draft.name}`}>
<form onSubmit={submit} aria-label={draft.isNew ? 'New entity' : `Edit ${draft.name}`} className="wide">
<h3>{draft.isNew ? 'New entity' : `Edit ${draft.name}`}</h3>
<label>
Name
<input value={draft.name} disabled={!draft.isNew} onChange={(e) => setDraft({ ...draft, name: e.target.value })} required />
+4 -3
View File
@@ -57,10 +57,10 @@ export function GroupsTab({ client }: { client: BaoClient }) {
{groups.data?.map((g) => (
<tr key={g.id}>
<td>{g.name}</td>
<td>
<td data-label="Members">
<NameChips names={g.member_entity_ids.map(nameOf)} />
</td>
<td>
<td data-label="Policies">
<PolicyChips policies={g.policies} />
</td>
<td>
@@ -92,7 +92,8 @@ export function GroupsTab({ client }: { client: BaoClient }) {
</button>
)}
{draft && (
<form onSubmit={submit} aria-label={draft.isNew ? 'New group' : `Edit ${draft.name}`}>
<form onSubmit={submit} aria-label={draft.isNew ? 'New group' : `Edit ${draft.name}`} className="wide">
<h3>{draft.isNew ? 'New group' : `Edit ${draft.name}`}</h3>
<label>
Name
<input value={draft.name} disabled={!draft.isNew} onChange={(e) => setDraft({ ...draft, name: e.target.value })} required />
+3 -3
View File
@@ -104,11 +104,11 @@ export function TokensTab({ client }: { client: BaoClient }) {
{t.display_name || '—'}
{isSelf ? ' (you)' : ''}
</td>
<td>
<td data-label="Policies">
<PolicyChips policies={t.policies} />
</td>
<td>{formatTtl(t.ttl)}</td>
<td>
<td data-label="Expires">{formatTtl(t.ttl)}</td>
<td data-label="Accessor">
<code>{t.accessor.slice(0, 8)}…</code>
</td>
<td>
@@ -33,6 +33,15 @@ test('lists users', async () => {
expect(within(row).getByText('dev')).toBeInTheDocument()
})
test('the user form has a heading that says what it is for', async () => {
const user = setup()
await user.click(await screen.findByRole('button', { name: 'New user' }))
expect(screen.getByRole('heading', { name: 'New user' })).toBeInTheDocument()
await user.click(screen.getByRole('button', { name: 'Cancel' }))
await user.click(await screen.findByRole('button', { name: 'Edit alice' }))
expect(screen.getByRole('heading', { name: 'Edit alice' })).toBeInTheDocument()
})
test('creates a user with selected policies', async () => {
const user = setup()
await user.click(await screen.findByRole('button', { name: 'New user' }))
+3 -2
View File
@@ -58,7 +58,7 @@ export function UsersTab({ client }: { client: BaoClient }) {
{users.data?.map((u) => (
<tr key={u.name}>
<td>{u.name}</td>
<td>
<td data-label="Policies">
<PolicyChips policies={u.policies} />
</td>
<td>
@@ -90,7 +90,8 @@ export function UsersTab({ client }: { client: BaoClient }) {
</button>
)}
{draft && (
<form onSubmit={submit} aria-label={draft.isNew ? 'New user' : `Edit ${draft.name}`}>
<form onSubmit={submit} aria-label={draft.isNew ? 'New user' : `Edit ${draft.name}`} className="wide">
<h3>{draft.isNew ? 'New user' : `Edit ${draft.name}`}</h3>
<label>
Username
<input value={draft.name} disabled={!draft.isNew} onChange={(e) => setDraft({ ...draft, name: e.target.value })} required />