github-actions[bot]
published Aug 29, 2026, 7:17 PM · updated Aug 29, 2026, 7:21 PM
Summary
- extract
src/components/view-chrome.jsfor repeated custom-view source, metadata, and effective-context chrome - reuse the shared component in
src/presenter.jsacross 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:1303and nearby lines repeated.view-source,.view-metadata, and.view-contextconstruction inrenderMetricViewpages/dashboard/src/presenter.js:1334and nearby lines repeated the same chrome inrenderTableViewpages/dashboard/src/presenter.js:1388and nearby lines repeated the same chrome inrenderChartViewpages/dashboard/src/presenter.js:1249and nearby lines duplicated the source/context subset inrenderCustomViewState
Call sites collapsed
renderCustomViewStaterenderMetricViewrenderTableViewrenderChartView- shared provenance-adjacent wrapper usage in
renderBuiltInPage
Tests added or updated
- added unit coverage in
pages/dashboard/test/unit/presenter.test.jsfor shared view chrome rendering of source, metadata, context, and nested content - updated
pages/dashboard/test/e2e/smoke.spec.jsmodule URL rewriting so browser tests load the new component dependency
Behavior preservation proof
- compared the affected presenter diff and confirmed the refactor only replaces duplicated chrome construction with
renderViewChrome(...) - preserved existing DOM text, accessible names, class names, ordering, and table/chart bodies at every replaced call site
- verified browser-rendered affected pages still pass existing smoke coverage after the extraction
Quality gates
cd pages/dashboard && npm install✅cd pages/dashboard && npm run typecheck✅cd pages/dashboard && npm run lint✅cd pages/dashboard && npm test✅cd pages/dashboard && npm run test:e2e✅
Blockers
- none
Next candidates
- extract repeated built-in page provenance section rendering
- extract repeated built-in page section heading plus inventory-table composition
- extract repeated summary-list plus section wrappers still assembled inline in
src/presenter.js
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
mtalk.google.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "mtalk.google.com"See Network Configuration for more information.
Generated by ♻️ Daily Dashboard Component Refactorer · pi · gpt54 · 28.5 AIC · ⌖ 8.73 AIC · ⊞ 5.4K · ◷