Skip to content

feat: Distinguish empty-state messages in PullRequestsTab#212

Merged
Jagadeeshftw merged 2 commits into
Grainlify:mainfrom
ObaHacker:empty_state_messages
Jun 23, 2026
Merged

feat: Distinguish empty-state messages in PullRequestsTab#212
Jagadeeshftw merged 2 commits into
Grainlify:mainfrom
ObaHacker:empty_state_messages

Conversation

@ObaHacker

Copy link
Copy Markdown
Contributor

Summary

Implemented the empty-state split in the Pull Requests tab and added comprehensive test coverage for each state.


Changes

src/features/maintainers/components/pull-requests/PullRequestsTab.tsx

  • Added explicit empty-state branching for:
    • No repositories selected.
    • Selected repositories with no pull requests.
    • Filters/search returning no matches.
  • Marked empty-state messaging as an announced status region using role="status".
  • Kept Clear filters available in the no-matches state.
  • Added TSDoc documentation around the empty-state decision logic.
  • Tightened React hook dependency handling.

src/features/maintainers/components/pull-requests/PullRequestsTab.test.tsx

  • Added test coverage for:
    • No repositories selected state.
    • No pull requests state.
    • No matching results state.
    • Filtered-empty-to-results transition.

vite.config.ts

  • Updated configuration to support the new test coverage requirements.

vitest.config.ts

  • Updated Vitest configuration.

Verification

Passed

  • npx eslint src/features/maintainers/components/pull-requests/PullRequestsTab.tsx src/features/maintainers/components/pull-requests/PullRequestsTab.test.tsx
  • git diff --check

Known Issues

  • npm run typecheck

Type checking is currently failing due to unrelated pre-existing issues in:

  • src/shared/components/SearchModal.tsx
  • src/shared/utils/focusTrap.ts

Test Execution

  • Full Vitest run

Unable to complete an end-to-end Vitest run in the current environment because the config loader fails while resolving vitest.config.ts with:

Cannot read directory "../..": Access is denied

Security Impact

  • Presentation-only change.
  • No authentication logic modified.
  • No persistence layer changes.
  • No data validation changes.
  • No new security surface introduced.

closes #81

@Jagadeeshftw Jagadeeshftw merged commit 1fabba1 into Grainlify:main Jun 23, 2026
@Jagadeeshftw

Copy link
Copy Markdown
Contributor

distinguishing the empty-state messages in the pull requests tab is a nice ux detail, much clearer than a single generic message. rebased on latest main, merged. thanks!

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.

Distinguish empty-state messages in PullRequestsTab (no repos vs no PRs vs no filter matches)

3 participants