Four findings from the ui-redesign verification pass, each with the module that owns the rule and the test that pins it. - events: the three-step strip's and the tab chips' counts move out of the SFC into events/counts.ts -- one read per step, an unreadable count stays blank rather than reading as zero (events-counts.test.ts). - workflows: workflows/workflow-yaml.ts reads the editor's YAML with a real parser (the yaml package, not a line scanner) to drive the read-only Steps preview and a live validity indicator; the editor gains a line-number gutter and light syntax colouring behind the textarea. Step types and their settings are not served to the dashboard, so those remain the server's to check on save, and a save it refuses still reports its own reason. - tasks: an ERROR log row is a block rather than only red text (lib/log.ts), the log pane ends with "End of attempt N - M lines", and the task head offers Archive when the server's own action list offers it (task-actions.ts, and TaskRowActions' new `only` narrows the list without inventing a control). - dashboard: the live activity feed gains the All/Tasks/System filter (activity-filter.ts) and every quality-gate row gains a pass bar (pass-bar.ts) that is red when the gate is failing. ui/dist regenerated; ui/package.json carries yaml ^2.9.1.
52 lines
1.4 KiB
Vue
52 lines
1.4 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
fmtValue,
|
|
LEVEL_COLOR,
|
|
levelKind,
|
|
rowClass,
|
|
shortTime,
|
|
type LogEntry,
|
|
} from "@/lib/log";
|
|
|
|
/**
|
|
* Shared log-entry rendering. Both the daemon-wide log page and a task's own
|
|
* attempt log render the same entry shape, so the row lives here rather than
|
|
* being duplicated a second time.
|
|
*/
|
|
const props = defineProps<{ entry: LogEntry }>();
|
|
|
|
const fields = () => Object.entries(props.entry.fields ?? {});
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="grid grid-cols-[62px_52px_1fr] items-baseline gap-3 border-b border-b-border border-l-2 px-1 py-2 hover:bg-accent"
|
|
:class="rowClass(props.entry.level)"
|
|
>
|
|
<span class="font-mono text-fg-subtle">{{
|
|
shortTime(props.entry.time)
|
|
}}</span>
|
|
<span
|
|
class="text-[10px] font-semibold tracking-[0.04em]"
|
|
:class="LEVEL_COLOR[levelKind(props.entry.level)]"
|
|
>
|
|
{{ (props.entry.level || "info").toUpperCase() }}
|
|
</span>
|
|
<span class="flex min-w-0 flex-wrap items-baseline gap-2">
|
|
<span class="break-words text-foreground">{{
|
|
props.entry.message || props.entry.msg || ""
|
|
}}</span>
|
|
<span
|
|
v-for="[k, v] in fields()"
|
|
:key="k"
|
|
class="max-w-full truncate rounded-sm bg-muted px-2 text-fg-muted"
|
|
>
|
|
<span class="text-fg-subtle after:opacity-60 after:content-['=']">{{
|
|
k
|
|
}}</span
|
|
>{{ fmtValue(v) }}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</template>
|