Skip to content

fix(Feature Lifecycle): Add missing documentation - #9098

Open
emyller wants to merge 4 commits into
mainfrom
docs/feature-lifecycle
Open

emyller wants to merge 4 commits into
mainfrom
docs/feature-lifecycle

Conversation

@emyller

@emyller emyller commented Nov 24, 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 ENG-613.

  • Adds human-written documentation for feature lifecycle.
  • Disambiguate "Flag Lifecycle" and "Feature Lifecycle" docs.
  • Improves the VCS tag thingy we display on feature lists.

How did you test this code?

Docs preview: https://docs-git-docs-feature-lifecycle-flagsmith.vercel.app/managing-flags/feature-lifecycle

@emyller emyller self-assigned this Nov 24, 2026
@emyller
emyller requested review from a team as code owners November 24, 2026 22:43
@emyller
emyller requested review from Holmus and kyle-ssg and removed request for a team November 24, 2026 22:43
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Nov 24, 2026 11:09pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
flagsmith-frontend-preview Ignored Ignored Preview Nov 24, 2026 11:09pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Nov 24, 2026 11:09pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 24, 2026

Copy link
Copy Markdown

ENG-613

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard docs Documentation updates labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@cubic-dev-ai cubic-dev-ai 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.

4 issues found across 7 files

Confidence score: 3/5

  • In feature-lifecycle.md, “To Remove” can be read as safe to remove everywhere, but it only reflects the selected environment. State that limit and tell users to check other environments before removing a flag.
  • In CodeReferencesTag.tsx, keyboard users can’t open the Usage tab because the click handler is on a non-focusable div. Use a keyboard-operable control.
  • In CodeReferencesTag.tsx, total counts references, not scan runs, so the current label gives users the wrong count. Label it as references found.
  • In feature-lifecycle.md, “New” can imply recent creation even though existing features with no code references can be classified there. Describe the stage by its classification instead.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="frontend/web/components/tags/CodeReferencesTag.tsx">

<violation number="1" location="frontend/web/components/tags/CodeReferencesTag.tsx:18">
P2: `total` counts code references found in the latest scans, not scan runs, so this reports the reference count as the number of scans. Label the total as references found instead.</violation>

<violation number="2" location="frontend/web/components/tags/CodeReferencesTag.tsx:36">
P2: This click handler is attached to a non-focusable `div`, so keyboard users cannot open the Usage tab from this tag. Render it as a keyboard-operable control.</violation>
</file>

<file name="docs/docs/managing-flags/feature-lifecycle.md">

<violation number="1" location="docs/docs/managing-flags/feature-lifecycle.md:35">
P2: `New` does not mean the feature was recently created; existing non-stale features with no code references also appear here. Describe the stage by its actual classification so users do not infer feature age from it.</violation>

<violation number="2" location="docs/docs/managing-flags/feature-lifecycle.md:40">
P1: `To Remove` only means no evaluations were recorded in the selected environment during the configured stale threshold, not that the flag is no longer evaluated everywhere. State this limit and tell users to verify other environments and deployed versions before deleting the flag.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

- `Permanent`: Meant to stay, e.g. a kill switch. Never flagged for clean-up.
- `Stale`: Still in the code, but [untouched for a while](/managing-flags/stale-flags). Time to remove it from the code.
- `To Monitor`: Gone from the code, but still being evaluated, e.g. by an older release of the application. Wait before deleting.
- `To Remove`: Gone from the code and no longer evaluated. Safe to delete from Flagsmith.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: To Remove only means no evaluations were recorded in the selected environment during the configured stale threshold, not that the flag is no longer evaluated everywhere. State this limit and tell users to verify other environments and deployed versions before deleting the flag.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/managing-flags/feature-lifecycle.md, line 40:

<comment>`To Remove` only means no evaluations were recorded in the selected environment during the configured stale threshold, not that the flag is no longer evaluated everywhere. State this limit and tell users to verify other environments and deployed versions before deleting the flag.</comment>

<file context>
@@ -0,0 +1,67 @@
+- `Permanent`: Meant to stay, e.g. a kill switch. Never flagged for clean-up.
+- `Stale`: Still in the code, but [untouched for a while](/managing-flags/stale-flags). Time to remove it from the code.
+- `To Monitor`: Gone from the code, but still being evaluated, e.g. by an older release of the application. Wait before deleting.
+- `To Remove`: Gone from the code and no longer evaluated. Safe to delete from Flagsmith.
+
+```mermaid
</file context>
Suggested change
- `To Remove`: Gone from the code and no longer evaluated. Safe to delete from Flagsmith.
- `To Remove`: No code references were found in the latest scans and no evaluations were recorded in the selected environment during the stale threshold. Check other environments and deployed versions before deleting from Flagsmith.

<Tooltip
title={
onClick ? (
<div onClick={onClick} className='cursor-pointer'>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This click handler is attached to a non-focusable div, so keyboard users cannot open the Usage tab from this tag. Render it as a keyboard-operable control.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At frontend/web/components/tags/CodeReferencesTag.tsx, line 36:

<comment>This click handler is attached to a non-focusable `div`, so keyboard users cannot open the Usage tab from this tag. Render it as a keyboard-operable control.</comment>

<file context>
@@ -0,0 +1,50 @@
+    <Tooltip
+      title={
+        onClick ? (
+          <div onClick={onClick} className='cursor-pointer'>
+            {tag}
+          </div>
</file context>

}

const total = counts.reduce((sum, { count }) => sum + count, 0)
const scans = Format.pluralise(total, 'time', 'times')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: total counts code references found in the latest scans, not scan runs, so this reports the reference count as the number of scans. Label the total as references found instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At frontend/web/components/tags/CodeReferencesTag.tsx, line 18:

<comment>`total` counts code references found in the latest scans, not scan runs, so this reports the reference count as the number of scans. Label the total as references found instead.</comment>

<file context>
@@ -0,0 +1,50 @@
+  }
+
+  const total = counts.reduce((sum, { count }) => sum + count, 0)
+  const scans = Format.pluralise(total, 'time', 'times')
+  const repositories = Format.pluralise(
+    counts.length,
</file context>

Within the life of a feature flag, and also in the Feature Lifecycle tab, we
identify the stages:

- `New`: Created in Flagsmith, but not in the code yet. Becomes `Live` once a code scan finds it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: New does not mean the feature was recently created; existing non-stale features with no code references also appear here. Describe the stage by its actual classification so users do not infer feature age from it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/managing-flags/feature-lifecycle.md, line 35:

<comment>`New` does not mean the feature was recently created; existing non-stale features with no code references also appear here. Describe the stage by its actual classification so users do not infer feature age from it.</comment>

<file context>
@@ -0,0 +1,67 @@
+Within the life of a feature flag, and also in the Feature Lifecycle tab, we
+identify the stages:
+
+- `New`: Created in Flagsmith, but not in the code yet. Becomes `Live` once a code scan finds it.
+- `Live`: In the code and still being rolled out. Nothing to do.
+- `Permanent`: Meant to stay, e.g. a kill switch. Never flagged for clean-up.
</file context>
Suggested change
- `New`: Created in Flagsmith, but not in the code yet. Becomes `Live` once a code scan finds it.
- `New`: No code references are found in the latest scans, and the feature is neither stale nor permanent; this does not necessarily mean it was recently created.

@github-actions

github-actions Bot commented Nov 24, 2026 •

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

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

passed  2 passed

Details

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

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

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  19 seconds
commit  d30efe7
info  🔄 Run: #23714 (attempt 1)

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  4.4 seconds
commit  d30efe7
info  🔄 Run: #23714 (attempt 1)

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  17.9 seconds
commit  d30efe7
info  🔄 Run: #23714 (attempt 1)

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

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

passed  3 passed

Details

stats  3 tests across 2 suites
duration  51.2 seconds
commit  2f473d3
info  🔄 Run: #23712 (attempt 1)

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

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

passed  4 passed

Details

stats  4 tests across 3 suites
duration  3.4 seconds
commit  2f473d3
info  🔄 Run: #23712 (attempt 1)

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

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

passed  26 passed
skipped  1 skipped

Details

stats  27 tests across 15 suites
duration  36.5 seconds
commit  2f473d3
info  🔄 Run: #23712 (attempt 1)

Skipped tests

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

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  34.6 seconds
commit  2f473d3
info  🔄 Run: #23712 (attempt 1)

@emyller emyller changed the title Docs/feature lifecycle fix(Feature Lifecycle): Add missing documentation Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

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

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 8 files (changes from recent commits).

Confidence score: 4/5

  • flag-life-spans.md overstates what Feature Lifecycle tracks; it does not cover every action in the six-step list, including flag toggles and Segment overrides. Narrow the description to the lifecycle stages it actually tracks.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/docs/best-practices/flag-life-spans.md">

<violation number="1" location="docs/docs/best-practices/flag-life-spans.md:25">
P2: This overstates what Feature Lifecycle tracks: it does not represent every action in the six-step list, such as toggling the flag or applying Segment overrides. Describe it as tracking flags through lifecycle stages and identifying cleanup candidates.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

5. Deploy your application, so that there is no reference to the flag.
6. Remove the flag from Flagsmith.

[Feature Lifecycle](/managing-flags/feature-lifecycle) highlights feature flags at each of these steps, making it easier to spot the ones ready to be removed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This overstates what Feature Lifecycle tracks: it does not represent every action in the six-step list, such as toggling the flag or applying Segment overrides. Describe it as tracking flags through lifecycle stages and identifying cleanup candidates.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/best-practices/flag-life-spans.md, line 25:

<comment>This overstates what Feature Lifecycle tracks: it does not represent every action in the six-step list, such as toggling the flag or applying Segment overrides. Describe it as tracking flags through lifecycle stages and identifying cleanup candidates.</comment>

<file context>
@@ -22,6 +22,8 @@ Short-lived flags are designed to be removed from your code and from Flagsmith a
 5. Deploy your application, so that there is no reference to the flag.
 6. Remove the flag from Flagsmith.
 
+[Feature Lifecycle](/managing-flags/feature-lifecycle) highlights feature flags at each of these steps, making it easier to spot the ones ready to be removed.
+
 :::info 
</file context>
Suggested change
[Feature Lifecycle](/managing-flags/feature-lifecycle) highlights feature flags at each of these steps, making it easier to spot the ones ready to be removed.
[Feature Lifecycle](/managing-flags/feature-lifecycle) tracks feature flags through stages of development and release, making it easier to spot the ones ready to be removed.

This branch was successfully deployed

1 active deployment
Preview – docs — d30efe75 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant