Skip to content

feat(dependencies): add the Dependencies tab - #8637

Draft
talissoncosta wants to merge 6 commits into
mainfrom
feat/flag-dependencies-ui-8427
Draft

talissoncosta wants to merge 6 commits into
mainfrom
feat/flag-dependencies-ui-8427

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • 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

Closes #8427

A Dependencies tab in the Edit Feature modal: what gates this flag, and what it gates. Behind flag_dependencies.

Writes land immediately. There is no bulk endpoint, so a save button would loop POSTs and leave the tab half applied on the first refusal. The picker sits above the table rather than behind a button, matching Segment Overrides.

The picker drops the feature itself and anything already added, so the two refusals a user would hit most never fire. The other three surface their own message, which names both features and the rule they broke.

Per the issue, there is no "Must be" column and every dependency means "must be enabled". A row from a hand-written segment condition gets no remove control: the API will not delete it, and naming segments is out of scope for V1 per the issue's comments.

No change request handling. This issue is scoped to environments without them, so the tab also hides where they are enforced. Writing immediately would otherwise be a way to change a flag's gating without approval, through a route the rest of the modal closes. #8428 covers that case.

Fixtures. GET dependencies and dependents are not on main yet (#8570, #8571), so both serve fixtures behind a single useFixtures constant. Removing it, its two branches and the fixtures file leaves the real service behind. POST and DELETE have no fixture and fail until the API lands, which seemed more honest than faking a success.

Still blocked on one thing: DELETE .../dependencies/{prerequisite} does not exist. It is in the RFC at 2.3.2 and features.dependencies.deleted is already in the events catalogue, but there is no issue and no PR. The bin icon is in the mockups, so this cannot ship without it.

How did you test this code?

  • Ran it. Checked all four states against the designs: clean slate, with prerequisites, as a prerequisite, and the unmet warning. Both themes.
  • Running it caught a bug the linters could not: .alert lays its children out with flex, so each <strong> in the warning became a flex item and the text around it collapsed into "so<flag>is serving its disabled value in<environment>". Fixed in its own commit.
  • No console errors from the tab. The forwardRef and moment warnings are pre-existing.
  • tsc --noEmit and eslint --fix clean. The one constants.ts error is pre-existing on main, verified by stashing.
  • Not tested against the real API, since three of the four endpoints are not on main.
  • No E2E yet.

talissoncosta and others added 2 commits September 30, 2026 22:15
Types mirror the dependencies API in full, including the segment fields
the tab does not read.

The endpoints are not on main yet (#8570, #8571), so the two GETs serve
fixtures behind a single `useFixtures` constant. Removing it, both of its
branches and the fixtures file leaves the real service behind. The POST
and DELETE have no fixture, so they fail until the API lands rather than
faking a success.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backed by getFeatureList, so search and paging happen on the server
rather than pulling every flag in the project. Takes `ignore` for the
feature being edited and the ones already picked.

The legacy FlagSelect.js fetches through _data and stays where it is; its
one caller is CompareFeatures.

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

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Error Error Oct 1, 2026 1:37pm UTC
flagsmith-frontend-preview Ready Ready Preview Oct 1, 2026 1:37pm UTC
flagsmith-frontend-staging Ready Ready Preview Oct 1, 2026 1:37pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

talissoncosta and others added 4 commits September 30, 2026 22:30
Two tables and the states they collapse to. Presentational only, so the
tab can wire data and permissions on top.

Prerequisites carry a status tick for whether each one is currently
enabled in this environment, since an unmet prerequisite is why the flag
is serving its disabled value. A row from a hand-written segment
condition gets no remove control: the API will not delete it, and naming
segments is out of scope for V1.

Dependent rows open that feature's own Dependencies tab.

Font sizes are literals rather than $font-caption. A component
stylesheet is loaded on its own and never sees _variables.scss, and the
scale has no custom properties yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Wires the tables to the service. Adding and removing write straight
away: there is no bulk endpoint, so a batch save would loop POSTs and
leave the tab half applied on the first refusal.

The picker sits above the table rather than behind a button, matching
Segment Overrides, and drops the feature itself and anything already
added so the two refusals a user would hit most never fire. The rest
surface their own message, which names the features and the rule.

The edges carry only a name and an id, so whether a prerequisite is
currently met comes from the feature list the picker already loads.

No change request handling: this issue is scoped to environments without
them, and #8428 covers the rest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sits after Segment Overrides, behind the flag_dependencies flag.

Hidden where change requests are enforced as well as inside one. Writes
land immediately, so on a four-eyes environment the tab would be a way
to change a flag's gating without approval, through a route the rest of
the modal closes. #8428 covers that case.

Clicking a dependent feature leaves through the features list rather
than swapping this modal's feature underneath itself: ?feature= is the
deep link the list already owns, and ?tab= is read by Tabs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.alert lays its children out with flex, so each <strong> became a flex
item and the text around it collapsed: "so0001_testis serving its
disabled value inDevelopment". One box of its own and the message reads
as a sentence again.

Caught by running it; the markup looks right in the source.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Oct 1, 2026
@talissoncosta talissoncosta changed the title feat(dependencies): add the flag dependencies service and feature picker feat(dependencies): add the Dependencies tab Oct 1, 2026

This branch had an error being deployed

1 failed and 2 active deployments
Preview – flagsmith-frontend-preview — d78afd8e Deployed Oct 1, 2026 by vercel[bot]
Preview – flagsmith-frontend-staging — d78afd8e Deployed Oct 1, 2026 by vercel[bot]
Preview – docs — d78afd8e Deployed Oct 1, 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.

Frontend for Flag Dependencies (CRs not enabled)

1 participant