Skip to content

fix: handle an empty Scorecard catalog - #142

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-141-scorecard-empty-state
Nov 14, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-141-scorecard-empty-state

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Scorecard now shows a clear empty-catalog notice and a link to browse the catalog when there are no components, APIs or systems to score. It avoids rendering invalid averages and charts, while preserving populated results, unmatched filters, loading and catalog errors.

Part of #85. Closes #141. The parent epic remains open.

Verified locally through the repository tasks.

  • mise run install passed with existing peer dependency warnings.
  • mise run lint passed, including TypeScript and ESLint across all workspaces.
  • mise run test --runInBand --verbose passed with 55 tests in nine suites. One existing test and suite remain skipped. Jest emitted CSS parsing and React deprecation warnings.
  • BROWSER=none mise run dev compiled successfully and served the frontend on localhost:3000 and backend on localhost:7007.
  • mise run proof-browser -- open about:blank --browser=chrome, then mise run proof-browser -- goto http://localhost:3000/scorecard and Guest > Enter, rendered the real catalog with 22 scored entities.
  • mise run proof-browser -- resize 1440 1000 and mise run proof-browser -- screenshot --filename=.tmp/proof/issue-141-scorecard-populated.png --full-page captured the populated page.
  • mise run proof-browser -- route 'http://localhost:7007/api/catalog/entities?filter=kind%3Dcomponent&filter=kind%3Dapi&filter=kind%3Dsystem' --body='[]' --content-type=application/json, then mise run proof-browser -- reload, exercised the empty result through the running app. Only that catalog request was intercepted in the proof browser; the development catalog was preserved.
  • mise run proof-browser -- screenshot --filename=.tmp/proof/issue-141-scorecard-empty.png --full-page captured the changed surface. Both screenshots were visually inspected. Clicking Browse the catalog opened the catalog successfully.
  • proof-browser was a temporary local mise task wrapping the installed Playwright CLI. It was removed after capture. The commands used MISE_TRUSTED_CONFIG_PATHS for this worktree. This frontend-only slice does not require a Docker image build.

The five new component tests passed using the actual Scorecard and metrics components.

PASS app packages/app/src/components/scorecard/ScorecardPage.test.tsx
  ScorecardPage
    ✓ shows a catalog link instead of invalid metrics when the catalog is empty (89 ms)
    ✓ renders metrics and scorecards when catalog entities are available (154 ms)
    ✓ keeps catalog metrics when search filters have no matches (151 ms)
    ✓ waits for the catalog before showing an empty state (27 ms)
    ✓ reports catalog failures instead of showing an empty state (22 ms)
Test Suites: 1 skipped, 9 passed, 9 of 10 total
Tests:       1 skipped, 55 passed, 56 total

Browser capture succeeded. No capture method was blocked and no evidence fallback was needed. The proof images are committed and pinned to the reviewed commit.

The empty state uses the empty response described above.

Scorecard empty state with catalog link

The populated state uses the real local sample catalog.

Scorecard with populated metrics and entity scores

Scoring rules and filters are unchanged. Runtime logs still show a Signals websocket 404 and unavailable TechDocs search indexes, also recorded on earlier PRs. These did not block Scorecard rendering and remain follow-up work outside this slice.

Show a catalog link before rendering metrics when there are no entities to score. Cover empty, populated, filtered, loading and failure states.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy

Copy link
Copy Markdown
Contributor Author

Revalidated commit 961a9a6 in the next scheduled run. Rebase against origin/main was a no-op. No code changes were needed.

mise run install passed with existing peer dependency warnings. mise run lint passed. mise run test --runInBand --verbose passed with 55 tests in nine suites; one existing suite and test remain skipped. All five Scorecard tests passed, covering the empty catalog link, populated metrics, unmatched filters, loading and catalog errors. Existing Jest CSS parsing and React deprecation warnings remain.

Inspected both committed screenshots linked in the PR body. The prior browser capture succeeded and remains valid for this unchanged commit; no new capture was needed. Confirmed that CI run 43593597411 passed install, lint, test and Docker build on this exact commit. The dependency setup attempt initially overlapped an install and the early local checks failed on missing install state; a single completed install and fresh lint/test runs resolved that local setup error.

Ready to merge as the existing Scorecard slice. Part of #85; the parent stays open.

@johnnyhuy
johnnyhuy merged commit 399b14b into main Nov 14, 2026
5 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-141-scorecard-empty-state branch November 14, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle an empty Scorecard catalog without invalid metrics

1 participant