github-actions[bot]
published Aug 30, 2026, 2:14 AM · updated Aug 30, 2026, 2:29 AM
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:565andpages/dashboard/src/presenter.js:571previously pairedrenderViewHeader(sourceName, metadata)withrenderContextList(contextDetails)insiderenderMetricView(...).pages/dashboard/src/presenter.js:594andpages/dashboard/src/presenter.js:616previously paired the same header/context construction insiderenderTableView(...).pages/dashboard/src/presenter.js:643andpages/dashboard/src/presenter.js:673previously paired the same header/context construction insiderenderChartView(...).
Call sites collapsed
pages/dashboard/src/presenter.js—renderMetricView(...)pages/dashboard/src/presenter.js—renderTableView(...)pages/dashboard/src/presenter.js—renderChartView(...)
Tests added
pages/dashboard/test/unit/view-chrome.test.jsDLS-VIEW-013coverage for populated and emptyrenderContextChrome(...)DLS-VIEW-013coverage for composedrenderViewSectionChrome(...)
Behavior preservation evidence
- Full dashboard gate stack remains green from
pages/dashboard/:npm install✅npm run typecheck✅npm run lint✅npm test✅npx playwright test --config=playwright.config.mjs✅
- Rendered behavior was compared structurally via the captured refactor diff at
/tmp/gh-aw/agent/view-section-chrome-refactor.diff, confirming the affected presenter changes are limited to replacing repeated custom-view chrome assembly with shared helpers while preserving DOM text, class names, and accessible labels.
Blockers
- None.
Next candidates
- Extract the repeated custom-view state-message plus context composition in
src/presenter.js. - Extract shared pure helpers for metric/chart aggregate value formatting in
src/presenter.js. - Extract shared link-cell composition across custom metric and custom table views.
Generated by ♻️ Daily Dashboard Component Refactorer · pi · gpt54 · 36 AIC · ⌖ 7.2 AIC · ⊞ 5.4K · ◷