Summary extract shared custom-view aggregate formatting into src/view-formatters.js replace the inline metric aggregate branch in src/presenter.js with the shared helper add focused unit coverage for aggregate and numeric formatter edge cases and update the browser harness import rewrites Duplication evidence pages/dashboard/src/presenter.js:527 previously inlined the full count / distinct-count / sum / mean / min / max aggregate formatting branch inside renderMetricView(...) pages/dashboard/src/presenter.js:636, pages/dashboard/src/presenter.js:683, and pages/dashboard/src/presenter.js:879 also reused the same numeric formatting helpers for chart point construction and text labels this r...
Summary Extract renderViewSectionChrome(...) and renderContextChrome(...) into pages/dashboard/src/components/view-chrome.js and reuse them across custom metric, table, and chart renderers. Duplication evidence pages/dashboard/src/presenter.js:565 and pages/dashboard/src/presenter.js:571 previously paired renderViewHeader(sourceName, metadata) with renderContextList(contextDetails) inside renderMetricView(...). pages/dashboard/src/presenter.js:594 and pages/dashboard/src/presenter.js:616 previously paired the same header/context construction inside renderTableView(...). pages/dashboard/src/presenter.js:643 and pages/dashboard/src/presenter.js:673 previously paired the same header/context ...
Summary extract reusable custom-view paragraph chrome into renderViewChrome(lines) in pages/dashboard/src/components/view-chrome.js rewire renderViewHeader(...) to compose the new helper without changing rendered text or class names add unit coverage and update pages/dashboard/PLAN.md with the bounded refactor and remaining queue Duplication evidence pages/dashboard/src/components/view-chrome.js:76 previously assembled the same paragraph DOM shape inline for the source line and metadata line, differing only by class selection and text content the repeated shape was the best remaining bounded extraction that fit in one run without changing page semantics or broadening component APIs Call s...
Summary extract a reusable renderSummaryList(...) helper into pages/dashboard/src/components/view-chrome.js replace the presenter-local summary list builder with the shared helper at every identified call site update PLAN.md component inventory and run log for the new extraction queue state Duplication evidence pages/dashboard/src/presenter.js:389, 399, 409, 561, 571, 623, 1127, 1137, 1148, 1160, 1171, 1181, and 1191 all built the same count-list <ul> shape through the presenter-local renderSummaryList(...) helper. That helper only wrapped shared summary-list DOM generation, making src/components/view-chrome.js the better reusable home for future built-in and custom page sections. Call si...
Summary extract a reusable renderSummaryRegion() helper into pages/dashboard/src/components/view-chrome.js replace repeated summary-section construction in pages/dashboard/src/presenter.js add focused unit coverage and update pages/dashboard/PLAN.md Duplication evidence pages/dashboard/src/presenter.js:443-445 repeated renderPageSection(pageId, title, [renderSummaryList(className, counts)]) for runs status, conclusion, and outcome counts pages/dashboard/src/presenter.js:590-591 repeated the same summary-section shape for findings severity and status counts pages/dashboard/src/presenter.js:1129-1130 repeated the same summary-section shape for overview rollout-mode and workflow-active summa...
Summary extract reusable renderContextList(details) into pages/dashboard/src/components/view-chrome.js replace every repeated custom-view .view-context list assembly in pages/dashboard/src/presenter.js add unit coverage for populated and empty context-list rendering and update pages/dashboard/PLAN.md Duplication evidence pages/dashboard/src/presenter.js:1238 repeated .view-context list construction in renderCustomViewState pages/dashboard/src/presenter.js:1296 repeated .view-context list construction in renderMetricView pages/dashboard/src/presenter.js:1341 repeated .view-context list construction in renderTableView pages/dashboard/src/presenter.js:1397 repeated .view-context list constru...
Summary Extracted reusable built-in titled-region composition into pages/dashboard/src/components/view-chrome.js. Replaced repeated heading-plus-content construction in pages/dashboard/src/presenter.js without changing rendered behavior. Updated the component inventory and run log in pages/dashboard/PLAN.md. Duplication evidence Repeated h('h3', ...) plus a single summary/list/table content block remained in pages/dashboard/src/presenter.js at these call sites before the refactor: renderBuiltInPage() provenance heading + renderProvenanceList() renderWorkflowsPage() workflow inventory heading + table region renderUsagePage() usage totals heading + summary list; usage observations heading +...
Summary extract src/components/view-chrome.js for repeated custom-view source, metadata, and effective-context chrome reuse the shared component in src/presenter.js across metric, table, chart, and custom-view state rendering while preserving existing DOM text and class names update test module URL rewriting and plan inventory/run log for the new component Duplication evidence pages/dashboard/src/presenter.js:1303 and nearby lines repeated .view-source, .view-metadata, and .view-context construction in renderMetricView pages/dashboard/src/presenter.js:1334 and nearby lines repeated the same chrome in renderTableView pages/dashboard/src/presenter.js:1388 and nearby lines repeated the same ...
Summary Extracted the remaining repeated built-in inventory table wrapper markup in pages/dashboard/src/presenter.js into the existing reusable renderTableRegion(...) component. Duplication evidence Repeated .table-region > table > thead > tr > th plus tbody empty-row construction remained at these call sites in pages/dashboard/src/presenter.js before this refactor: renderEnginesModelsPage renderOperationalValuePage renderOrganizationsPage renderRepositoriesPage renderExperimentsPage renderGradersPage renderEvalsPage Each site repeated the same table-region wrapper shape and differed only in table class name, header labels, empty-state message, column span, and row renderer. Call sites co...
Summary Extract src/components/table-region.js to reuse the repeated .table-region > table > thead/tbody construction in the dashboard presenter. Replace duplicated call sites in built-in runs, workflows, findings, and usage pages plus custom table and chart text-equivalent views. Add focused unit coverage for the extracted component and keep existing presenter/browser coverage green. Duplication evidence pages/dashboard/src/presenter.js:449 repeated .table-region table wrapper in renderRunsPage pages/dashboard/src/presenter.js:560 repeated .table-region table wrapper in renderWorkflowsPage pages/dashboard/src/presenter.js:622 repeated .table-region table wrapper in renderFindingsPage pag...