style(ui): flat menu sheets, digests folded with job runs, shorter spend caption

This commit is contained in:
hh
2026-09-02 04:43:04 +02:00
parent f35980ba85
commit 81d6560bf7
4 changed files with 78 additions and 12 deletions
+25 -10
View File
@@ -133,6 +133,22 @@
const refresh = () => index.load().catch(() => undefined);
// What the agent did on its own that day: digests and scheduled runs.
function quietSummary(group: DayGroup): string {
const parts: string[] = [];
if (group.forks.length) {
parts.push(
`${group.forks.length} ${group.forks.length === 1 ? "digest" : "digests"}`
);
}
if (group.jobs.length) {
parts.push(
`${group.jobs.length} ${group.jobs.length === 1 ? "job run" : "job runs"}`
);
}
return parts.join(" · ");
}
const linkOf = (id: string) => href?.(id);
</script>
@@ -294,7 +310,7 @@
{row}
/>
{/each}
{#each [...group.forks, ...group.others] as row (row.id)}
{#each group.others as row (row.id)}
<Strip
{client}
current={row.id === selected}
@@ -306,28 +322,27 @@
{row}
/>
{/each}
{#if group.jobs.length > 0}
{@const shownJobs = jobsOpen.has(group.day)}
{#if group.forks.length + group.jobs.length > 0}
{@const shownQuiet = jobsOpen.has(group.day)}
<button
aria-expanded={shownJobs}
aria-expanded={shownQuiet}
class="strip w-full text-left text-muted-foreground text-xs"
onclick={() => toggleJobs(group.day)}
type="button"
>
<span class="size-5"></span>
<span>
{group.jobs.length}
{group.jobs.length === 1 ? "job run" : "job runs"}
· {shownJobs ? "hide" : "show"}
{quietSummary(group)}
· {shownQuiet ? "hide" : "show"}
</span>
<span></span>
</button>
{#if shownJobs}
{#each group.jobs as row (row.id)}
{#if shownQuiet}
{#each [...group.forks, ...group.jobs] as row (row.id)}
<Strip
{client}
current={row.id === selected}
detail={row.last_item?.text ?? ""}
detail={row.last_item?.text ?? `${row.kind} · ${row.status}`}
href={linkOf(row.id)}
{now}
onChanged={refresh}