Skip to content

improvement: revamp change request ui#7039

Merged
scott-ray-wilson merged 5 commits into
mainfrom
PLATFOR-489
Jun 29, 2026
Merged

improvement: revamp change request ui#7039
scott-ray-wilson merged 5 commits into
mainfrom
PLATFOR-489

Conversation

@scott-ray-wilson

@scott-ray-wilson scott-ray-wilson commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Context

This PR revamps the change request UI and makes various UI/UX improvements.

Also combines the user and group by pass selects into a single one

Screenshots

CleanShot 2026-06-25 at 15 55 05@2x CleanShot 2026-06-25 at 15 55 03@2x

Steps to verify the change

  • List renders in v3 (search, environment + type filters, pagination)
  • Loading skeleton + empty states display correctly
  • Create various change requests (long, add, edit, delete, replication, etc.)
  • approval flow (many reviews, single approve, bypass, merge, etc.)
  • test policy bypass combined user + group select change

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)
  • Updated CLAUDE.md files (if needed)
  • Read the contributing guide

@linear

linear Bot commented Jun 25, 2026

Copy link
Copy Markdown

PLATFOR-489

@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-infisical-7039-improvement-revamp-change-request-ui

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR revamps the change request (secret approval) UI — replacing the full-page detail view with a table + Sheet panel, switching to v3 components throughout, and combining the user/group bypasser selects into one. It also adds bypassReason persistence and audit-log enrichment for both secret and access approval bypass flows.

  • The list view is now a proper table with skeleton loading rows, environment/author filter popovers, a 30-second polling interval, and a tab-pinning fix that prevents the active tab from flipping when a request is closed.
  • bypassReason is persisted to the DB for both secret and access approval bypass merges, surfaced in the UI as a warning banner, and included in the audit log metadata.
  • The combined bypasser select in AccessPolicyModal uses a splitSelectedBypassers helper to fan results back into separate userBypassers/groupBypassers form fields; PolicyMemberOption is deleted in favour of the shared ApproverOption.

Confidence Score: 4/5

Safe to merge after fixing the bypass-reason validation gap in the secret approval merge route.

The access-approval review route correctly enforces a 10-character minimum on bypassReason, but the secret-approval merge route only enforces a maximum. A direct API call with an empty or one-character reason would succeed and be stored as null, silently erasing the bypass audit trail that this PR is specifically designed to capture. Everything else — the migration, the service logic, the frontend rendering, and the tab-pinning fix — looks correct.

backend/src/ee/routes/v1/secret-approval-request-router.ts — the bypassReason schema on the merge endpoint needs .min(10) added to match the access-approval route.

Important Files Changed

Filename Overview
backend/src/db/migrations/20260626214559_add-bypass-reason-access-approval-requests.ts Adds nullable bypassReason text column to access_approval_requests; uses hasColumn guard for idempotency. Safe migration.
backend/src/ee/routes/v1/secret-approval-request-router.ts Adds isMergedViaBypass and bypassReason to the merge audit log. The merge route's bypassReason schema is missing .min(10), unlike the corresponding access-approval route.
backend/src/ee/routes/v1/access-approval-request-router.ts Adds isBypass and bypassReason to the review audit log metadata; correctly validates bypassReason with .min(10).max(1000).
backend/src/ee/services/access-approval-request/access-approval-request-service.ts Persists bypassReason only when isBreakGlassApprovalAttempt is true; returns isBypass flag to caller for audit logging. Logic is correct.
backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts Computes isMergedViaBypass before both v1/v2 bridge code paths and persists bypassReason in both; returns the flag to the router for audit logging.
frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx Major revamp: switches from full-page navigation to a table + Sheet panel; adds FilterMenu popover for environment/author filters, skeleton loading rows, and pinned tab logic.
frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx Converted from a full-page view to a Sheet/panel; uses v3 components throughout; isBypasser is now computed correctly from policy data and passed without the old === undefined ? true fallback.
frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx Refactored to v3 components; renames internal state to bypassReasonInput to avoid shadowing the incoming bypassReason prop; adds bypass banner showing the stored reason after merge.
frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx Merges the separate user/group bypasser selects into one combined select using splitSelectedBypassers; removes menuPlacement="top" overrides throughout.
frontend/src/pages/secret-manager/SecretApprovalsPage/SecretApprovalsPage.tsx Adds a useEffect to pin the default tab into the URL once counts load, preventing the active tab from flipping when a request is closed.

Reviews (2): Last reviewed commit: "improvement: surface bypass reasons on a..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eae5fd8558

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Persist and surface the reason given when an approval is bypassed
(break-glass), and fix stale tab/count state on the approvals page
(PLATFOR-489).

Bypass reasons:
- Store the bypass reason when an access request is approved or a change
  request is merged without the required approvals, and include it in the
  audit log for both flows
- Add the access_approval_requests.bypassReason column
- Show a "Bypassed" badge and a warning banner with the reason in the
  review modal, change request action, and changes sheet

Approvals page (PLATFOR-489):
- Pin the default tab into the URL so closing a request no longer flips
  the visible tab as counts change
- Refetch request lists and counts on the open/closed toggle, poll the
  list every 30s, and invalidate them when policies change

Change request UI:
- Move the review form into a "Review Changes" / "Update Review" popover
- Make the changes-sheet alert reflect pending / merged / closed state
- Use an info toast when changes are sent for review

Docs: combine the user/group approver bullets and refresh screenshots
@mintlify

mintlify Bot commented Jun 27, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
infisical 🟢 Ready View Preview Jun 27, 2026, 12:49 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@scott-ray-wilson

Copy link
Copy Markdown
Contributor Author

@greptile review

@scott-ray-wilson

Copy link
Copy Markdown
Contributor Author

@codex review

@scott-ray-wilson

Copy link
Copy Markdown
Contributor Author

@Veria review

@scott-ray-wilson

Copy link
Copy Markdown
Contributor Author

@veria-ai review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edc48be669

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
scott-ray-wilson and others added 2 commits June 29, 2026 14:51
…ests

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scott-ray-wilson scott-ray-wilson merged commit efbf6b9 into main Jun 29, 2026
18 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