Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: alerts and the issue report are folded cards on a reports tab

The alerts and issues tabs are one reports tab in the nav. Each page, unchanged
inside, is a card that starts shut and reads nothing until opened; the alerts
header's link, button and refresh picker move into the card's body. /alerts and
/issues redirect to /reports. Docs follow.
This commit is contained in:
iris 2026-10-26 21:16:05 +01:00 • committed by mara
commit 599747bacb

View file

@ -1,4 +1,4 @@
// <IssueReportPage> — mara's custom issue report: browse open issues
// <IssueReportCard> — a card of the reports tab: mara's custom issue report: browse open issues
// across every repo that has one, sortable/filterable her own way, with
// "hide blocked (open dependency)" as the headline filter and a rank
// column for how many other open issues depend on each one. Backed by
@ -32,7 +32,7 @@ import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
import { readApiError, type ProblemDetails } from "@hive/shared/api-error.js";
import { Badge } from "@hive/shared/badge.js";
import { useLocalSetting } from "@hive/shared/settings-storage.js";
import { Panel } from "../ui/panel/Panel.js";
import { LazyDisclosure } from "../ui/disclosure/LazyDisclosure.js";
import { CheckboxField } from "../ui/checkbox-field/CheckboxField.js";
import { SelectField } from "../ui/select-field/SelectField.js";
import { Table, type TableColumn } from "../ui/table/Table.js";
@ -128,7 +128,7 @@ function SortHeader({
);
}
export function IssueReportPage() {
function IssueReportBody() {
const [repos, setRepos] = useState<string[] | null>(null);
const [repoFilter, setRepoFilter] = useLocalSetting(
REPO_FILTER_KEY,
@ -370,7 +370,7 @@ export function IssueReportPage() {
];
return (
<Panel title="issue report" icon="📋">
<>
<div class="issue-report-controls">
<SelectField
id="issue-report-repo"
@ -408,6 +408,20 @@ export function IssueReportPage() {
storageKey={TABLE_FILTERS_KEY}
/>
) : null}
</Panel>
</>
);
}
// A folded card on the reports tab: the repo list and the report are read only
// once it is opened.
export function IssueReportCard() {
return (
<LazyDisclosure
title="issue report"
icon="📋"
hint="open issues across every repo, ranked by what they block"
>
<IssueReportBody />
</LazyDisclosure>
);
}