fix(ui): implement UI review findings — a11y, IA, and consistency fixes

Fixes the reviewed gaps: keyboard-inaccessible delete controls (SessionRail,
Entities row), case-sensitive entity filter, two competing entity-detail
navigation patterns (standardize on EntitySheet), non-clickable Overview KPI
cards, a bare button bypassing the shared Button component, inconsistent
blur-only vs live filtering, and an unenforced sanitization assumption on
search snippet HTML (now using the already-present dompurify dependency).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 21:52:59 +02:00
parent b72267bd72
commit fb4c76ba82
12 changed files with 404 additions and 88 deletions

View File

@@ -8,6 +8,7 @@
import { Badge } from '$lib/components/ui/badge'
import * as Sheet from '$lib/components/ui/sheet'
import { Skeleton } from '$lib/components/ui/skeleton'
import EntitySheet from '$lib/components/EntitySheet.svelte'
import LocateFixedIcon from '@lucide/svelte/icons/locate-fixed'
interface Node extends Entity {
@@ -289,6 +290,14 @@
search = ''
load()
}
let entitySheetOpen = $state(false)
let entitySheetSlug = $state<string | null>(null)
function openEntityDetail(slug: string) {
entitySheetSlug = slug
entitySheetOpen = true
}
</script>
<div class="flex h-full flex-col gap-3 p-4">
@@ -461,7 +470,7 @@
</Sheet.Header>
<div class="flex flex-col gap-4 overflow-y-auto px-4 pb-4">
<div class="flex gap-2">
<Button variant="outline" size="sm" onclick={() => (location.hash = '#/entity/' + encodeURIComponent(selected!.slug))}>
<Button variant="outline" size="sm" onclick={() => openEntityDetail(selected!.slug)}>
View entity detail
</Button>
<Button variant="outline" size="sm" onclick={() => rerootTo(selected as Node)}>Re-root here</Button>
@@ -504,3 +513,5 @@
{/if}
</Sheet.Content>
</Sheet.Root>
<EntitySheet slug={entitySheetSlug} bind:open={entitySheetOpen} />