Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): don't deep-link health rows the triage can't filter
[._.]/ Adam Eivy2abd3bc3ac3b
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 098424d0a6..139d556411 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -57,7 +57,7 @@## Editorial checks-- **[issue-1606] The editorial health panel's category and check breakdowns are now clickable — tap one to filter the findings list to it.** The "Open by category" and "Open by check" rows (and their regression flags) showed you *where* the problems were but weren't navigable: spotting a regressed category meant manually re-scanning the list for its findings. Each row is now a button that deep-links the triage filter to that category or check and scrolls the findings list into view; clicking the active row again clears the filter, and the row shows a highlighted state while it's the active filter. Because the filter writes the same URL query the toolbar uses, the resulting view stays deep-linkable. This also adds a proper **Category** filter to the triage toolbar — distinct from the existing scope filter, which is now correctly labeled **Scope** (its Noun/Scene/Issue/Series values were mislabeled "Category"). (`client/src/components/pipeline/editorial/EditorialHealthPanel.jsx`, `client/src/components/pipeline/editorial/EditorialFindingsTriage.jsx`, `client/src/lib/editorialChecks.js`)+- **[issue-1606] The editorial health panel's category and check breakdowns are now clickable — tap one to filter the findings list to it.** The "Open by category" and "Open by check" rows (and their regression flags) showed you *where* the problems were but weren't navigable: spotting a regressed category meant manually re-scanning the list for its findings. Each row whose findings you can triage is now a button that deep-links the triage filter to that category or check and scrolls the findings list into view; clicking the active row again clears the filter, and the row shows a highlighted state while it's the active filter. (Rows that only count findings the triage doesn't list — e.g. the "completeness" bucket — stay as plain text rather than linking to an empty list.) Because the filter writes the same URL query the toolbar uses, the resulting view stays deep-linkable. This also adds a proper **Category** filter to the triage toolbar — distinct from the existing scope filter, which is now correctly labeled **Scope** (its Noun/Scene/Issue/Series values were mislabeled "Category"). (`client/src/components/pipeline/editorial/EditorialHealthPanel.jsx`, `client/src/components/pipeline/editorial/EditorialFindingsTriage.jsx`, `client/src/lib/editorialChecks.js`)- **[issue-1596] Override any editorial check's severity to match a series' house style — without touching code.** Every check ships a fixed default severity (e.g. `prose.adverb-density` defaults to `low`), but a literary-fiction series may want adverb density flagged `high` while an action series wants it `low`. Each check in the catalog now has a **Severity** selector: leave it on **Default** to use the registry value, or pin it to `high` / `medium` / `low`. A pin is **authoritative** — every finding that check raises is stamped with the chosen level, consistently across deterministic *and* LLM checks (a pin overrides both a check's escalation-from-default and an LLM's own per-finding severity, so "pin this check to low" actually means low everywhere). On the next run the pin also re-grades the check's *existing* open findings — even ones a sampled LLM pass doesn't re-surface — so the editorial-health score and any severity-based autopilot gating reflect the pinned level immediately rather than lagging on stale severities. Leaving a check on **Default** preserves its native per-finding nuance untouched. The override is backward-compatible and additive (absent → the check's `severityDefault`), and the catalog badge shows the effective level with a `*` marker when it's been overridden. (`server/lib/editorial/checkRegistry.js`, `server/routes/pipeline/editorial.js`, `server/services/pipeline/editorial/checkRunner.js`, `server/lib/validation.js`, `client/src/components/pipeline/editorial/EditorialCheckCard.jsx`, `client/src/pages/PipelineEditorialChecks.jsx`)diff --git a/client/src/components/pipeline/editorial/EditorialHealthPanel.jsx b/client/src/components/pipeline/editorial/EditorialHealthPanel.jsxindex 083f9d7a70..9bf9eec68a 100644--- a/client/src/components/pipeline/editorial/EditorialHealthPanel.jsx+++ b/client/src/components/pipeline/editorial/EditorialHealthPanel.jsx@@ -83,25 +83,38 @@ function CheckSparkline({ counts }) {// remainder is surfaced as a "+N more" note rather than silently dropped.const MAX_CHECK_ROWS = 8;-// A clickable breakdown row (#1606) — toggles a triage filter, with the active-// highlight kept in one place so the category and check lists can't drift. The-// row's inner content differs per breakdown, so it's passed as children; layout-// tweaks (width/gap) come through `className`.-function FilterRowButton({ active, title, onClick, className = '', children }) {+// A breakdown row (#1606) — when `interactive`, a button that toggles a triage+// filter, with the active highlight kept in one place so the category and check+// lists can't drift. When NOT interactive (the triage can't filter to this row's+// key — e.g. the synthetic `completeness` bucket of null-checkId findings, which+// the triage drops), it renders as static text so the deep-link can't strand the+// user on an empty list. Inner content differs per breakdown, so it's passed as+// children; layout tweaks (width/gap) come through `className`.+function FilterRowButton({ active, title, onClick, interactive = true, className = '', children }) {+ const base = `flex items-center rounded px-1 py-0.5 text-[11px] ${className}`;+ if (!interactive) {+ return <span className={base} title={title}>{children}</span>;+ }return (<buttontype="button"onClick={onClick}aria-pressed={active}title={title}- className={`flex items-center rounded px-1 py-0.5 text-[11px] transition-colors hover:bg-port-border/50 ${active ? 'bg-port-accent/15 ring-1 ring-port-accent/40' : ''} ${className}`}+ className={`${base} transition-colors hover:bg-port-border/50 ${active ? 'bg-port-accent/15 ring-1 ring-port-accent/40' : ''}`}>{children}</button>);}-export default function EditorialHealthPanel({ seriesId, refreshKey = 0, checksById = {} }) {+export default function EditorialHealthPanel({+ seriesId,+ refreshKey = 0,+ checksById = {},+ filterableCheckIds = null,+ filterableCategories = null,+}) {const [health, setHealth] = useState(null);const [loading, setLoading] = useState(false);const [savingGate, setSavingGate] = useState(false);@@ -131,6 +144,11 @@ export default function EditorialHealthPanel({ seriesId, refreshKey = 0, checksBtoggleFilter(FINDING_FILTER_PARAMS.category, category, activeCategory === category);const filterByCheck = (checkId) =>toggleFilter(FINDING_FILTER_PARAMS.check, checkId, activeCheck === checkId);+ // A breakdown row only deep-links when the triage can actually filter to it.+ // When the caller doesn't supply the filterable sets (older callers / tests),+ // default to clickable rather than disabling every row.+ const canFilterCategory = (category) => !filterableCategories || filterableCategories.has(category);+ const canFilterCheck = (checkId) => !filterableCheckIds || filterableCheckIds.has(checkId);// Guard against a stale response: switching series (or a fast refresh) can let// an older fetch resolve last and render the wrong series' health. Only the@@ -264,12 +282,16 @@ export default function EditorialHealthPanel({ seriesId, refreshKey = 0, checksB{categories.map(({ category, count }) => {const regressed = regressions.find((r) => r.category === category);const active = activeCategory === category;+ const canFilter = canFilterCategory(category);return (<li key={category}><FilterRowButtonactive={active}+ interactive={canFilter}onClick={() => filterByCategory(category)}- title={active ? `Clear the ${category} filter` : `Filter findings to ${category}`}+ title={canFilter+ ? (active ? `Clear the ${category} filter` : `Filter findings to ${category}`)+ : `${category} findings aren't in the triage filter`}className="gap-1"><span className={active ? 'text-gray-100' : 'text-gray-300'}>{category}</span>@@ -296,12 +318,16 @@ export default function EditorialHealthPanel({ seriesId, refreshKey = 0, checksB<ul className="mt-1 space-y-0.5">{checkRows.map(({ checkId, label, count, counts, regressed }) => {const active = activeCheck === checkId;+ const canFilter = canFilterCheck(checkId);return (<li key={checkId}><FilterRowButtonactive={active}+ interactive={canFilter}onClick={() => filterByCheck(checkId)}- title={active ? `Clear the ${label} filter` : `Filter findings to ${label}`}+ title={canFilter+ ? (active ? `Clear the ${label} filter` : `Filter findings to ${label}`)+ : `${label} findings aren't in the triage filter`}className="w-full gap-2 text-gray-400"><span className={`min-w-0 flex-1 truncate text-left ${active ? 'text-gray-100' : 'text-gray-300'}`} title={label}>{label}</span>diff --git a/client/src/components/pipeline/editorial/EditorialHealthPanel.test.jsx b/client/src/components/pipeline/editorial/EditorialHealthPanel.test.jsxindex 2009d651a6..e470bb6c04 100644--- a/client/src/components/pipeline/editorial/EditorialHealthPanel.test.jsx+++ b/client/src/components/pipeline/editorial/EditorialHealthPanel.test.jsx@@ -197,4 +197,43 @@ describe('EditorialHealthPanel', () => {fireEvent.click(screen.getByTitle('Filter findings to Cast economy'));await waitFor(() => expect(params()).toContain('fcheck=roster.economy'));});++ it('renders a non-triage-filterable check row as static text, not a deep-link (#1606)', async () => {+ // The synthetic `completeness` bucket counts null-checkId findings the triage+ // drops, so it isn't in the filterable set — its row must not link to an empty list.+ getEditorialHealth.mockResolvedValue(health({+ openByCheck: { completeness: 2 },+ trend: { points: [{ score: 83, openByCheck: { completeness: 2 } }], regressions: [], checkRegressions: [], delta: 0 },+ }));+ renderPanel({ seriesId: 'ser-1', filterableCheckIds: new Set(), filterableCategories: new Set() });+ await screen.findByText('83');+ const row = screen.getByTitle(/completeness findings aren't in the triage filter/i);+ expect(row.tagName).toBe('SPAN');+ expect(screen.queryByTitle('Filter findings to completeness')).toBeNull();+ });++ it('renders a non-triage-filterable category row as static text (#1606)', async () => {+ getEditorialHealth.mockResolvedValue(health({ openByCategory: { plot: 2 } }));+ renderPanel({ seriesId: 'ser-1', filterableCheckIds: new Set(), filterableCategories: new Set() });+ await screen.findByText('83');+ const row = screen.getByTitle(/plot findings aren't in the triage filter/i);+ expect(row.tagName).toBe('SPAN');+ expect(screen.queryByTitle('Filter findings to plot')).toBeNull();+ });++ it('keeps a filterable check row clickable when filterable sets are provided (#1606)', async () => {+ getEditorialHealth.mockResolvedValue(health({+ openByCheck: { 'roster.economy': 1 },+ trend: { points: [{ score: 83, openByCheck: { 'roster.economy': 1 } }], regressions: [], checkRegressions: [], delta: 0 },+ }));+ renderPanel({+ seriesId: 'ser-1',+ checksById: { 'roster.economy': { label: 'Cast economy' } },+ filterableCheckIds: new Set(['roster.economy']),+ filterableCategories: new Set(),+ });+ await screen.findByText('83');+ fireEvent.click(screen.getByTitle('Filter findings to Cast economy'));+ await waitFor(() => expect(params()).toContain('fcheck=roster.economy'));+ });});diff --git a/client/src/pages/PipelineEditorialChecks.jsx b/client/src/pages/PipelineEditorialChecks.jsxindex f0b220d4a1..c7eed84722 100644--- a/client/src/pages/PipelineEditorialChecks.jsx+++ b/client/src/pages/PipelineEditorialChecks.jsx@@ -20,7 +20,7 @@ import EditorialCustomCheckForm from '../components/pipeline/editorial/Editorialimport EditorialFindingsTriage from '../components/pipeline/editorial/EditorialFindingsTriage';import EditorialHealthPanel from '../components/pipeline/editorial/EditorialHealthPanel';import ProviderModelSelector from '../components/ProviderModelSelector';-import { groupChecksByScope } from '../lib/editorialChecks';+import { groupChecksByScope, normCategory } from '../lib/editorialChecks';import { usePipelineProgress } from '../hooks/usePipelineProgress';import useProviderModels from '../hooks/useProviderModels';import {@@ -84,6 +84,20 @@ export default function PipelineEditorialChecks() {);const enabledCount = useMemo(() => checks.filter((c) => c.enabled).length, [checks]);const scopeGroups = useMemo(() => groupChecksByScope(checks), [checks]);+ // The check/category values the triage can actually FILTER to — i.e. those+ // carried by a check-sourced finding (the triage drops null-checkId completeness+ // / legacy findings). The health panel deep-links its breakdown rows to these+ // filters (#1606), so a row whose key isn't here (e.g. the synthetic+ // `completeness` check bucket, or a category present only on completeness+ // findings) would link to an empty list — gate the panel's clickability on these.+ const triageFilterableCheckIds = useMemo(+ () => new Set(comments.filter((c) => c?.checkId).map((c) => c.checkId)),+ [comments],+ );+ const triageFilterableCategories = useMemo(+ () => new Set(comments.filter((c) => c?.checkId).map((c) => normCategory(c))),+ [comments],+ );// Config saves read server settings, so a run that fires before a save lands// would use stale config — gate the run buttons while any save is in flight.const anySaving = savingIds.size > 0;@@ -570,7 +584,7 @@ export default function PipelineEditorialChecks() {<p className="rounded-lg border border-dashed border-port-border p-4 text-center text-xs text-gray-500">Select a series to view its findings.</p>) : (<>- <EditorialHealthPanel seriesId={seriesId} refreshKey={healthRefresh} checksById={checksById} />+ <EditorialHealthPanel seriesId={seriesId} refreshKey={healthRefresh} checksById={checksById} filterableCheckIds={triageFilterableCheckIds} filterableCategories={triageFilterableCategories} />{loadingFindings ? (<p className="flex items-center gap-2 text-sm text-gray-400"><Loader2 size={16} className="animate-spin" /> Loading findings…</p>) : (