Skip to content

feat: lock CR UI once any reviewer has approved (#7056)#7255

Merged
gagantrivedi merged 2 commits intomainfrom
fix/7056-lock-approved-cr-ui
Apr 17, 2026
Merged

feat: lock CR UI once any reviewer has approved (#7056)#7255
gagantrivedi merged 2 commits intomainfrom
fix/7056-lock-approved-cr-ui

Conversation

@gagantrivedi
Copy link
Copy Markdown
Member

@gagantrivedi gagantrivedi commented Apr 16, 2026

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #7056

Once any reviewer has approved a Change Request, the UI locks down:

  • Edit button hidden
  • InfoMessage banner shown to the author: "This change request has been approved and can no longer be edited."
  • Assigned users/groups chips become read-only (no close icon, no removal onClick), the add SettingsButton and UserSelect/MyGroupsSelect are hidden

All changes are in ChangeRequestPageInner which is shared by both env-scoped and project-scoped CR detail pages.

How did you test this code?

Ran npm run typecheck — zero new TypeScript errors (all pre-existing). Manual browser testing confirms that edit is no longer available once a change request is approved and the note is showing up correctly

Hide the Edit button, show an InfoMessage banner, and make the
assigned-users/groups sections read-only when the CR has at least
one approval.

Depends on flagsmith-workflows#111 for the backend guard.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Apr 16, 2026 7:08am
flagsmith-frontend-preview Ignored Ignored Preview Apr 16, 2026 7:08am
flagsmith-frontend-staging Ignored Ignored Preview Apr 16, 2026 7:08am

Request Review

Picks up the ApprovedChangeRequestLockMixin guard from
flagsmith-workflows#111.
@github-actions github-actions bot added api Issue related to the REST API feature New feature or request and removed feature New feature or request labels Apr 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.36%. Comparing base (d7fbcb2) to head (a85085e).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7255      +/-   ##
==========================================
+ Coverage   98.29%   98.36%   +0.06%     
==========================================
  Files        1351     1351              
  Lines       50779    50779              
==========================================
+ Hits        49912    49947      +35     
+ Misses        867      832      -35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gagantrivedi gagantrivedi marked this pull request as ready for review April 16, 2026 07:25
@gagantrivedi gagantrivedi requested review from a team as code owners April 16, 2026 07:25
@gagantrivedi gagantrivedi requested review from emyller and kyle-ssg and removed request for a team April 16, 2026 07:25
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-7255 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-7255 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7255 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7255 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7255 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7255 Finished ✅ Results

@gagantrivedi gagantrivedi requested review from Zaimwa9 and removed request for kyle-ssg April 16, 2026 07:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  44.9 seconds
commit  a85085e
info  🔄 Run: #16086 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  52.9 seconds
commit  a85085e
info  🔄 Run: #16086 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  a85085e
info  🔄 Run: #16086 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  51.7 seconds
commit  a85085e
info  🔄 Run: #16086 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

Visual Regression

16 screenshots compared. See report for details.
View full report

Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

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

Approving with a minor NIT leaving it on you. Anyways this file is bloated and will need to be broken down at some point

@gagantrivedi
Copy link
Copy Markdown
Member Author

Approving with a minor NIT leaving it on you. Anyways this file is bloated and will need to be broken down at some point

I can't see your nit comment?

Comment thread frontend/web/components/pages/ChangeRequestDetailPage.tsx
@gagantrivedi gagantrivedi merged commit 81d1686 into main Apr 17, 2026
60 checks passed
@gagantrivedi gagantrivedi deleted the fix/7056-lock-approved-cr-ui branch April 17, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants