fix(ui/topbar): replace Jump to with a command palette, drop filler chrome (#1650)
* fix(ui/topbar): replace Jump to with a command palette, drop filler chrome Jump to opens a shadcn-vue Command dialog that finds pages, tasks and workflows by name. The connection indicator shows only when the stream is lost, the dead documentation link is gone, and the profile menu label has no stray whitespace. * fix(ui): trim stray whitespace from template text and drop em dashes from copy Element text that started or ended with a line break rendered with leading and trailing spaces. Also removes the unused 'soon' nav state and the nav group components no route reaches. * fix(ui): drop the space a hidden spinner left before button text * fix(ui/status): one dense Status page, full-width settings, problems-only apply status Status drops its tabs and the duplicate health card; services list only what is wrong. Settings pages use the full width, the resizable sidebar handle is gone, and apply status shows only processes that have not applied a change. PageHeader puts the title and actions on one line. * refactor(ui): use shadcn ToggleGroup and Badge, drop SegmentedControl and StatusPill Status badges show only when a state needs attention: no Running, Enabled, Active, Listening or live pills next to healthy rows. Removes the unused pagination, radio-group and scroll-area components. * fix(ui/history): use the shadcn Table with fixed columns so nothing is clipped * fix(ui/workflows): apply ?workflow= only once the workflow is listed Selecting it before the definitions loaded opened an empty canvas. * refactor(ui/workflows): use shadcn Input, NativeSelect, Checkbox and Button in editors Replaces hand-rolled inputs, selects, the repository mode switch and icon buttons in the workflow editor, bind dialog, harness page, sources panel and review gate. Adds the upstream shadcn-vue NativeSelect. * style(ui): rounded-rectangle controls instead of pills Halves the radius scale so inputs, selects and buttons stop reading as pills, and badges and chips lose their full rounding. * fix(ui/alerts): centre the bell's failed state and stop it contradicting Needs you * fix(ui/tasks): one header line, aligned columns, no placeholder issue numbers Tasks puts its filters beside the title and drops the stat tiles the dashboard already shows. Sort headers align with their cells, chat tasks no longer show their synthetic issue number, and Logs and the task not-found page use the shared header. * fix(ui/dashboard): shared header and cards, empty cards stay silent Needs you uses the shadcn Card and drops its duplicate Open button; quality gates and token outlook render only when there is something to show; the throughput strip moves into the dashboard, its only user. * refactor(ui/stores): one Pinia store per feature Splits the site-wide control-plane store and the module-level refs into settings, workflows, tasks, events, org and session stores. Identity requests move into lib/api. Drops store fields nothing read: per-resource stream state, the states map and loadApplyStatus. * fix(ui/org): one header for the org area, sections drop their repeated titles The org name is the page title with the admin's org switcher and New org beside it; Members and Workspaces tables sit in cards like other pages. * fix(ui/events): shadcn Tabs for the capture, map and bind steps Replaces the numbered step strip with line tabs that carry each step's count; the Listening pill is gone and Capture off shows only when it is. * fix(ui/workflows): confirm a workflow delete in an AlertDialog, not window.confirm * style(ui/settings): denser setting rows
This commit is contained in:
1 parent
94d2f98cc0
commit
3bf64933b0
209 files changed
+2158
-3175
No files matched your search
@@ -1,16 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* The shared page title and its actions. A component rather than per-page
|
||||
* markup because hand-built copies drift.
|
||||
*/
|
||||
/** Every page's title, with its actions on the same line. */
|
||||
defineProps<{ title: string }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mb-6 flex flex-wrap items-start justify-between gap-5">
|
||||
<h1 class="text-2xl font-semibold tracking-[-0.02em]">{{ title }}</h1>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<header class="mb-4 flex min-h-9 flex-wrap items-center justify-between gap-x-4 gap-y-2">
|
||||
<h1 class="text-xl font-semibold tracking-tight">{{ title }}</h1>
|
||||
<div v-if="$slots.default" class="flex flex-wrap items-center gap-2">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
@@ -1,53 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
|
||||
/**
|
||||
* Inline SVG sparkline. Shows shape, not exact values: the tile's headline
|
||||
* number carries the precision.
|
||||
*/
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
series: number[];
|
||||
stroke?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}>(),
|
||||
{ stroke: "var(--ok)", width: 220, height: 34 },
|
||||
);
|
||||
|
||||
const points = computed(() => {
|
||||
const max = Math.max(...props.series, 1);
|
||||
const min = Math.min(...props.series, 0);
|
||||
const span = max - min || 1;
|
||||
const step =
|
||||
props.series.length > 1
|
||||
? props.width / (props.series.length - 1)
|
||||
: props.width;
|
||||
|
||||
return props.series
|
||||
.map(
|
||||
(v, i) =>
|
||||
`${(i * step).toFixed(1)},${(props.height - ((v - min) / span) * props.height).toFixed(1)}`,
|
||||
)
|
||||
.join(" ");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<svg
|
||||
class="mt-3 block h-[34px] w-full"
|
||||
:viewBox="`0 0 ${props.width} ${props.height}`"
|
||||
preserveAspectRatio="none"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<polyline
|
||||
:points="points"
|
||||
fill="none"
|
||||
:stroke="props.stroke"
|
||||
stroke-width="1.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
vector-effect="non-scaling-stroke"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -1,81 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { TrendingDown, TrendingUp } from "@lucide/vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Card,
|
||||
CardAction,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import Sparkline from "./Sparkline.vue";
|
||||
|
||||
/**
|
||||
* A KPI tile: label, big value, trend against a stated comparison window, and
|
||||
* a sparkline. The comparison line is not decoration -- a number without a
|
||||
* baseline cannot be acted on, so `compare` is required.
|
||||
*
|
||||
* trend > 0 renders as an increase. `goodDirection` says whether that is good,
|
||||
* because rising latency and rising success rate are not the same news.
|
||||
*
|
||||
* The headline value is rendered whatever its type, including 0 and "": a tile
|
||||
* that showed a label and a comparison line with no number above them read as
|
||||
* a broken dashboard on every fresh install.
|
||||
*/
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
label: string;
|
||||
value: string | number;
|
||||
unit?: string;
|
||||
trend?: number | null;
|
||||
compare: string;
|
||||
series?: number[];
|
||||
goodDirection?: "up" | "down";
|
||||
}>(),
|
||||
{ series: () => [], goodDirection: "up" },
|
||||
);
|
||||
|
||||
const dir = computed(() =>
|
||||
props.trend == null ? null : props.trend >= 0 ? "up" : "down",
|
||||
);
|
||||
const good = computed(() =>
|
||||
dir.value == null ? null : dir.value === props.goodDirection,
|
||||
);
|
||||
const trendIcon = computed(() =>
|
||||
dir.value === "up" ? TrendingUp : TrendingDown,
|
||||
);
|
||||
const trendLabel = computed(() => `${Math.abs(props.trend ?? 0).toFixed(1)}%`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>{{ props.label }}</CardTitle>
|
||||
<CardDescription v-if="props.compare">{{
|
||||
props.compare
|
||||
}}</CardDescription>
|
||||
<CardAction v-if="dir">
|
||||
<Badge :variant="good ? 'ok' : 'danger'">
|
||||
<component :is="trendIcon" />
|
||||
{{ trendLabel }}
|
||||
</Badge>
|
||||
</CardAction>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="text-3xl font-semibold tracking-[-0.03em]">
|
||||
{{ props.value
|
||||
}}<span v-if="props.unit" class="ml-1 text-lg text-fg-muted">{{
|
||||
props.unit
|
||||
}}</span>
|
||||
</div>
|
||||
<Sparkline
|
||||
v-if="props.series.length > 1"
|
||||
:series="props.series"
|
||||
:stroke="good === false ? 'var(--danger)' : 'var(--ok)'"
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</template>
|
||||
Reference in new issue
Block a user