feat: use lifecycles API#7793
Conversation
…ification Conform the project lifecycle page to the new backend API (#7789): - Add lifecycle-status-counts RTK query for sidebar counts in one call - Add lifecycle_stage + evaluation_period_days params to getProjectFlags and a lifecycle_stage field on ProjectFlag - Each section now fetches only its own stage, classified server-side - Remove client-side tag/code-reference/evaluation classification, the per-flag EvaluationChecker and useEvaluationCounts hook - Single environment (name-matched "prod" by default, switchable in the left nav, persisted per project in a new redux slice) and a single evaluation_period_days replace the multi-env + dual-period controls - Drop the non-functional "LIFECYCLE STAGES" sidebar header/Add button Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Failed testsfirefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
This comment was marked as spam.
This comment was marked as spam.
Match the feature-lifecycle endpoints introduced in PR #7789: - lowercase LifecycleStage values + SECTION_TO_STAGE mapping - env-scoped counts URL (environments/{env}/feature-lifecycle-counts/) - read lowercase count keys; drop unsupported filter + evaluation_period params from the counts query - remove the orphaned evaluation-period selector (backend derives the window from project.stale_flags_limit_days) Extract prod-environment prediction into predictProdEnvironment(). Add frontend context doc for running an unmerged backend PR's Docker image. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Fix loading state: use isFetching in addition to isLoading for proper loading indicator when switching between lifecycle sections - Change environment picker from tag chips to dropdown select - Add tooltip explaining environment selection affects evaluations only - Remove checkbox selection from Stale and Remove sections for visual consistency with other sections - Fix MONITOR_TOOLTIP type error by converting JSX to HTML string - Add spacing before "Why am I seeing this?" link - Fix FeatureImport.tsx type error with proper ternary for existingFlags Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
emyller
left a comment
There was a problem hiding this comment.
The PR description looks out of date, as it still mentions the evaluation_period_days added in a previous API PoC, replaced with what ended up in production. I made sure it's not in the patch.
I think the new tab plays a nice role in calling attention to it, but I'm not 100% convinced we need to add yet another item in that [already crowded] horizontal space. Do you have any plans to use the lifecycle stage info also added to feature list and retrieve endpoints?
Lifecycle stages are largely project-wide rather than environment-specific (only evaluations are per-environment). In practice, feature lifecycle is typically assessed from a single environment—usually production—where other environments might not be meaningful. Typing this out makes me think adding lifecycle filters to the environment features page could actually create confusion, since you'd be viewing project-level data within an environment-scope thats not production and therefore misleading. |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Precisely. My initial draft (which included Perhaps
Agree! Thanks, I'm 100% convinced about the new tab now. |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Yep makes total sense, we could add a whats your production setting but the current frontend cleverly looks for an environment name that has a name like prod |
talissoncosta
left a comment
There was a problem hiding this comment.
Looks good @kyle-ssg !
Just one point I wanna raise. The env selection is not persisting on reload.
Can you add 'lifecycleEnvironment on the whitelist on common/store line 41. So this will match with the PR description.
whitelist: ['user', 'lifecycleEnvironment'],Clicking a feature row in the lifecycle page now opens a side modal with Usage and Settings tabs, matching the main feature modal styling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Conform the project lifecycle page to the new backend API (#7789):
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Hooks up API for feature lifecycle
How did you test this code?
Go to lifecycle page as in the Flagsmith project