Skip to content

fix: enable URL sharing for secret approval change requests#5246

Merged
varonix0 merged 1 commit intomainfrom
devin/1769130717-fix-secret-approvals-url-sharing
Jan 23, 2026
Merged

fix: enable URL sharing for secret approval change requests#5246
varonix0 merged 1 commit intomainfrom
devin/1769130717-fix-secret-approvals-url-sharing

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 23, 2026

Context

Users cannot share direct links to specific change requests in the Secret Approvals page. When clicking on a change request from the table, the detail view appears but the URL doesn't update with the request ID, making it impossible to share links to specific change requests.

This PR replaces local React state (selectedApprovalId) with URL query parameters (requestId) for tracking the selected change request. Now when users click on a change request, the URL updates to include ?requestId=<request-id>, enabling URL sharing.

Linear ticket: ENG-4455

Link to Devin run: https://app.devin.ai/sessions/83446ea2d50643e1b1aea2431581aaf7

Requested by: Vlad Matsiiako (@vmatsiiako)

Steps to verify the change

  1. Navigate to the Secret Approvals page
  2. Click on a change request from the table
  3. Verify the URL updates to include ?requestId=<request-id>
  4. Copy the URL and open it in a new tab/browser
  5. Verify the change request detail view loads directly
  6. Click the back button and verify it returns to the list view with the query param cleared

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

Open with Devin

- Replace local state (selectedApprovalId) with URL query parameter (requestId)
- Add useNavigate hook to update URL when clicking change requests
- Update click handlers to use navigate({ search: { requestId } })
- Update back navigation to clear query param via navigate
- Use requestId from URL for conditional rendering and component props

This allows users to share direct links to specific change requests.

ENG-4455

Co-Authored-By: Vlad Matsiiako <vm265@cornell.edu>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@maidul98
Copy link
Collaborator

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.

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional flags.

Open in Devin Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 23, 2026

Greptile Overview

Greptile Summary

This PR successfully implements URL-based state management for secret approval change requests, replacing local React state with URL query parameters. When users click on a change request, the URL now updates to include ?requestId=<request-id>, enabling direct link sharing. The implementation properly integrates with TanStack Router's useNavigate and useSearch hooks, and the API hook correctly handles empty/undefined requestId values by disabling the query. One minor improvement would be using undefined instead of an empty string when clearing the query parameter to fully remove it from the URL.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - clean refactoring with no security issues
  • The change is a straightforward refactoring that replaces local state with URL query parameters. The implementation correctly uses TanStack Router APIs, properly handles keyboard navigation, and the backend API hook safely handles empty/undefined IDs. The only minor issue is using an empty string instead of undefined to clear the query parameter, which is a cosmetic concern.
  • No files require special attention

Important Files Changed

Filename Overview
frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx Replaced local state with URL query params for change request selection; enables URL sharing but has a minor issue with query param clearing

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.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@varonix0 varonix0 self-requested a review January 23, 2026 03:22
@varonix0 varonix0 merged commit 8b6a676 into main Jan 23, 2026
9 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.

2 participants