[BUG]: governance page shows "No dead issues" before the audit has run

Open Beginner friendly
#453 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@SHIVIKA330 is already working on this.

Since Nov 22, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
83/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react
Domain
frontend

Research direction

Start in src/pages/GovernancePage.jsx and read how hasAudit is derived and used near the audit button and resolution-rate hint. Then inspect the Dead Issues and Zombie PRs tab empty states, which currently treat empty result lists as healthy. Done when the tabs show a neutral prompt before an audit and retain the green success state after an audit finds no results.

Written by the indexing model from the issue text.

Description

bug
Bug Description

On the Governance page, the Dead Issues and Zombie PRs tabs show a green "all good" empty state ("No dead issues found - This org actively maintains its open items.") before the audit has been run.

At that point no issue data has been fetched yet, so the page has nothing to judge the org by. The green message looks like a real health result, but it isn't one. After clicking Run Audit, the same org (for example, AOSSIE-Org) shows ~80 dead issues.

A user who opens the page and doesn't click Run Audit comes away thinking the org is healthy.

Steps to Reproduce
  1. Explore an org, for example AOSSIE-Org.
  2. Open the Governance page.
  3. Look at the Dead Issues tab: it shows a green 0 and "No dead issues found / This org actively maintains its open items."
  4. Switch to the Zombie PRs tab: it shows "No zombie PRs found / This org reviews and closes contributions actively."
  5. Click Run Audit.
  6. The same tabs now show the real numbers (~80 dead issues for AOSSIE-Org).
Logs and Screenshots

https://github.com/user-attachments/assets/743993c0-313f-45c1-a624-78c8ae4393bb

Expected behavior

Before the audit has run, the Dead Issues and Zombie PRs tabs should say that no data is available yet and ask the user to run the audit. They should not show a success message.

Actual behavior

The page shows a green success state and 0 counts, as if the audit had run and found nothing.

Root cause

src/pages/GovernancePage.jsx already tracks whether audit data exists:

// GovernancePage.jsx:119
const hasAudit = Object.keys(issuesData || {}).length > 0

The tab empty states don't check hasAudit. They only check whether the result list is empty, and before the audit the list is always empty:

// GovernancePage.jsx:426-428
{tab === 'dead' && (
  scopedDead.length === 0 ? (
    <EmptyOk msg="No dead issues found" sub="This org actively maintains its open items." />
  ) : ...
)}

// GovernancePage.jsx:445-447
{tab === 'zombie' && (
  scopedZombie.length === 0 ? (
    <EmptyOk msg="No zombie PRs found" sub="This org reviews and closes contributions actively." />
  ) : ...
)}

The page does use hasAudit in other places, for the "Run Audit / Re-run Audit" button label (:288) and the resolution-rate hint (:364). The tab content is the part that was missed.

Suggested fix

Add a "not audited yet" branch before the "empty = healthy" branch in both tabs:

{tab === 'dead' && (
  !hasAudit ? (
    <EmptyState msg="Audit not run yet" sub="Click Run Audit to scan this org for dead issues." />
  ) : scopedDead.length === 0 ? (
    <EmptyOk msg="No dead issues found" sub="This org actively maintains its open items." />
  ) : ...
)}

{tab === 'zombie' && (
  !hasAudit ? (
    <EmptyState msg="Audit not run yet" sub="Click Run Audit to scan this org for zombie PRs." />
  ) : scopedZombie.length === 0 ? (
    <EmptyOk msg="No zombie PRs found" sub="This org reviews and closes contributions actively." />
  ) : ...
)}

EmptyState can be a neutral variant of EmptyOk, with a muted color and no green check, so it doesn't look like a passing result.

Optional, same root cause: before the audit, the Dead Issues / Zombie PRs stat boxes and the tab badges show 0 in green, and Stale Issues Ratio shows 0.00%. Showing — when !hasAudit would keep these consistent with the tabs.

Files affected
  • src/pages/GovernancePage.jsx
Environment Details

No response

Impact

High - Major feature is broken

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Dominant language
JavaScript
Stars
53
Forks
187
Avg merge
18m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OrgExplorer

All issues in AOSSIE-Org/OrgExplorer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.