github-actions[bot]
published Aug 30, 2026, 1:47 AM · updated Aug 30, 2026, 1:55 AM
Summary
- extract reusable custom-view paragraph chrome into
renderViewChrome(lines)inpages/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.mdwith the bounded refactor and remaining queue
Duplication evidence
pages/dashboard/src/components/view-chrome.js:76previously 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 sites collapsed
pages/dashboard/src/components/view-chrome.js:76source paragraph inrenderViewHeader(...)pages/dashboard/src/components/view-chrome.js:77metadata paragraph inrenderViewHeader(...)
Tests added
pages/dashboard/test/unit/view-chrome.test.jsadds coverage for populated and emptyrenderViewChrome(...)inputs while preserving existingrenderViewHeader(...)assertions
Behavior preservation evidence
renderViewHeader(...)now composesrenderViewChrome(...), preserving the same.view-sourcefirst paragraph and.view-metadatasubsequent paragraphs with identical text- captured the bounded refactor diff at
/tmp/gh-aw/agent/view-chrome-refactor.diff
Gates run
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 && npx playwright test --config=playwright.config.mjs✅
Blockers
- none
Next candidates
- extract the repeated custom-view section composition shared by metric, table, and chart renderers in
src/presenter.js - extract shared pure helpers for chart/table row text formatting and link-column composition
- extract the repeated state-message plus context composition in unavailable and empty custom views
Generated by ♻️ Daily Dashboard Component Refactorer · pi · gpt54 · 19.1 AIC · ⌖ 7.25 AIC · ⊞ 5.4K · ◷