Skip to content

test: cover stale issues governance regression - #356

Open
vianmangal wants to merge 1 commit into
AOSSIE-Org:mainfrom
vianmangal:codex/test-stale-issues-353
Open

vianmangal wants to merge 1 commit into
AOSSIE-Org:mainfrom
vianmangal:codex/test-stale-issues-353

Conversation

@vianmangal

@vianmangal vianmangal commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Addressed Issues:

Related to #353

The undefined paginatedStaleReposOfOrg call reported in #353 is already absent from current main following #262. This PR adds the missing regression coverage for the Stale Issues Ratio tab using the existing Vitest and React Testing Library setup.

The tests verify that:

  • Opening the tab after audit results arrive renders repository statistics and issue links without crashing.
  • Stale repository results paginate in groups of 10, with working Previous/Next controls and disabled boundary buttons.
  • Changing the organization resets pagination and scopes the displayed results, including organizations without stale repository data.
  • Searching resets pagination, handles no matches, and restores results when the search is cleared.

Screenshots/Recordings:

Not applicable: this PR adds automated tests only. The original crash recording is attached to #353.

Additional Notes:

The new test file is colocated with GovernancePage.jsx, following the existing SettingsPage.test.jsx and RequireAnalysis.test.jsx conventions. It mocks useApp to supply deterministic audit results and uses user interactions against the real page. No dependencies or application behavior change.

Validation

  • npm test -- --run: all 85 tests pass across 9 files, including the 4 new Governance tests.
  • npm run build: passes with the existing bundle-size warning.
  • Regression check: temporarily restoring the undefined-function call makes the audit-results test fail with ReferenceError: paginatedStaleReposOfOrg is not defined. The application file was restored unchanged before the final test/build runs.
  • The new file passes scoped JavaScript/JSX and React Hooks lint checks using the same temporary tooling used for feat: add repository creation timeline to overview dashboard #355, without changing repository dependencies.
  • git diff --check: passes.
  • As noted in feat: add repository creation timeline to overview dashboard #355, this checkout has no lint script. Its existing ESLint configuration targets TS/TSX and imports dependencies absent from package.json. The test follows the surrounding JavaScript/JSX source and test conventions.

AI disclosure

AI assistance was used to write the regression tests, inspect the existing fix and repository guidelines, run validation, and draft this PR.

Checklist

  • My code follows the project's code style and conventions.
  • I have made corresponding changes to the documentation (not applicable: regression tests only)
  • My changes generate no new warnings or errors (existing build warning noted above)
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there.
  • I have read the Contributing Guidelines

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: AOSSIE-Org/OrgExplorer/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: cd44495c-123a-4455-b464-26c4e552ef00
📥 Commits

Reviewing files that changed from the base of the PR and between 1521b91 and d1f5f44.

📒 Files selected for processing: 1
  • src/pages/GovernancePage.test.jsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added bug Something isn't working frontend Frontend changes javascript JavaScript/TypeScript changes tests Test changes size/M 51-200 lines changed first-time-contributor First time contributor and removed size/M 51-200 lines changed labels Oct 15, 2026
@vianmangal
vianmangal marked this pull request as ready for review October 15, 2026 17:02

This branch has not been deployed

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

Labels

bug Something isn't working first-time-contributor First time contributor frontend Frontend changes javascript JavaScript/TypeScript changes size/M 51-200 lines changed tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant