fix(ui): phone-width overflows in the audit's flagged rows, with an e2e check (#1757)
Grants rows and toggle groups wrap with a smaller phone label; the token form wraps and its input flexes; the sources name column caps at full width and its action buttons wrap; the rule-editor condition row wraps with a full-width phone select; the payload tree indents less and breaks long JSON leaves; the topbar instance badge truncates; org agent rows keep Assign inline and move Rename/Suspend/Retire into a MoreMenu. New e2e check phone-overflow.cjs visits these views at 390x844 with seeded data and asserts no horizontal scroll.
This commit is contained in:
8 files changed
+91
-31
No files matched your search
@@ -29,6 +29,8 @@ import {
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
||||
import { MoreMenu } from "@/components/ui/more-menu";
|
||||
import { Section } from "@/components/ui/section";
|
||||
import { api } from "@/lib/api";
|
||||
import { useOrgStore, type Identity } from "@/stores/org";
|
||||
@@ -161,7 +163,7 @@ const isAgent = (value: Identity) =>
|
||||
</div>
|
||||
<Badge v-if="isAgent(value) && serves.has(value.id)" variant="outline" class="font-mono">{{ org?.id }}</Badge>
|
||||
<Badge v-if="value.lifecycle !== 'active'" :variant="lifecycle[value.lifecycle]" class="capitalize">{{ value.lifecycle }}</Badge>
|
||||
<div v-if="value.kind !== 'system' && value.lifecycle !== 'retired'" class="flex flex-wrap gap-1">
|
||||
<div v-if="value.kind !== 'system' && value.lifecycle !== 'retired'" class="flex flex-wrap items-center gap-1">
|
||||
<Tooltip v-if="isAgent(value) && !serves.has(value.id)">
|
||||
<TooltipTrigger as-child>
|
||||
<Button
|
||||
@@ -174,19 +176,16 @@ const isAgent = (value: Identity) =>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Assign to {{ org?.name }}</TooltipContent>
|
||||
</Tooltip>
|
||||
<Button variant="ghost" size="sm" :disabled="!!store.identityBusy" @click="startRename(value)">Rename</Button>
|
||||
<Button
|
||||
v-if="value.lifecycle === 'active'"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
:disabled="!!store.identityBusy"
|
||||
@click="store.identityCommand(value, 'suspend')"
|
||||
>Suspend</Button
|
||||
>
|
||||
<Button v-else variant="ghost" size="sm" :disabled="!!store.identityBusy" @click="store.identityCommand(value, 'reactivate')"
|
||||
>Reactivate</Button
|
||||
>
|
||||
<Button variant="ghost" size="sm" class="text-danger" :disabled="!!store.identityBusy" @click="retiring = value">Retire</Button>
|
||||
<MoreMenu :label="`Actions for ${value.display_name || value.id}`">
|
||||
<DropdownMenuItem :disabled="!!store.identityBusy" @select="startRename(value)">Rename</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
v-if="value.lifecycle === 'active'"
|
||||
:disabled="!!store.identityBusy"
|
||||
@select="store.identityCommand(value, 'suspend')"
|
||||
>Suspend</DropdownMenuItem>
|
||||
<DropdownMenuItem v-else :disabled="!!store.identityBusy" @select="store.identityCommand(value, 'reactivate')">Reactivate</DropdownMenuItem>
|
||||
<DropdownMenuItem variant="destructive" :disabled="!!store.identityBusy" @select="retiring = value">Retire</DropdownMenuItem>
|
||||
</MoreMenu>
|
||||
</div>
|
||||
</Item>
|
||||
<li v-if="!store.identitiesLoaded" class="py-3 text-label text-fg-muted" role="status">Loading agents…</li>
|
||||
|
||||
Reference in new issue
Block a user