Skip to content

Conversation

akhilmhdh
Copy link
Member

Description 📣

Resolved failing to list cert in ui. We were passing project slug in place of id

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@akhilmhdh akhilmhdh requested a review from maidul98 September 22, 2025 15:59
@maidul98
Copy link
Collaborator

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@akhilmhdh akhilmhdh merged commit d946595 into main Sep 22, 2025
7 checks passed
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR fixes a critical bug in the certificate management UI where the certificates table was failing to load due to an incorrect parameter being passed to the API. The issue was in the CertificatesTable component, which was passing currentProject?.slug instead of currentProject?.id to the useListWorkspaceCertificates hook.

The useListWorkspaceCertificates hook expects a project ID parameter to fetch certificates for a specific workspace/project, but the component was incorrectly providing the project slug. This mismatch would cause the API call to either fail entirely or return no data, preventing users from viewing their certificates in the UI.

The fix is straightforward - changing line 67 from projectId: currentProject?.slug ?? "" to projectId: currentProject?.id ?? "". This aligns the frontend component with the expected API contract and ensures the correct identifier is passed to retrieve certificates. The change maintains all existing functionality while resolving the data loading issue.

Confidence score: 5/5

  • This PR is extremely safe to merge with no risk of breaking functionality
  • Score reflects a simple, well-targeted bug fix that addresses a clear parameter type mismatch
  • No files require special attention as this is a single-line change with obvious intent

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

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.

2 participants