Repository navigation
docs(best-practices): add anti-patterns reference - #9096
MghongoDev wants to merge 1 commit into
Conversation
|
@MghongoDev is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
3 issues found across 1 file
Confidence score: 4/5
- In
common-anti-patterns.md, the real-time flag update recommendation omits that this requires an Enterprise subscription. State the plan requirement so readers can assess availability. - In
common-anti-patterns.md, the Change Requests recommendation omits that this feature is available only on Scale-Up and Enterprise plans. Name the eligible plans. - In
common-anti-patterns.md, long dependency chains are described as an anti-pattern without noting that dependency nesting is limited to one level. State the actual limit.
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/common-anti-patterns.md">
<violation number="1" location="docs/docs/best-practices/common-anti-patterns.md:19">
P2: Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.</violation>
<violation number="2" location="docs/docs/best-practices/common-anti-patterns.md:24">
P2: This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.</violation>
<violation number="3" location="docs/docs/best-practices/common-anti-patterns.md:77">
P2: Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Re-trigger cubic
| Teams often add real-time updates first and write that code later. | ||
|
|
||
| Fetch flags when the session starts. That is enough for most applications. If a feature needs updates during a session, | ||
| use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks, |
There was a problem hiding this comment.
P2: Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.
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/common-anti-patterns.md, line 19:
<comment>Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.</comment>
<file context>
@@ -0,0 +1,78 @@
+Teams often add real-time updates first and write that code later.
+
+Fetch flags when the session starts. That is enough for most applications. If a feature needs updates during a session,
+use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks,
+monitoring screens, and emergency kill switches justify the extra code.
+
</file context>
| use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks, | |
| +use [real-time flags](/performance/real-time-flags), available with an Enterprise subscription, and plan for the refetch logic. Internal dashboards, kiosks, |
| Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production | ||
| environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments. |
There was a problem hiding this comment.
P2: Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.
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/common-anti-patterns.md, line 77:
<comment>Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.</comment>
<file context>
@@ -0,0 +1,78 @@
+One person can turn on a flag in production and change what every user sees. No second check stands between the click
+and the release.
+
+Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production
+environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments.
</file context>
| Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production | |
| environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments. | |
| +Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) (available on Scale-Up and Enterprise plans) for production | |
| environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments. |
| Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long | ||
| chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A |
There was a problem hiding this comment.
P2: This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.
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/common-anti-patterns.md, line 24:
<comment>This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.</comment>
<file context>
@@ -0,0 +1,78 @@
+
+## Chaining flags
+
+Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long
+chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A
+broken prerequisite can also turn off a feature that looks unrelated.
</file context>
| Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long | |
| chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A | |
| Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), but nesting is limited to one level. Even | |
| one prerequisite adds a state you must simulate before you know what a user will see. A |
Fixes #7509
Adds a reference page for the eight anti-patterns listed in the issue. Each entry names the problem and gives an alternative, with links to existing Flagsmith documentation.
Checks: Prettier passes on the new page. All seven internal links resolve to files in
docs/docs. The full Docusaurus build was not run locally.