Skip to content

feat(secrets): add navigation to secrets from reference tree#5564

Merged
IgorHorta merged 2 commits intomainfrom
igor/secrets-131-add-support-for-navigating-to-secret-references-in-reference
Mar 3, 2026
Merged

feat(secrets): add navigation to secrets from reference tree#5564
IgorHorta merged 2 commits intomainfrom
igor/secrets-131-add-support-for-navigating-to-secret-references-in-reference

Conversation

@IgorHorta
Copy link
Contributor

@IgorHorta IgorHorta commented Mar 2, 2026

Context

Secrets in the reference tree and dependency tree had no way to navigate to them. Clicking a non-root secret now navigates to that secret's dashboard page with the key pre-filled in the search filter. The modal and sidebar auto-close on navigation.

Screenshots

Steps to verify the change

  1. Open a secret whose value contains ${env.path.KEY} syntax and open its reference details
  2. In the Reference Tree, click a non-root secret key — modal and sidebar close, navigates to that secret's page with the correct env, path, and search filter
  3. In the Dependency Tree, click a non-root node card — same behaviour
  4. Confirm the root node is not clickable in either view

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

Clicking any non-root secret in the Reference Tree or Dependency Tree
now navigates to that secret's dashboard page, pre-filtered by key via
the search query param. The modal and sidebar auto-close on navigation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@linear
Copy link

linear bot commented Mar 2, 2026

@maidul98
Copy link
Collaborator

maidul98 commented Mar 2, 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 Mar 2, 2026

Greptile Summary

Adds click-through navigation from the Reference Tree and Dependency Tree modals to referenced secrets. When users click a non-root secret, the modal closes and navigates to that secret's dashboard page with pre-filled search filters.

  • Extracted SecretReferenceCloseContext into a separate file to avoid circular imports between components
  • Extended TreeNodeData with environment, secretPath, and secretKey fields for navigation
  • Made tree items and dependency nodes clickable with proper hover states and keyboard accessibility
  • Converted one modal from uncontrolled to controlled state for proper close handling
  • Navigation uses API-provided data (environment, path, key), which is safe from manipulation

The implementation is clean and follows React best practices. Only minor style suggestion regarding inline event handler extraction.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Frontend-only UX enhancement with clean implementation. Navigation uses API-validated data, no security concerns. Includes proper keyboard accessibility. Only minor style suggestion for code clarity.
  • No files require special attention

Important Files Changed

Filename Overview
frontend/src/components/secrets/SecretReferenceDetails/SecretReferenceDetails.tsx Added navigation logic and made tree items clickable - well implemented with proper callbacks
frontend/src/components/secrets/SecretReferenceDetails/nodes/SecretNode.tsx Added navigation and keyboard support to dependency tree nodes - inline event handler could be extracted
frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewTableRow/SecretEditRow.tsx Converted to controlled modal and passes onClose handler - clean refactor

Last reviewed commit: f438404

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.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

varonix0
varonix0 previously approved these changes Mar 3, 2026
Copy link
Member

@varonix0 varonix0 left a comment

Choose a reason for hiding this comment

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

approved with nit!

@IgorHorta IgorHorta merged commit 4c1e917 into main Mar 3, 2026
7 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