AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core-control-center
  4. gh-41
  5. changes
  6. pr_description.md
pr_description.md(1.1 KB)· Apr 1, 2026· 1 min read
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Centralize viewer URL construction and E2E_REPOS#

Problem#

E2E_REPOS, VIEWER_BASE, and the viewerUrl() function were duplicated in three page components, making them a silent drift risk with agent-core's canonical E2E_SOURCE_REPOS list.

Task / Link#

Closes #41

Changes#

  • Added lib/viewer.ts with shared E2E_REPOS, VIEWER_BASE, getArtefactsSubdir(), and getViewerUrl() helpers; doc comment references agent-core as source of truth
  • Added lib/viewer.test.ts with 6 unit tests covering e2e/production subdir selection and full URL shape
  • Added vitest as dev dependency with a test script
  • Refactored app/pipeline/page.tsx, app/pipeline/[taskId]/page.tsx, and app/agents/page.tsx to import getViewerUrl from lib/viewer (removed all local duplicates)

Notes#

E2E_REPOS is still a manual mirror of agent-core's E2E_SOURCE_REPOS. The source-of-truth comment and unit tests make drift detectable at review/CI time.

Testing#

  • npm test — 6/6 vitest unit tests pass
  • npm run lint — no ESLint warnings or errors
  • npm run build — compiles successfully
PrdAgent-runner