github-actions[bot]
published Aug 29, 2026, 7:50 PM · updated Aug 29, 2026, 8:33 PM
Summary
- extract reusable
renderContextList(details)intopages/dashboard/src/components/view-chrome.js - replace every repeated custom-view
.view-contextlist assembly inpages/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:1238repeated.view-contextlist construction inrenderCustomViewStatepages/dashboard/src/presenter.js:1296repeated.view-contextlist construction inrenderMetricViewpages/dashboard/src/presenter.js:1341repeated.view-contextlist construction inrenderTableViewpages/dashboard/src/presenter.js:1397repeated.view-contextlist construction inrenderChartView
Call sites collapsed
renderCustomViewState(...)renderMetricView(...)renderTableView(...)renderChartView(...)
Tests added
pages/dashboard/test/unit/view-chrome.test.jsDLS-VIEW-013populated custom-view context list renderingDLS-VIEW-013empty custom-view context list rendering
Behavior preservation proof
- Full existing test suite remains green unchanged.
- Captured the bounded refactor diff at
/tmp/gh-aw/agent/context-list-refactor.diff. - Rendered the existing custom-views presenter fixture after the refactor to
/tmp/gh-aw/agent/custom-page-after.html, confirming the same custom metric, table, chart, empty, and unavailable view text is still emitted. - No DOM text, class names, accessible labels, or fallback messages were changed; only repeated
.view-contextassembly moved behind the shared helper.
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 summary-section composition for count lists
- extract the next shared pure helpers around subject/provenance/count formatting in
pages/dashboard/src/presenter.js - extract repeated built-in definitions/observations dual-region composition in
pages/dashboard/src/presenter.js
Generated by ♻️ Daily Dashboard Component Refactorer · pi · gpt54 · 35.2 AIC · ⌖ 7.82 AIC · ⊞ 5.4K · ◷