Skip to content

feat(Dependencies): Show a change request's dependency changes - #8716

Open
talissoncosta wants to merge 21 commits into
feat/flag-dependencies-change-requests-8450from
feat/flag-dependencies-cr-pending-8450
Open

talissoncosta wants to merge 21 commits into
feat/flag-dependencies-change-requests-8450from
feat/flag-dependencies-cr-pending-8450

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
  • 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 #8450

  • The change request page gets a Dependencies tab next to Value and Segment Overrides, listing the prerequisite changes it would publish.
  • Each change is a diff row (+ or −) with the live table's Status and Satisfies.
  • The tab only shows when the change request changes a prerequisite, and the diff opens on it when nothing else changes.
  • Dependency segments stay out of the Segment Overrides tab, so a dependency change isn't counted twice.
  • Not loaded where the API refuses it: once the change request is published, without feature versioning, or without permission to create change requests.

Behind flag_dependencies and flag_dependencies_change_requests, the same flags as the feature's Dependencies tab.

The pending section in the feature's Dependencies tab is in #8783.

How did you test this code?

Unit tests for diffDependencies. Locally against #8720 with change requests on: staged two prerequisites, opened the change request and checked the Dependencies tab lists both. Removed a dependency alongside a segment override edit and checked each tab counts one change.

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Oct 20, 2026 9:21am UTC
flagsmith-frontend-staging Ready Ready Preview Oct 20, 2026 9:21am UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 20, 2026 9:21am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The change-request diff now loads dependency changes and feature states, then passes the data to DiffFeature. Dependency-managed segments are excluded when dependency data is available. A Dependencies tab shows staged additions and removals, or an error banner. A utility compares live and scoped dependencies, with additions returned before removals. Supporting types, tests, styles, exports, and comments were updated.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 5b24a

Change-request dependency diffs are currently unavailable, and a recovered load can leave the diff page blank. These issues should be fixed before merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard feature New feature or request labels Oct 9, 2026
@talissoncosta
talissoncosta force-pushed the feat/flag-dependencies-cr-pending-8450 branch from 1402ba9 to e951f1a Compare October 9, 2026 19:53
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 9, 2026
@talissoncosta
talissoncosta force-pushed the feat/flag-dependencies-cr-pending-8450 branch from e951f1a to 007b815 Compare October 9, 2026 20:04
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 9, 2026
@talissoncosta
talissoncosta force-pushed the feat/flag-dependencies-cr-pending-8450 branch from 007b815 to 031d0af Compare October 9, 2026 20:58
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 9, 2026
@talissoncosta
talissoncosta force-pushed the feat/flag-dependencies-cr-pending-8450 branch from 031d0af to f0b6c71 Compare October 12, 2026 13:20
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 12, 2026
@talissoncosta
talissoncosta force-pushed the feat/flag-dependencies-cr-pending-8450 branch from c04bb33 to 1a87b8a Compare October 12, 2026 17:46
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 12, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
❌ private-cloud · depot-ubuntu-latest-16 — run #22590 (attempt 1)

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

failed  2 failed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  5b24a2d
info  📦 Artifacts: View test results and HTML report
🔄 Run: #22590 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #22590 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  47.1 seconds
commit  5b24a2d
info  🔄 Run: #22590 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #22590 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.3 seconds
commit  5b24a2d
info  🔄 Run: #22590 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #22590 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.7 seconds
commit  5b24a2d
info  🔄 Run: #22590 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #22557 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  37.9 seconds
commit  be86475
info  🔄 Run: #22557 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #22556 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  36.8 seconds
commit  be86475
info  🔄 Run: #22556 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #22557 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  33.7 seconds
commit  be86475
info  🔄 Run: #22557 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #22556 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  49.1 seconds
commit  be86475
info  🔄 Run: #22556 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #22557 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.8 seconds
commit  be86475
info  🔄 Run: #22557 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #22556 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.4 seconds
commit  be86475
info  🔄 Run: #22556 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #22556 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.2 seconds
commit  be86475
info  🔄 Run: #22556 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #22557 (attempt 1)

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

passed  21 passed
skipped  1 skipped

Details

stats  22 tests across 14 suites
duration  1 minute, 9 seconds
commit  be86475
info  🔄 Run: #22557 (attempt 1)

Skipped tests

firefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e9bf0141-3342-4292-b5e5-847cb8b6837b
📥 Commits

Reviewing files that changed from the base of the PR and between d148010 and d7ae5c5.

📒 Files selected for processing: 10
  • frontend/common/hooks/useFeatureStates.ts
  • frontend/common/types/responses.ts
  • frontend/common/utils/__tests__/diffDependencies.test.ts
  • frontend/common/utils/diffDependencies.ts
  • frontend/web/components/diff/DiffChangeRequest.tsx
  • frontend/web/components/diff/DiffFeature.tsx
  • frontend/web/components/feature-dependencies/DependencyChangesTable/DependencyChangesTable.scss
  • frontend/web/components/feature-dependencies/DependencyChangesTable/DependencyChangesTable.tsx
  • frontend/web/components/feature-dependencies/DependencyChangesTable/index.ts
  • frontend/web/components/feature-dependencies/useDependencyChanges.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

Comment thread frontend/web/components/diff/DiffFeature.tsx Outdated
Comment thread frontend/web/components/diff/DiffFeature.tsx Outdated
talissoncosta and others added 21 commits October 16, 2026 17:08
The Dependencies tab lists the prerequisite changes held in each open or
scheduled change request for the feature, linking to it. The change request
page shows the prerequisite changes it would publish.

Both read from the fake that stands in for #8449, and a deleted change
request takes its staged changes with it. Gated behind
flag_dependencies_change_requests.

Refs #8450

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… first used

The API cannot list change requests by feature, or features by change
request, yet, so those two report an error until it can.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… rows

Each change is a diff row with the live table's Status and Satisfies, on the
tab and on the change request page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A failed list now says so on the tab and the change request page, instead
of reading as nothing pending.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With its status, and a link that opens in a new tab so the modal and
anything staged in it stay open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he modal

The change request page uses them too, so they no longer live in the tab.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The API can't list change requests by feature yet, so the section waits
on that discussion while the rest lands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The API has no list of features by change request, and the change
request already says which features it changes. Features with no
prerequisite changes get no panel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ir own tab

Next to Value and Segment Overrides, instead of a panel below the diff.
Skipped once the change request is published, as the API refuses to list
its dependencies then.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e modal's

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e API lists them

Skipped without versioning or the create change request permission, as the
API refuses both, and the feature states skip with them. The diff opens on
the first tab that changes, not always the second.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s Segment Overrides

They already show in the Dependencies tab, so one change counted twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…endency changes load

Committed change requests, and those without versioning or permission,
load no dependency changes, so filtering their segments hid the change
altogether. A failed load now also opens the Dependencies tab when nothing
else changed, so its error is in view.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Reset the controlled tab when Dependencies disappears. · DiffFeature.tsx:103-112

frontend/web/components/diff/DiffFeature.tsx:103-112
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reset the controlled tab when Dependencies disappears.

When the dependency query fails with no other changes, firstChangedTab selects Dependencies. When a later refetch succeeds with no dependency changes, showDependencies becomes false, but value remains the old Dependencies index. Tabs does not clamp this value. It applies tab-active only to an exact tab index.

The remaining Value tab therefore has no active content. hideNavOnSingleTab also hides its navigation, so the page can remain blank until the component state resets.

Suggested fix
  useEffect(() => {
-   if (firstChangedTab > 0) {
-     setValue(firstChangedTab)
-   }
+   setValue(firstChangedTab >= 0 ? firstChangedTab : 0)
  }, [firstChangedTab])

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 794323b0-3a19-4af7-97a7-c69c4fdea4b2
📥 Commits

Reviewing files that changed from the base of the PR and between be86475 and 5b24a2d.

📒 Files selected for processing: 12
  • frontend/common/types/responses.ts
  • frontend/web/components/diff/DiffChangeRequest.tsx
  • frontend/web/components/diff/DiffFeature.tsx
  • frontend/web/components/feature-dependencies/DependencyChangesTable/DependencyChangesTable.tsx
  • frontend/web/components/feature-dependencies/useDependencyChanges.ts
  • frontend/web/components/modals/create-feature/index.tsx
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/FeatureDependenciesTab.tsx
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/PrerequisitesTable/PrerequisitesTable.scss
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/PrerequisitesTable/PrerequisitesTable.tsx
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/dependenciesMode.ts
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/hooks/useStagedPrerequisites.tsx
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/prerequisiteState.ts
💤 Files with no reviewable changes: 5
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/prerequisiteState.ts
  • frontend/web/components/feature-dependencies/useDependencyChanges.ts
  • frontend/web/components/feature-dependencies/DependencyChangesTable/DependencyChangesTable.tsx
  • frontend/common/types/responses.ts
  • frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/FeatureDependenciesTab.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-preview — 5b24a2d7 Deployed Oct 20, 2026 by vercel[bot]
Preview – flagsmith-frontend-staging — 5b24a2d7 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants