fix: enable URL sharing for secret approval change requests#5246
fix: enable URL sharing for secret approval change requests#5246
Conversation
- 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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis 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 Confidence Score: 4/5
Important Files Changed
|
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
?requestId=<request-id>Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).