Skip to content

fix(frontend): remove secret ID being set as secret comment#5375

Merged
scott-ray-wilson merged 1 commit intomainfrom
fix-secret-comment-bug
Feb 5, 2026
Merged

fix(frontend): remove secret ID being set as secret comment#5375
scott-ray-wilson merged 1 commit intomainfrom
fix-secret-comment-bug

Conversation

@scott-ray-wilson
Copy link
Contributor

Context

This PR fixes the overview page accidentally setting the secret comment to the secret ID due to incorrect parameter

Screenshots

N/A

Steps to verify the change

  • verify comment is not overwritten with secret ID when updating the value via the overview dashboard

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Read the contributing guide

@maidul98
Copy link
Collaborator

maidul98 commented Feb 5, 2026

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

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR fixes a bug where the secret comment was being incorrectly overwritten with the secret ID when updating a secret value via the overview dashboard.

Root Cause:
The handleSecretUpdate function in OverviewPage.tsx had an unused secretComment parameter that was being passed to updateSecretV3. Since this parameter wasn't being set when calling handleSecretUpdate, it would default to undefined or potentially receive the wrong value (secret ID), causing the comment to be overwritten.

Changes Made:

  • Removed the unused secretComment parameter from handleSecretUpdate function signature in OverviewPage.tsx:517-522
  • Removed secretComment from the updateSecretV3 API call in OverviewPage.tsx:533-540
  • Removed the comment parameter from the onSecretUpdate prop type in SecretEditTableRow.tsx:84-91

The fix correctly implements the guidance from custom instruction aaee2f92-bc4e-4567-a347-3f4f0314b498, which states: "When using parameters in API calls, ensure they are utilized effectively; if not, consider removing them."

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and correctly remove an unused parameter that was causing data corruption. The fix prevents the secret comment from being overwritten, and all changes are consistent across the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretEditTableRow.tsx Removed unused comment parameter from onSecretUpdate function signature
frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx Removed secretComment parameter from handleSecretUpdate function and its call to updateSecretV3

@scott-ray-wilson scott-ray-wilson merged commit e57a2a0 into main Feb 5, 2026
8 checks passed
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.

3 participants