From 61bb6d912ae5e83e4e3186c99b3c345e68cbc479 Mon Sep 17 00:00:00 2001 From: Matthew Daubney Date: Tue, 20 Oct 2026 13:34:21 +0100 Subject: [PATCH] Phone-width layout fixes (ENB-23) 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 --- src/features/access/AccessEditor.tsx | 2 +- src/features/graph/Details.tsx | 6 +- src/features/graph/GraphPage.tsx | 19 ++++- src/features/identities/EntitiesTab.tsx | 7 +- src/features/identities/GroupsTab.tsx | 7 +- src/features/identities/TokensTab.tsx | 6 +- src/features/identities/UsersTab.test.tsx | 9 +++ src/features/identities/UsersTab.tsx | 5 +- src/features/secrets/AccessPanel.tsx | 4 +- src/features/shared/useNarrow.ts | 18 +++++ src/index.css | 94 ++++++++++++++++++++++- 11 files changed, 154 insertions(+), 23 deletions(-) create mode 100644 src/features/shared/useNarrow.ts diff --git a/src/features/access/AccessEditor.tsx b/src/features/access/AccessEditor.tsx index 26dcbd5..36f1c1c 100644 --- a/src/features/access/AccessEditor.tsx +++ b/src/features/access/AccessEditor.tsx @@ -114,7 +114,7 @@ export function AccessEditor({ client, target, onClose }: Props) { {row.display} {row.wildcard && everything inside} - + diff --git a/src/features/graph/Details.tsx b/src/features/graph/Details.tsx index 381cd5e..a5b09ba 100644 --- a/src/features/graph/Details.tsx +++ b/src/features/graph/Details.tsx @@ -1,4 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query' +import type { Ref } from 'react' import type { BaoClient } from '../../api/bao' import { revokeAccess } from '../../api/grants' import type { AccessGraph, GraphEdge, GraphNode, PolicyInput } from '../../model/graph' @@ -14,6 +15,7 @@ interface Props { policies: PolicyInput[] selection: Selection | null onRevoked: () => void + ref?: Ref } const nodeById = (g: AccessGraph, id: string) => g.nodes.find((n) => n.id === id) @@ -210,7 +212,7 @@ function EdgeDetails({ client, edge, full, policies, onRevoked }: { client: BaoC ) } -export function Details({ client, full, policies, selection, onRevoked }: Props) { +export function Details({ client, full, policies, selection, onRevoked, ref }: Props) { let body =

Select a node or a line to see what it grants.

if (selection?.kind === 'node') { const node = nodeById(full, selection.id) @@ -220,7 +222,7 @@ export function Details({ client, full, policies, selection, onRevoked }: Props) if (edge) body = } return ( -