Skip to content

[dashboard-components] Extract shared report list renderer - #387

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
refactor/report-list-component-d27287cc0748aaba
Open

[dashboard-components] Extract shared report list renderer#387
github-actions[bot] wants to merge 1 commit into
mainfrom
refactor/report-list-component-d27287cc0748aaba

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

  • extract pages/dashboard/src/components/report-list.js to share durable-report rendering between package and workflow detail views
  • replace the duplicated report filtering, summary counting, row rendering, and empty-state handling in pages/dashboard/src/components/package-detail.js and pages/dashboard/src/components/workflow-detail.js
  • add focused unit coverage in pages/dashboard/test/unit/report-list.test.js and update pages/dashboard/PLAN.md

Duplication evidence

  • pages/dashboard/src/components/package-detail.js previously owned package-report filtering, summary counting, card-row rendering, and empty/no-match states.
  • pages/dashboard/src/components/workflow-detail.js previously owned the same durable-report concerns in a table-shaped variant.
  • Both call sites now compose the shared renderer with container-specific wrappers only.

Call sites collapsed

  • pages/dashboard/src/components/package-detail.js → package reports
  • pages/dashboard/src/components/workflow-detail.js → workflow reports

Tests added

  • pages/dashboard/test/unit/report-list.test.js
    • package-card rendering and summary counts
    • workflow-table rendering
    • filter no-match behavior
    • empty/unavailable fallback coverage
    • external-link fallback when no safe-output id exists

Quality gates

  • npm install
  • npm run typecheck
  • npm run lint
  • npm test
  • node ./scripts/build.mjs

Behavior preservation proof

  • Existing assertions in pages/dashboard/test/unit/package-detail.test.js and pages/dashboard/test/unit/workflow-detail.test.js remained in place and passed unchanged after both views switched to the shared renderer.
  • The affected package-report card view still preserves hidden-row filtering behavior, DOM text, class names, links, and badge semantics.
  • The affected workflow-report table view still preserves DOM text, class names, links, summary counts, and empty messages.

Blockers

  • Browser snapshot comparison was not completed in-session because Playwright browser tools were not exposed here; this run relied on the existing affected-page unit assertions for rendered-output preservation.

Next candidates

  • shared tablist controller across pages/dashboard/src/components/packages-view.js and pages/dashboard/src/components/package-detail.js
  • shared report/repository navigation tabs across pages/dashboard/src/components/package-detail.js, pages/dashboard/src/components/workflow-detail.js, and pages/dashboard/src/components/repository-workflows.js
  • shared static table-section wrapper across pages/dashboard/src/components/packages-view.js, pages/dashboard/src/components/repository-workflows.js, and pages/dashboard/src/components/ui-elements.js

Generated by ♻️ Daily Dashboard Component Refactorer · pi · gpt54 · 93.4 AIC · ⌖ 9.1 AIC · ⊞ 6.2K ·

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot fix https://github.com/githubnext/central-agentic-ops/actions/runs/33451647140/job/99682988345#step:6:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant