Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

refactor(platform): retire released and unused feature flags (#14531)

Nicholas Tindle4a1b7e794576
diff --git a/autogpt_platform/backend/backend/api/features/chat/share.py b/autogpt_platform/backend/backend/api/features/chat/share.py
index c4fa1b8401..203b21820f 100644
--- a/autogpt_platform/backend/backend/api/features/chat/share.py
+++ b/autogpt_platform/backend/backend/api/features/chat/share.py
@@ -24,7 +24,6 @@ from backend.copilot.sharing import db as share_db
from backend.copilot.sharing.models import SharedChatMessagesPage, SharedChatSession
from backend.data.sharing.tokens import SHARE_TOKEN_PATTERN
from backend.data.workspace import get_workspace_file_by_id
-from backend.util.feature_flag import Flag, is_feature_enabled
from backend.util.settings import Settings
logger = logging.getLogger(__name__)
@@ -99,7 +98,6 @@ async def get_chat_share_state(
@owner_router.post(
"/sessions/{session_id}/share",
responses={
- 403: {"description": "Chat sharing is not enabled for this user"},
404: {"description": "Chat session not found for user"},
},
)
@@ -108,13 +106,7 @@ async def enable_chat_sharing(
user_id: Annotated[str, Security(auth.get_user_id)],
body: EnableShareRequest = Body(default_factory=EnableShareRequest),
) -> ChatShareResponse:
- """Enable sharing for a chat session.
-
- Flag-gated: refuses with 403 when ``chat-sharing`` is off so a stale
- frontend cannot enable shares post-rollback.
- """
- if not await is_feature_enabled(Flag.CHAT_SHARING, user_id):
- raise HTTPException(status_code=403, detail="Chat sharing is not enabled")
+ """Enable sharing for a chat session."""
base_url = settings.config.frontend_base_url
if not base_url:
@@ -166,8 +158,6 @@ async def disable_chat_sharing(
# --------------------------------------------------------------------------
# Public routes — mounted at ``/api/public/shared/chats``.
-# Stays on even when ``chat-sharing`` flag is off so revoked-then-fixed
-# rollbacks don't break already-shared URLs mid-flight.
# --------------------------------------------------------------------------
public_router = APIRouter(tags=["chat", "share", "public"])
diff --git a/autogpt_platform/backend/backend/api/features/chat/share_test.py b/autogpt_platform/backend/backend/api/features/chat/share_test.py
index 551b0ea794..00e1699262 100644
--- a/autogpt_platform/backend/backend/api/features/chat/share_test.py
+++ b/autogpt_platform/backend/backend/api/features/chat/share_test.py
@@ -89,23 +89,23 @@ def client():
class TestEnableChatSharing:
- def test_enables_share_when_flag_on(self, client):
+ def test_enables_share(self, client, test_user_id):
with (
- patch(
- "backend.api.features.chat.share.is_feature_enabled",
- new_callable=AsyncMock,
- return_value=True,
- ),
patch(
"backend.api.features.chat.share.share_db.enable_chat_session_share",
new_callable=AsyncMock,
return_value=VALID_TOKEN,
- ),
+ ) as enable_share,
):
response = client.post(
f"/api/chat/sessions/{SESSION_ID}/share",
json={"auto_share_executions": False},
)
+ enable_share.assert_awaited_once_with(
+ session_id=SESSION_ID,
+ user_id=test_user_id,
+ auto_share_executions=False,
+ )
assert response.status_code == 200
body = response.json()
assert body["share_token"] == VALID_TOKEN
@@ -119,11 +119,6 @@ class TestEnableChatSharing:
return VALID_TOKEN
with (
- patch(
- "backend.api.features.chat.share.is_feature_enabled",
- new_callable=AsyncMock,
- return_value=True,
- ),
patch(
"backend.api.features.chat.share.share_db.enable_chat_session_share",
side_effect=fake_enable,
@@ -138,25 +133,27 @@ class TestEnableChatSharing:
# backend can auto-link existing + future runs.
assert captured["auto_share_executions"] is True
- def test_flag_off_refuses_with_403(self, client):
- with patch(
- "backend.api.features.chat.share.is_feature_enabled",
- new_callable=AsyncMock,
- return_value=False,
+ def test_enables_share_without_launchdarkly(self, client):
+ with (
+ patch(
+ "backend.util.feature_flag.get_client",
+ side_effect=RuntimeError("LaunchDarkly unavailable"),
+ ),
+ patch(
+ "backend.api.features.chat.share.share_db.enable_chat_session_share",
+ new_callable=AsyncMock,
+ return_value=VALID_TOKEN,
+ ),
):
response = client.post(
f"/api/chat/sessions/{SESSION_ID}/share",
json={"auto_share_executions": False},
)
- assert response.status_code == 403
+ assert response.status_code == 200
+ assert response.json()["share_token"] == VALID_TOKEN
def test_missing_session_returns_404(self, client):
with (
- patch(
- "backend.api.features.chat.share.is_feature_enabled",
- new_callable=AsyncMock,
- return_value=True,
- ),
patch(
"backend.api.features.chat.share.share_db.enable_chat_session_share",
new_callable=AsyncMock,
diff --git a/autogpt_platform/backend/backend/util/feature_flag.py b/autogpt_platform/backend/backend/util/feature_flag.py
index 64bd348ff1..aeea0f1437 100644
--- a/autogpt_platform/backend/backend/util/feature_flag.py
+++ b/autogpt_platform/backend/backend/util/feature_flag.py
@@ -37,17 +37,8 @@ class Flag(str, Enum):
AUTOMOD = "AutoMod"
AI_ACTIVITY_STATUS = "ai-agent-execution-summary"
- BETA_BLOCKS = "beta-blocks"
- AGENT_ACTIVITY = "agent-activity"
ENABLE_PLATFORM_PAYMENT = "enable-platform-payment"
- CHAT = "chat"
CHAT_MODE_OPTION = "chat-mode-option"
- # Gates the "share chat results" feature end-to-end. Backend create
- # routes refuse when off so a stale frontend cannot enable shares;
- # frontend share button hides when off so the UI doesn't tease a
- # feature that won't take. Existing public viewer routes stay on
- # regardless so previously-shared URLs remain valid mid-flight.
- CHAT_SHARING = "chat-sharing"
COPILOT_SDK = "copilot-sdk"
COPILOT_COST_LIMITS = "copilot-cost-limits"
# Self-distilled skills registry (store_skill / read_skill /
@@ -687,7 +678,7 @@ def create_feature_flag_dependency(
Example:
router = APIRouter(
- dependencies=[Depends(create_feature_flag_dependency(Flag.CHAT))]
+ dependencies=[Depends(create_feature_flag_dependency(Flag.SKILLS_HUB))]
)
"""
diff --git a/autogpt_platform/backend/backend/util/feature_flag_test.py b/autogpt_platform/backend/backend/util/feature_flag_test.py
index ae38a30759..66f4aaa495 100644
--- a/autogpt_platform/backend/backend/util/feature_flag_test.py
+++ b/autogpt_platform/backend/backend/util/feature_flag_test.py
@@ -88,7 +88,7 @@ async def test_is_feature_enabled_not_initialized(ld_client):
"""Test is_feature_enabled when LaunchDarkly is not initialized."""
ld_client.is_initialized.return_value = False
- result = await is_feature_enabled(Flag.AGENT_ACTIVITY, "user123", default=True)
+ result = await is_feature_enabled(Flag.AUTOMOD, "user123", default=True)
assert result is True # Should return default
ld_client.variation.assert_not_called()
@@ -102,7 +102,7 @@ async def test_is_feature_enabled_exception(mocker):
side_effect=Exception("Client error"),
)
- result = await is_feature_enabled(Flag.AGENT_ACTIVITY, "user123", default=True)
+ result = await is_feature_enabled(Flag.AUTOMOD, "user123", default=True)
assert result is True # Should return default
@@ -110,8 +110,6 @@ def test_flag_enum_values():
"""Test that Flag enum has expected values."""
assert Flag.AUTOMOD == "AutoMod"
assert Flag.AI_ACTIVITY_STATUS == "ai-agent-execution-summary"
- assert Flag.BETA_BLOCKS == "beta-blocks"
- assert Flag.AGENT_ACTIVITY == "agent-activity"
@pytest.mark.asyncio
@@ -130,37 +128,37 @@ async def test_is_feature_enabled_with_flag_enum(mocker):
class TestEnvFlagOverride:
def test_force_flag_true(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "true")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "true")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_force_flag_false(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "false")
- assert _env_flag_override(Flag.CHAT) is False
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "false")
+ assert _env_flag_override(Flag.AUTOMOD) is False
def test_next_public_prefix_true(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("NEXT_PUBLIC_FORCE_FLAG_CHAT", "true")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("NEXT_PUBLIC_FORCE_FLAG_AUTOMOD", "true")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_unset_returns_none(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.delenv("FORCE_FLAG_CHAT", raising=False)
- monkeypatch.delenv("NEXT_PUBLIC_FORCE_FLAG_CHAT", raising=False)
- assert _env_flag_override(Flag.CHAT) is None
+ monkeypatch.delenv("FORCE_FLAG_AUTOMOD", raising=False)
+ monkeypatch.delenv("NEXT_PUBLIC_FORCE_FLAG_AUTOMOD", raising=False)
+ assert _env_flag_override(Flag.AUTOMOD) is None
def test_invalid_value_returns_false(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "notaboolean")
- assert _env_flag_override(Flag.CHAT) is False
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "notaboolean")
+ assert _env_flag_override(Flag.AUTOMOD) is False
def test_numeric_one_returns_true(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "1")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "1")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_yes_returns_true(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "yes")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "yes")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_on_returns_true(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "on")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "on")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_hyphenated_flag_converts_to_underscore(
self, monkeypatch: pytest.MonkeyPatch
@@ -171,17 +169,17 @@ class TestEnvFlagOverride:
def test_force_flag_takes_precedence_over_next_public(
self, monkeypatch: pytest.MonkeyPatch
):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "false")
- monkeypatch.setenv("NEXT_PUBLIC_FORCE_FLAG_CHAT", "true")
- assert _env_flag_override(Flag.CHAT) is False
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "false")
+ monkeypatch.setenv("NEXT_PUBLIC_FORCE_FLAG_AUTOMOD", "true")
+ assert _env_flag_override(Flag.AUTOMOD) is False
def test_whitespace_is_stripped(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", " true ")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", " true ")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_case_insensitive_value(self, monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setenv("FORCE_FLAG_CHAT", "TRUE")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "TRUE")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def _flags_read_via_get_feature_flag_value() -> set[str]:
@@ -226,26 +224,26 @@ class TestForceAllFlags:
for name in (
"FORCE_ALL_FLAGS",
"NEXT_PUBLIC_FORCE_ALL_FLAGS",
- "FORCE_FLAG_CHAT",
- "NEXT_PUBLIC_FORCE_FLAG_CHAT",
+ "FORCE_FLAG_AUTOMOD",
+ "NEXT_PUBLIC_FORCE_FLAG_AUTOMOD",
):
monkeypatch.delenv(name, raising=False)
def test_off_by_default(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
assert _force_all_flags_enabled() is False
- assert _env_flag_override(Flag.CHAT) is None
+ assert _env_flag_override(Flag.AUTOMOD) is None
def test_forces_boolean_flag_on(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
assert _force_all_flags_enabled() is True
- assert _env_flag_override(Flag.CHAT) is True
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_next_public_master_switch(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
monkeypatch.setenv("NEXT_PUBLIC_FORCE_ALL_FLAGS", "1")
- assert _env_flag_override(Flag.CHAT) is True
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_skips_non_boolean_flags(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
@@ -277,19 +275,19 @@ class TestForceAllFlags:
def test_per_flag_false_wins_over_force_all(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
- monkeypatch.setenv("FORCE_FLAG_CHAT", "false")
- assert _env_flag_override(Flag.CHAT) is False
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "false")
+ assert _env_flag_override(Flag.AUTOMOD) is False
def test_accepts_raw_string_key(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
- assert _env_flag_override(Flag.CHAT.value) is True
+ assert _env_flag_override(Flag.AUTOMOD.value) is True
def test_falsey_value_does_not_force(self, monkeypatch: pytest.MonkeyPatch):
self._clear(monkeypatch)
monkeypatch.setenv("FORCE_ALL_FLAGS", "false")
assert _force_all_flags_enabled() is False
- assert _env_flag_override(Flag.CHAT) is None
+ assert _env_flag_override(Flag.AUTOMOD) is None
def test_ignored_in_production(
self, monkeypatch: pytest.MonkeyPatch, mocker, caplog: pytest.LogCaptureFixture
@@ -302,7 +300,7 @@ class TestForceAllFlags:
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
with caplog.at_level(logging.ERROR, logger="backend.util.feature_flag"):
assert _force_all_flags_enabled() is False
- assert _env_flag_override(Flag.CHAT) is None
+ assert _env_flag_override(Flag.AUTOMOD) is None
assert "FORCE_ALL_FLAGS is set but app_env is prod, not local" in caplog.text
def test_ignored_in_shared_development(
@@ -322,7 +320,7 @@ class TestForceAllFlags:
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
with caplog.at_level(logging.ERROR, logger="backend.util.feature_flag"):
assert _force_all_flags_enabled() is False
- assert _env_flag_override(Flag.CHAT) is None
+ assert _env_flag_override(Flag.AUTOMOD) is None
assert "FORCE_ALL_FLAGS is set but app_env is dev, not local" in caplog.text
def test_per_flag_override_still_works_in_development(
@@ -333,8 +331,8 @@ class TestForceAllFlags:
mocker.patch.object(
feature_flag_module.settings.config, "app_env", AppEnvironment.DEVELOPMENT
)
- monkeypatch.setenv("FORCE_FLAG_CHAT", "true")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "true")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_per_flag_override_still_works_in_production(
self, monkeypatch: pytest.MonkeyPatch, mocker
@@ -343,8 +341,8 @@ class TestForceAllFlags:
mocker.patch.object(
feature_flag_module.settings.config, "app_env", AppEnvironment.PRODUCTION
)
- monkeypatch.setenv("FORCE_FLAG_CHAT", "true")
- assert _env_flag_override(Flag.CHAT) is True
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "true")
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_honoured_in_local(self, monkeypatch: pytest.MonkeyPatch, mocker):
self._clear(monkeypatch)
@@ -352,7 +350,7 @@ class TestForceAllFlags:
feature_flag_module.settings.config, "app_env", AppEnvironment.LOCAL
)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
- assert _env_flag_override(Flag.CHAT) is True
+ assert _env_flag_override(Flag.AUTOMOD) is True
def test_warns_once_when_honoured(
self, monkeypatch: pytest.MonkeyPatch, mocker, caplog: pytest.LogCaptureFixture
@@ -385,8 +383,8 @@ class TestEnvOverrideWiring:
"NEXT_PUBLIC_FORCE_ALL_FLAGS",
"FORCE_FLAG_TEST_FLAG",
"NEXT_PUBLIC_FORCE_FLAG_TEST_FLAG",
- "FORCE_FLAG_CHAT",
- "NEXT_PUBLIC_FORCE_FLAG_CHAT",
+ "FORCE_FLAG_AUTOMOD",
+ "NEXT_PUBLIC_FORCE_FLAG_AUTOMOD",
):
monkeypatch.delenv(name, raising=False)
@@ -427,7 +425,7 @@ class TestEnvOverrideWiring:
mocker.patch("backend.util.feature_flag.is_configured", return_value=False)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
- check_feature_flag = create_feature_flag_dependency(Flag.CHAT)
+ check_feature_flag = create_feature_flag_dependency(Flag.AUTOMOD)
assert await check_feature_flag(user_id=None) is None
@pytest.mark.asyncio
@@ -436,11 +434,11 @@ class TestEnvOverrideWiring:
):
mocker.patch("backend.util.feature_flag.is_configured", return_value=False)
monkeypatch.setenv("FORCE_ALL_FLAGS", "true")
- monkeypatch.setenv("FORCE_FLAG_CHAT", "false")
+ monkeypatch.setenv("FORCE_FLAG_AUTOMOD", "false")
# default=True so the 404 can only come from the override, not the
# unconfigured-SDK fallback.
- check_feature_flag = create_feature_flag_dependency(Flag.CHAT, default=True)
+ check_feature_flag = create_feature_flag_dependency(Flag.AUTOMOD, default=True)
with pytest.raises(HTTPException) as exc_info:
await check_feature_flag(user_id=None)
assert exc_info.value.status_code == 404
@@ -497,7 +495,7 @@ class TestEnvOverrideWiring:
ld_client.is_initialized.return_value = True
ld_client.variation.return_value = False
- check_feature_flag = create_feature_flag_dependency(Flag.CHAT)
+ check_feature_flag = create_feature_flag_dependency(Flag.AUTOMOD)
with pytest.raises(HTTPException) as exc_info:
await check_feature_flag(user_id="test-user")
assert exc_info.value.status_code == 404
@@ -511,7 +509,7 @@ class TestEnvOverrideWiring:
mocker.patch("backend.util.feature_flag.is_configured", return_value=True)
ld_client.is_initialized.return_value = False
- check_feature_flag = create_feature_flag_dependency(Flag.CHAT)
+ check_feature_flag = create_feature_flag_dependency(Flag.AUTOMOD)
with pytest.raises(HTTPException) as exc_info:
await check_feature_flag(user_id="test-user")
assert exc_info.value.status_code == 404
@@ -528,7 +526,7 @@ class TestEnvOverrideWiring:
new=mocker.AsyncMock(side_effect=RuntimeError("LD exploded")),
)
- check_feature_flag = create_feature_flag_dependency(Flag.CHAT)
+ check_feature_flag = create_feature_flag_dependency(Flag.AUTOMOD)
with pytest.raises(HTTPException) as exc_info:
await check_feature_flag(user_id="test-user")
assert exc_info.value.status_code == 500
diff --git a/autogpt_platform/frontend/CONTRIBUTING.md b/autogpt_platform/frontend/CONTRIBUTING.md
index 1c44c5e734..532ace6672 100644
--- a/autogpt_platform/frontend/CONTRIBUTING.md
+++ b/autogpt_platform/frontend/CONTRIBUTING.md
@@ -505,8 +505,8 @@ Check a flag in a client component:
```tsx
import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
-export function AgentActivityPanel() {
- const enabled = useGetFlag(Flag.AGENT_ACTIVITY);
+export function SkillsPanel() {
+ const enabled = useGetFlag(Flag.SKILLS_HUB);
if (!enabled) return null;
return <div>Feature is enabled!</div>;
}
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/Flow.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/Flow.tsx
index 0c76d823c3..308b6e816a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/Flow.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/Flow.tsx
@@ -3,7 +3,6 @@ import { okData } from "@/app/api/helpers";
import { ErrorBoundary } from "@/components/molecules/ErrorBoundary/ErrorBoundary";
import { FloatingReviewsPanel } from "@/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel";
import { BuilderChatPanel } from "../../BuilderChatPanel/BuilderChatPanel";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { Background, ReactFlow } from "@xyflow/react";
import { parseAsString, useQueryStates } from "nuqs";
import { MouseEvent, useCallback, useMemo } from "react";
@@ -103,8 +102,6 @@ export const Flow = () => {
useShallow((state) => state.isGraphRunning),
);
- const isBuilderChatEnabled = useGetFlag(Flag.BUILDER_CHAT_PANEL);
-
return (
<div className="flex h-full w-full dark:bg-slate-900">
<div className="relative flex-1">
@@ -153,11 +150,9 @@ export const Flow = () => {
executionId={flowExecutionID || undefined}
graphId={flowID || undefined}
/>
- {isBuilderChatEnabled && (
- <ErrorBoundary context="BuilderChatPanel" fallback={null}>
- <BuilderChatPanel />
- </ErrorBoundary>
- )}
+ <ErrorBoundary context="BuilderChatPanel" fallback={null}>
+ <BuilderChatPanel />
+ </ErrorBoundary>
</div>
);
};
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/__tests__/Flow.test.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/__tests__/Flow.test.tsx
index 31eccb6aad..dfd83ac34a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/__tests__/Flow.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/__tests__/Flow.test.tsx
@@ -75,11 +75,6 @@ vi.mock("../../../../stores/graphStore", () => ({
selector(graphState),
}));
-vi.mock("@/services/feature-flags/use-get-flag", () => ({
- Flag: { BUILDER_CHAT_PANEL: "builder-chat-panel" },
- useGetFlag: () => false,
-}));
-
vi.mock("@/app/api/__generated__/endpoints/graphs/graphs", () => ({
useGetV1GetSpecificGraph: () => ({ data: { id: "graph-1" } }),
}));
@@ -146,6 +141,11 @@ describe("Flow read-only gating", () => {
mockHasWebhookNodes = false;
});
+ test("builder chat is available without a feature flag", () => {
+ render(<Flow />);
+ expect(screen.getByTestId("builder-chat")).toBeDefined();
+ });
+
test("owned graph: shows builder actions, hides read-only banner, controls editable", () => {
render(<Flow />);
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx
index 4fde37632f..1c73137543 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx
@@ -42,7 +42,6 @@ const ContextPanel = dynamic(
export function CopilotPage() {
const [droppedFiles, setDroppedFiles] = useState<File[]>([]);
const isMobile = useIsMobile();
- const isArtifactsEnabled = useGetFlag(Flag.ARTIFACTS);
// The brain-dump experience swaps the dotted backdrop + notification
// opt-in dialog for the quieter greeting surface (banner to follow).
const isBrainDumpEnabled = useGetFlag(Flag.ONBOARDING_BRAIN_DUMP);
@@ -91,17 +90,14 @@ export function CopilotPage() {
{!isMobile && !showNewLayout && <ChatSidebar />}
<MainArea
isMobile={isMobile}
- isArtifactsEnabled={isArtifactsEnabled}
showNewLayout={showNewLayout}
isBrainDumpEnabled={Boolean(isBrainDumpEnabled)}
sessionId={sessionId}
droppedFiles={droppedFiles}
setDroppedFiles={setDroppedFiles}
/>
- {isMobile && isArtifactsEnabled && sessionId && (
- <ContextPanel sessionId={sessionId} mobile />
- )}
- {isMobile && isArtifactsEnabled && <ArtifactPanel mobile />}
+ {isMobile && sessionId && <ContextPanel sessionId={sessionId} mobile />}
+ {isMobile && <ArtifactPanel mobile />}
{isMobile && !showNewLayout && <MobileDrawer />}
{!isBrainDumpEnabled && <NotificationDialog />}
<CopilotModals />
@@ -111,7 +107,6 @@ export function CopilotPage() {
interface MainAreaProps {
isMobile: boolean;
- isArtifactsEnabled: boolean;
showNewLayout: boolean;
isBrainDumpEnabled: boolean;
sessionId: string | null;
@@ -121,7 +116,6 @@ interface MainAreaProps {
function MainArea({
isMobile,
- isArtifactsEnabled,
showNewLayout,
isBrainDumpEnabled,
sessionId,
@@ -167,18 +161,14 @@ function MainArea({
/>
{/* Owns the session-entry reset that forgets the previous chat's
artifact. */}
- {isArtifactsEnabled && (
- <ContextPanelAutoOpen
- key={`context-auto-open-${sessionId ?? "new"}`}
- sessionId={sessionId}
- />
- )}
+ <ContextPanelAutoOpen
+ key={`context-auto-open-${sessionId ?? "new"}`}
+ sessionId={sessionId}
+ />
</FileDropZone>
</div>
- {!isMobile && isArtifactsEnabled && sessionId && (
- <ContextPanel sessionId={sessionId} />
- )}
- {!isMobile && isArtifactsEnabled && sessionId && (
+ {!isMobile && sessionId && <ContextPanel sessionId={sessionId} />}
+ {!isMobile && sessionId && (
<ArtifactPanel hasExternalClose sessionId={sessionId} />
)}
</div>
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/CopilotPage.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/CopilotPage.test.tsx
index 9566accb3a..a0bf087811 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/CopilotPage.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/CopilotPage.test.tsx
@@ -87,16 +87,13 @@ vi.mock("@/app/api/__generated__/endpoints/chat/chat", () => ({
vi.mock("@/hooks/useCredits", () => ({
default: () => ({ credits: null, fetchCredits: vi.fn() }),
}));
-const flagState = vi.hoisted(() => ({ artifacts: false }));
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
TASK_PROGRESS_BAR: "TASK_PROGRESS_BAR",
},
- useGetFlag: (flag: string) =>
- flag === "ARTIFACTS" ? flagState.artifacts : false,
+ useGetFlag: () => false,
}));
// Auth check moved into CopilotPage directly — default to a logged-in
@@ -161,13 +158,11 @@ afterEach(() => {
}));
mockSessionIdForQueryState = null;
viewportState.isMobile = false;
- flagState.artifacts = false;
});
describe("CopilotPage context panel reset", () => {
it("forgets the previous chat's artifact on session entry even on mobile", async () => {
viewportState.isMobile = true;
- flagState.artifacts = true;
mockSessionIdForQueryState = "session-b";
mockUseCopilotPage.mockReturnValue({
...basePageState,
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-content.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-content.test.tsx
index b37b609cff..740cdd7c88 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-content.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-content.test.tsx
@@ -47,7 +47,6 @@ vi.mock("@/lib/auth/hooks/useAuth", () => ({
// single, predictable Submit button.
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
},
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-errors.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-errors.test.tsx
index 85f2465a52..de17987256 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-errors.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-errors.test.tsx
@@ -55,7 +55,6 @@ const flagState = vi.hoisted(() => ({ experts: false }));
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
HIRE_EXPERTS: "HIRE_EXPERTS",
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-lifecycle.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-lifecycle.test.tsx
index acf54a78b6..c34705e3e0 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-lifecycle.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/autopilot-lifecycle.test.tsx
@@ -40,7 +40,6 @@ vi.mock("@/lib/auth/hooks/useAuth", () => ({
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
},
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/compaction-progress.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/compaction-progress.test.tsx
index 9253fc7ec3..b156f9f1b8 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/compaction-progress.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/compaction-progress.test.tsx
@@ -46,7 +46,6 @@ vi.mock("@/lib/auth/hooks/useAuth", () => ({
// single, predictable Submit button.
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
},
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/low-credit-banner.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/low-credit-banner.test.tsx
index dc3fd4ef89..966705f57a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/low-credit-banner.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/low-credit-banner.test.tsx
@@ -91,7 +91,7 @@ vi.mock("nuqs", () => ({
}));
// Billing must be on for the provider to derive `isOutOfCredits`; keep the
-// real `Flag` enum so the page's other flag reads (e.g. ARTIFACTS) resolve.
+// real `Flag` enum so the page's other flag reads resolve.
vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {
const actual =
await importActual<
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/useCopilotStream.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/useCopilotStream.test.tsx
index 10481e5947..a508673938 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/useCopilotStream.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/useCopilotStream.test.tsx
@@ -42,7 +42,6 @@ vi.mock("@/lib/auth/hooks/useAuth", () => ({
vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
- ARTIFACTS: "ARTIFACTS",
CHAT_MODE_OPTION: "CHAT_MODE_OPTION",
ENABLE_PLATFORM_PAYMENT: "ENABLE_PLATFORM_PAYMENT",
},
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx
index c0c8e269bd..81ef04cfea 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx
@@ -151,7 +151,6 @@ export const ChatContainer = ({
isKickoffStarting,
hasFloatingControls,
}: ChatContainerProps) => {
- const isArtifactsEnabled = useGetFlag(Flag.ARTIFACTS);
const isTaskBarEnabled = useGetFlag(Flag.TASK_PROGRESS_BAR);
// The composer and the message column only slide aside while the floating
// files card is shown; this host is the one that mounts the card.
@@ -160,7 +159,6 @@ export const ChatContainer = ({
sessionId,
messages,
isLoadingSession,
- isArtifactsEnabled,
});
// isStreaming controls the stop-button UI and routes submits to the queue
// endpoint — the input itself must NOT be disabled during streaming so users
@@ -299,14 +297,10 @@ export const ChatContainer = ({
can span edge to edge while staying aligned with the messages. */}
{sessionId ? (
<div className="relative flex h-full min-h-0 w-full flex-col bg-[#fafafa]">
- {isArtifactsEnabled && (
- <>
- <div className="absolute right-0 top-0 z-30">
- <ContextPanelToggle sessionId={sessionId} />
- </div>
- <WorkspaceFileCards sessionId={sessionId} />
- </>
- )}
+ <div className="absolute right-0 top-0 z-30">
+ <ContextPanelToggle sessionId={sessionId} />
+ </div>
+ <WorkspaceFileCards sessionId={sessionId} />
<ChatMessagesContainer
messages={messages}
status={status}
@@ -329,7 +323,7 @@ export const ChatContainer = ({
expertIdentity={expertIdentity}
isResolvingExpertIdentity={isResolvingExpertIdentity}
hasFloatingControls={hasFloatingControls}
- canOpenActivity={isArtifactsEnabled}
+ canOpenActivity
areFilesOpen={areFilesOpen}
/>
{archivedExpertIdentity ? (
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/ChatContainer.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/ChatContainer.test.tsx
index c7d5a3a85c..d5fe5e2443 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/ChatContainer.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/ChatContainer.test.tsx
@@ -15,7 +15,6 @@ import { ChatContainer } from "../ChatContainer";
import { useCopilotUIStore } from "../../../store";
const mockIsUsageLimitReached = vi.fn();
-const mockArtifactsEnabled = vi.fn(() => false);
const clipboardWrite = vi.fn(async (_text: string) => {});
const ARTIFACT_A_ID = "11111111-0000-0000-0000-000000000000";
@@ -112,10 +111,8 @@ vi.mock("@/app/(platform)/copilot/components/ChatInput/ChatInput", () => ({
}));
vi.mock("@/services/feature-flags/use-get-flag", () => ({
- Flag: {
- ARTIFACTS: "ARTIFACTS",
- },
- useGetFlag: () => mockArtifactsEnabled(),
+ Flag: { TASK_PROGRESS_BAR: "TASK_PROGRESS_BAR" },
+ useGetFlag: () => false,
}));
vi.mock("../../ChatMessagesContainer/ChatMessagesContainer", () => ({
@@ -195,7 +192,6 @@ const baseProps = {
describe("ChatContainer", () => {
beforeEach(() => {
mockIsUsageLimitReached.mockReturnValue(false);
- mockArtifactsEnabled.mockReturnValue(false);
mockShareState({ is_shared: false });
resetCopilotStore();
Object.defineProperty(navigator, "clipboard", {
@@ -344,8 +340,6 @@ describe("ChatContainer", () => {
}
it("does not auto-open the artifact panel on initial render", () => {
- mockArtifactsEnabled.mockReturnValue(true);
-
render(<ChatContainer {...baseProps} />);
expect(useCopilotUIStore.getState().artifactPanel.isOpen).toBe(false);
@@ -353,8 +347,6 @@ describe("ChatContainer", () => {
});
it("does not auto-open when rerendering within the same session", () => {
- mockArtifactsEnabled.mockReturnValue(true);
-
const { rerender } = render(<ChatContainer {...baseProps} />);
rerender(<ChatContainer {...baseProps} />);
@@ -363,7 +355,6 @@ describe("ChatContainer", () => {
});
it("clears the artifact preview when sessionId changes", () => {
- mockArtifactsEnabled.mockReturnValue(true);
useCopilotUIStore
.getState()
.openArtifact(makeArtifact(ARTIFACT_A_ID, "a.txt"));
@@ -391,7 +382,6 @@ describe("ChatContainer", () => {
});
it("does not carry a stale back stack into the next session", () => {
- mockArtifactsEnabled.mockReturnValue(true);
useCopilotUIStore
.getState()
.openArtifact(makeArtifact(ARTIFACT_A_ID, "a.txt"));
@@ -412,7 +402,6 @@ describe("ChatContainer", () => {
});
it("clears artifact preview on unmount so nav-away cannot resurrect it (SECRT-2254)", () => {
- mockArtifactsEnabled.mockReturnValue(true);
useCopilotUIStore
.getState()
.openArtifact(makeArtifact(ARTIFACT_A_ID, "a.txt"));
@@ -432,7 +421,6 @@ describe("ChatContainer", () => {
});
it("does not re-open a panel whose store state is stale on fresh mount (SECRT-2220)", () => {
- mockArtifactsEnabled.mockReturnValue(true);
useCopilotUIStore.setState({
artifactPanel: {
isOpen: true,
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.test.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.test.ts
index a2dc892129..916af73d6a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.test.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.test.ts
@@ -44,7 +44,6 @@ const defaultProps = {
sessionId: "s1",
messages: [] as Messages,
isLoadingSession: false,
- isArtifactsEnabled: true,
};
describe("useAutoOpenArtifacts (card-based)", () => {
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.ts
index d382682273..d9635f972e 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.ts
@@ -8,7 +8,6 @@ interface UseAutoOpenArtifactsOptions {
sessionId: string | null;
messages: UIMessage<unknown, UIDataTypes, UITools>[];
isLoadingSession: boolean;
- isArtifactsEnabled: boolean;
}
/**
@@ -29,7 +28,6 @@ export function useAutoOpenArtifacts({
sessionId,
messages,
isLoadingSession,
- isArtifactsEnabled,
}: UseAutoOpenArtifactsOptions) {
const resetArtifactPanel = useCopilotUIStore((s) => s.resetArtifactPanel);
const resetAutoOpenState = useCopilotUIStore((s) => s.resetAutoOpenState);
@@ -81,16 +79,10 @@ export function useAutoOpenArtifacts({
wasEverLoadingRef.current = true;
return;
}
- if (!sessionId || !isArtifactsEnabled) return;
+ if (!sessionId) return;
if (wasEverLoadingRef.current && !hasMessages) return;
setAutoOpenReady();
- }, [
- sessionId,
- isLoadingSession,
- isArtifactsEnabled,
- hasMessages,
- setAutoOpenReady,
- ]);
+ }, [sessionId, isLoadingSession, hasMessages, setAutoOpenReady]);
// Reset on unmount so navigating away from /copilot can't leave stale state.
useEffect(() => {
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx
index 7b5e6f6874..fce266a514 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx
@@ -700,7 +700,6 @@ export function ChatMessagesContainer({
isCurrentlyStreaming={isCurrentlyStreaming}
onRetry={isLastAssistant ? onRetry : undefined}
fileUrlBuilder={fileUrlBuilder}
- forceArtifacts={readOnly}
readOnly={readOnly}
compactionPhase={compactionPhase}
liveCompactionCallId={liveCompactionCallId}
@@ -719,7 +718,6 @@ export function ChatMessagesContainer({
messageID={message.id}
partIndex={i}
fileUrlBuilder={fileUrlBuilder}
- forceArtifacts={readOnly}
readOnly={readOnly}
compactionPhase={compactionPhase}
liveCompactionCallId={liveCompactionCallId}
@@ -784,7 +782,6 @@ export function ChatMessagesContainer({
<MessageAttachments
files={fileParts}
isUser={message.role === "user"}
- forceArtifacts={readOnly}
filePattern={filePattern}
readOnly={readOnly}
/>
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ChainMessageParts.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ChainMessageParts.tsx
index 4fdc1b4e1f..26adccab41 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ChainMessageParts.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ChainMessageParts.tsx
@@ -15,7 +15,6 @@ interface Props {
isCurrentlyStreaming: boolean;
onRetry?: () => void;
fileUrlBuilder?: (fileId: string) => string;
- forceArtifacts?: boolean;
readOnly?: boolean;
compactionPhase?: CompactionPhase | null;
liveCompactionCallId?: string | null;
@@ -28,7 +27,6 @@ export function ChainMessageParts({
isCurrentlyStreaming,
onRetry,
fileUrlBuilder,
- forceArtifacts,
readOnly,
compactionPhase,
liveCompactionCallId,
@@ -70,7 +68,6 @@ export function ChainMessageParts({
partIndex={segment.index}
onRetry={onRetry}
fileUrlBuilder={fileUrlBuilder}
- forceArtifacts={forceArtifacts}
readOnly={readOnly}
compactionPhase={compactionPhase}
liveCompactionCallId={liveCompactionCallId}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessageAttachments.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessageAttachments.tsx
index b27b43aa5f..e594025d85 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessageAttachments.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessageAttachments.tsx
@@ -1,4 +1,3 @@
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import type { FileUIPart } from "ai";
import {
globalRegistry,
@@ -19,11 +18,6 @@ import { Icon } from "@/components/atoms/Icon/Icon";
interface Props {
files: FileUIPart[];
isUser?: boolean;
- /** Force the artifact-card rendering path regardless of the
- * ``ARTIFACTS`` flag. The public share viewer passes this so
- * anonymous readers always get the rich treatment — the flag
- * defaults off and we don't want it to gate the viewer UX. */
- forceArtifacts?: boolean;
/** URL→file-ID pattern used by ``filePartToArtifactRef``. Owner
* side defaults to the workspace-file URL shape; the public viewer
* passes a per-token pattern from ``lib/share/routes.ts``. */
@@ -54,32 +48,27 @@ function renderFileContent(file: FileUIPart): React.ReactNode | null {
export function MessageAttachments({
files,
isUser,
- forceArtifacts,
filePattern,
readOnly,
}: Props) {
- const isArtifactsFlagEnabled = useGetFlag(Flag.ARTIFACTS);
- const isArtifactsEnabled = forceArtifacts || isArtifactsFlagEnabled;
if (files.length === 0) return null;
return (
<div className="mt-2 flex flex-col gap-2">
{files.map((file, i) => {
- if (isArtifactsEnabled) {
- const artifactRef = filePartToArtifactRef(
- file,
- isUser ? "user-upload" : "agent",
- filePattern,
+ const artifactRef = filePartToArtifactRef(
+ file,
+ isUser ? "user-upload" : "agent",
+ filePattern,
+ );
+ if (artifactRef) {
+ return (
+ <ArtifactCard
+ key={`artifact-${artifactRef.id}-${i}`}
+ artifact={artifactRef}
+ readOnly={readOnly}
+ />
);
- if (artifactRef) {
- return (
- <ArtifactCard
- key={`artifact-${artifactRef.id}-${i}`}
- artifact={artifactRef}
- readOnly={readOnly}
- />
- );
- }
}
const rendered = renderFileContent(file);
return rendered ? (
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx
index 69f02b82e4..a65e56c1ea 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx
@@ -1,6 +1,5 @@
import { MessageResponse } from "@/components/ai-elements/message";
import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { StoppedTaskCard } from "./StoppedTaskCard";
import { ToolUIPart, UIDataTypes, UIMessage, UITools } from "ai";
import { ArtifactCard } from "../../ArtifactCard/ArtifactCard";
@@ -84,16 +83,12 @@ const STREAMDOWN_COMPONENTS = { img: WorkspaceMediaImage };
function TextWithArtifactCards({
text,
fileUrlBuilder,
- forceArtifacts,
readOnly,
}: {
text: string;
fileUrlBuilder?: (fileId: string) => string;
- forceArtifacts?: boolean;
readOnly?: boolean;
}) {
- const isArtifactsFlagEnabled = useGetFlag(Flag.ARTIFACTS);
- const isArtifactsEnabled = forceArtifacts || isArtifactsFlagEnabled;
const artifacts = extractWorkspaceArtifacts(text, fileUrlBuilder);
const resolved = resolveWorkspaceUrls(text, fileUrlBuilder);
@@ -106,7 +101,7 @@ function TextWithArtifactCards({
>
{resolved}
</MessageResponse>
- {isArtifactsEnabled && artifacts.length > 0 && (
+ {artifacts.length > 0 && (
<div className="mt-2 grid grid-cols-1 gap-1 sm:grid-cols-2">
{artifacts.map((artifact) => (
<ArtifactCard
@@ -131,9 +126,6 @@ interface Props {
* the public share viewer passes a token-aware builder so anonymous
* readers can download via the public allowlist-gated route. */
fileUrlBuilder?: (fileId: string) => string;
- /** Force inline artifact-card rendering for workspace:// URIs in
- * prose, regardless of the ``ARTIFACTS`` LD flag. */
- forceArtifacts?: boolean;
/** Read-only mode — forwarded so embedded ``ArtifactCard``s
* download on click instead of opening a panel. */
readOnly?: boolean;
@@ -161,7 +153,6 @@ export function MessagePartRenderer({
partIndex,
onRetry,
fileUrlBuilder,
- forceArtifacts,
readOnly,
compactionPhase,
liveCompactionCallId,
@@ -228,7 +219,6 @@ export function MessagePartRenderer({
key={key}
text={cleanText}
fileUrlBuilder={fileUrlBuilder}
- forceArtifacts={forceArtifacts}
readOnly={readOnly}
/>
);
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx
index bc5cc697ce..9eaa751b7a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx
@@ -3,8 +3,7 @@
import { Icon } from "@/components/atoms/Icon/Icon";
import { Message, MessageContent } from "@/components/ai-elements/message";
import { cn } from "@/lib/utils";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
-import { File02Icon, Loading03Icon } from "@hugeicons/core-free-icons";
+import { Loading03Icon } from "@hugeicons/core-free-icons";
import type {
PendingUploadAttachment,
PendingUploadSend,
@@ -74,30 +73,6 @@ function PendingArtifactCard({ attachment }: CardProps) {
);
}
-function PendingFileCard({ attachment }: CardProps) {
- return (
- <div className="min-w-0 rounded-lg border border-purple-300 bg-purple-100 p-3">
- <div className="flex items-center gap-2">
- <Icon icon={File02Icon} className="h-5 w-5 shrink-0 text-neutral-400" />
- <div className="min-w-0 flex-1">
- <p className="truncate text-sm font-medium text-zinc-800">
- {attachment.name}
- </p>
- <p className="mt-0.5 truncate font-mono text-xs text-zinc-800">
- {attachment.mediaType || "file"}
- </p>
- </div>
- {attachment.isUploading && (
- <Icon
- icon={Loading03Icon}
- className="h-4 w-4 shrink-0 animate-spin text-purple-400"
- />
- )}
- </div>
- </div>
- );
-}
-
/**
* Optimistic stand-in for a user message whose local attachments are still
* uploading. Mirrors the real bubble and attachment cards so the swap to the
@@ -105,7 +80,6 @@ function PendingFileCard({ attachment }: CardProps) {
* the backend's own status lines ("Preparing workspace…") appear next.
*/
export function PendingUploadMessage({ pendingSend, isCompact }: Props) {
- const isArtifactsEnabled = useGetFlag(Flag.ARTIFACTS);
const { elapsedSeconds } = useElapsedTimer(true);
const label = uploadStatusLabel(pendingSend.attachments);
@@ -133,19 +107,12 @@ export function PendingUploadMessage({ pendingSend, isCompact }: Props) {
)}
{pendingSend.attachments.length > 0 && (
<div className="mt-2 flex flex-col gap-2">
- {pendingSend.attachments.map((attachment, i) =>
- isArtifactsEnabled ? (
- <PendingArtifactCard
- key={`${attachment.name}-${i}`}
- attachment={attachment}
- />
- ) : (
- <PendingFileCard
- key={`${attachment.name}-${i}`}
- attachment={attachment}
- />
- ),
- )}
+ {pendingSend.attachments.map((attachment, i) => (
+ <PendingArtifactCard
+ key={`${attachment.name}-${i}`}
+ attachment={attachment}
+ />
+ ))}
</div>
)}
</Message>
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx
index 1680190673..0876241c32 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx
@@ -11,7 +11,6 @@ import {
TooltipTrigger,
} from "@/components/atoms/Tooltip/BaseTooltip";
import { cn } from "@/lib/utils";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { ClockIcon, File02Icon, PlayIcon } from "@hugeicons/core-free-icons";
import { useCopilotUIStore } from "../../../store";
import type { ExpertIdentity } from "../../../useExpertMap";
@@ -67,14 +66,11 @@ export function ThreadHeader({
const identityLabel = isResolving
? "Loading expert"
: `${name}, ${roleLabel}`;
- const isArtifactsEnabled = useGetFlag(Flag.ARTIFACTS);
// Only the copilot chat mounts the activity card. The builder and memory
// panels pass a live sessionId and aren't read-only, so without the host's
// own say-so the chip would render a button whose click writes panel state
// and fetches a file list for a card that never appears.
- const isInteractive = Boolean(
- canOpenActivity && isArtifactsEnabled && !readOnly && sessionId,
- );
+ const isInteractive = Boolean(canOpenActivity && !readOnly && sessionId);
const toggleContextPanelTab = useCopilotUIStore(
(s) => s.toggleContextPanelTab,
);
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessageAttachments.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessageAttachments.test.tsx
new file mode 100644
index 0000000000..efd65dee09
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessageAttachments.test.tsx
@@ -0,0 +1,49 @@
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { cleanup, render, screen } from "@testing-library/react";
+import type { FileUIPart } from "ai";
+import { MessageAttachments } from "../MessageAttachments";
+
+vi.mock("../../../../components/ArtifactCard/ArtifactCard", () => ({
+ ArtifactCard: () => <div data-testid="artifact-card" />,
+}));
+
+const FILE_ID = "550e8400-e29b-41d4-a716-446655440000";
+
+function filePart(url: string, filename = "report.pdf"): FileUIPart {
+ return {
+ type: "file",
+ url,
+ filename,
+ mediaType: "application/pdf",
+ } as FileUIPart;
+}
+
+describe("MessageAttachments", () => {
+ afterEach(() => {
+ cleanup();
+ });
+
+ it("renders nothing for an empty file list", () => {
+ const { container } = render(<MessageAttachments files={[]} />);
+ expect(container.firstChild).toBeNull();
+ });
+
+ it("renders ArtifactCards without a feature flag", () => {
+ render(
+ <MessageAttachments
+ files={[filePart(`/api/proxy/api/workspace/files/${FILE_ID}/download`)]}
+ />,
+ );
+ expect(screen.getByTestId("artifact-card")).toBeDefined();
+ });
+
+ it("falls back to the file card for non-workspace files", () => {
+ render(
+ <MessageAttachments
+ files={[filePart("https://example.com/file.txt", "file.txt")]}
+ isUser
+ />,
+ );
+ expect(screen.getByText("file.txt")).toBeDefined();
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessagePartRenderer.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessagePartRenderer.test.tsx
index b8cfac0668..255985b03e 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessagePartRenderer.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/MessagePartRenderer.test.tsx
@@ -45,11 +45,6 @@ vi.mock("@/components/molecules/ErrorCard/ErrorCard", () => ({
ErrorCard: () => null,
}));
-vi.mock("@/services/feature-flags/use-get-flag", () => ({
- Flag: { ARTIFACTS: "artifacts" },
- useGetFlag: () => false,
-}));
-
vi.mock("../StoppedTaskCard", () => ({
StoppedTaskCard: () => <div data-testid="stopped-task-card" />,
}));
@@ -223,20 +218,13 @@ describe("MessagePartRenderer text branch", () => {
expect(container.querySelectorAll("img")).toHaveLength(1);
});
- it("renders inline ArtifactCards when artifacts are forced on", () => {
+ it("renders inline ArtifactCards without a feature flag", () => {
const fileId = "550e8400-e29b-41d4-a716-446655440000";
const part = {
type: "text",
text: `Here is [report](workspace://${fileId}).`,
} as unknown as Part;
- render(
- <MessagePartRenderer
- part={part}
- messageID="m1"
- partIndex={0}
- forceArtifacts
- />,
- );
+ render(<MessagePartRenderer part={part} messageID="m1" partIndex={0} />);
expect(screen.getByTestId("artifact-card")).toBeDefined();
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/PendingUploadMessage.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/PendingUploadMessage.test.tsx
index 925cc43382..133e1c5bc4 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/PendingUploadMessage.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/__tests__/PendingUploadMessage.test.tsx
@@ -5,20 +5,6 @@ import {
PendingUploadMessage,
} from "../PendingUploadMessage";
-const flagState = vi.hoisted(() => ({ artifacts: false }));
-
-vi.mock("@/services/feature-flags/use-get-flag", async (importOriginal) => {
- const actual =
- await importOriginal<
- typeof import("@/services/feature-flags/use-get-flag")
- >();
- return {
- ...actual,
- useGetFlag: (flag: string) =>
- flag === actual.Flag.ARTIFACTS ? flagState.artifacts : false,
- };
-});
-
vi.mock("../ThinkingIndicator", () => ({
ThinkingIndicator: ({ statusMessage }: { statusMessage?: string | null }) => (
<div data-testid="thinking-indicator">{statusMessage}</div>
@@ -49,12 +35,10 @@ const attachments = [
afterEach(() => {
cleanup();
- flagState.artifacts = false;
});
describe("PendingUploadMessage", () => {
- it("renders artifact-style cards with kind and size when artifacts are on", () => {
- flagState.artifacts = true;
+ it("renders artifact-style cards with kind and size", () => {
render(
<PendingUploadMessage
pendingSend={{ text: "look at these", attachments }}
@@ -72,13 +56,6 @@ describe("PendingUploadMessage", () => {
);
});
- it("falls back to plain file cards showing the media type when artifacts are off", () => {
- render(<PendingUploadMessage pendingSend={{ text: "", attachments }} />);
-
- expect(screen.getByText("application/pdf")).toBeDefined();
- expect(screen.getByText("text/markdown")).toBeDefined();
- });
-
it("carries the message id the tail spacer measures", () => {
render(<PendingUploadMessage pendingSend={{ text: "hi", attachments }} />);
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
index dc9e376fb2..8bcb428793 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
@@ -93,7 +93,6 @@ export function ChatSidebar() {
const [sharingSessionId, setSharingSessionId] = useState<string | null>(null);
const renameInputRef = useRef<HTMLInputElement>(null);
const renameCancelledRef = useRef(false);
- const chatSharingEnabled = useGetFlag(Flag.CHAT_SHARING);
const isPinningEnabled = useGetFlag(Flag.CHAT_PINNING);
const isExpertsEnabled = useGetFlag(Flag.HIRE_EXPERTS);
const { expertsById } = useExpertMap();
@@ -271,7 +270,6 @@ export function ChatSidebar() {
isExporting={exportingSessionIds.has(session.id)}
isDeleting={isDeleting}
isPinningEnabled={isPinningEnabled}
- isSharingEnabled={chatSharingEnabled}
showProcessing={
!!session.is_processing &&
shouldShowSessionProcessingIndicator({
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ChatSessionRow/ChatSessionRow.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ChatSessionRow/ChatSessionRow.tsx
index d83097eb98..52480f4fd1 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ChatSessionRow/ChatSessionRow.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ChatSessionRow/ChatSessionRow.tsx
@@ -35,7 +35,6 @@ interface Props {
isExporting: boolean;
isDeleting: boolean;
isPinningEnabled: boolean;
- isSharingEnabled: boolean;
showProcessing: boolean;
showCompleted: boolean;
onSelect: () => void;
@@ -59,7 +58,6 @@ export function ChatSessionRow({
isExporting,
isDeleting,
isPinningEnabled,
- isSharingEnabled,
showProcessing,
showCompleted,
onSelect,
@@ -200,12 +198,10 @@ export function ChatSessionRow({
)}
{isExporting ? "Exporting…" : "Export chat"}
</DropdownMenuItem>
- {isSharingEnabled && (
- <DropdownMenuItem onClick={onShare}>
- <Icon icon={Share03Icon} className="mr-2 h-4 w-4" />
- Share chat
- </DropdownMenuItem>
- )}
+ <DropdownMenuItem onClick={onShare}>
+ <Icon icon={Share03Icon} className="mr-2 h-4 w-4" />
+ Share chat
+ </DropdownMenuItem>
<DropdownMenuItem
onClick={onDelete}
disabled={isDeleting}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx
index 3292d3b449..241e337b7a 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx
@@ -14,7 +14,7 @@ vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {
>();
return {
...actual,
- useGetFlag: (flag: string) => flag === actual.Flag.AGENT_BRIEFING,
+ useGetFlag: () => false,
};
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx
index a6cdbd139d..8e6c8a5a0b 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx
@@ -16,8 +16,7 @@ vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {
>();
return {
...actual,
- useGetFlag: (flag: string) =>
- flag === actual.Flag.HIRE_EXPERTS || flag === actual.Flag.AGENT_BRIEFING,
+ useGetFlag: (flag: string) => flag === actual.Flag.HIRE_EXPERTS,
};
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/MobileHeader/MobileHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/MobileHeader/MobileHeader.tsx
index 44b4768de6..95f98c0574 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/MobileHeader/MobileHeader.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/MobileHeader/MobileHeader.tsx
@@ -1,6 +1,5 @@
import { Button } from "@/components/atoms/Button/Button";
import { NAVBAR_HEIGHT_PX } from "@/lib/constants";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { useCopilotUIStore } from "../../store";
import { Folder01Icon, Menu01Icon } from "@hugeicons/core-free-icons";
import { Icon } from "@/components/atoms/Icon/Icon";
@@ -8,7 +7,6 @@ import { Icon } from "@/components/atoms/Icon/Icon";
export function MobileHeader() {
const setDrawerOpen = useCopilotUIStore((s) => s.setDrawerOpen);
const toggleContextPanel = useCopilotUIStore((s) => s.toggleContextPanel);
- const isContextPanelEnabled = useGetFlag(Flag.ARTIFACTS);
return (
<div
className="fixed z-50 flex gap-2"
@@ -23,17 +21,15 @@ export function MobileHeader() {
>
<Icon icon={Menu01Icon} width="1.25rem" height="1.25rem" />
</Button>
- {isContextPanelEnabled && (
- <Button
- variant="icon"
- size="icon"
- aria-label="Open workspace files"
- onClick={toggleContextPanel}
- className="bg-white shadow-md"
- >
- <Icon icon={Folder01Icon} width="1.25rem" height="1.25rem" />
- </Button>
- )}
+ <Button
+ variant="icon"
+ size="icon"
+ aria-label="Open workspace files"
+ onClick={toggleContextPanel}
+ className="bg-white shadow-md"
+ >
+ <Icon icon={Folder01Icon} width="1.25rem" height="1.25rem" />
+ </Button>
</div>
);
}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/ExpertCards.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/ExpertCards.tsx
index 5ad4f307dd..0b934f2409 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/ExpertCards.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/ExpertCards.tsx
@@ -19,7 +19,6 @@ import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";
import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";
import { toast } from "@/components/molecules/Toast/use-toast";
import { cn } from "@/lib/utils";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { GenericTool } from "../../tools/GenericTool/GenericTool";
import { type ArtifactRef, useCopilotUIStore } from "../../store";
import { describeSendFailure } from "../ChatInput/helpers";
@@ -179,7 +178,7 @@ export function ExpertChangeCard({
}: Props) {
const [showCharter, setShowCharter] = useState(false);
const openArtifact = useCopilotUIStore((s) => s.openArtifact);
- const panelAvailable = useGetFlag(Flag.ARTIFACTS) && !!artifactId;
+ const panelAvailable = !!artifactId;
const expert = asObject(output.expert) ?? asObject(output.preview);
if (!expert) return null;
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/__tests__/ExpertCards.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/__tests__/ExpertCards.test.tsx
index 526c201374..0f53bb4a50 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/__tests__/ExpertCards.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolChain/__tests__/ExpertCards.test.tsx
@@ -29,12 +29,6 @@ vi.mock("../../../tools/GenericTool/GenericTool", () => ({
const onSend = vi.fn();
-const artifactsFlag = { enabled: false };
-vi.mock("@/services/feature-flags/use-get-flag", () => ({
- Flag: { ARTIFACTS: "artifacts" },
- useGetFlag: () => artifactsFlag.enabled,
-}));
-
function row(tool: string, output: unknown): ChainRow {
return {
key: tool,
@@ -48,7 +42,6 @@ function row(tool: string, output: unknown): ChainRow {
describe("expert change cards", () => {
afterEach(() => {
- artifactsFlag.enabled = false;
useCopilotUIStore.getState().resetArtifactPanel();
});
@@ -85,7 +78,6 @@ describe("expert change cards", () => {
});
it("opens the full charter in the side panel from Show more", async () => {
- artifactsFlag.enabled = true;
const user = userEvent.setup();
render(
<ExpertChangeCard
@@ -166,7 +158,6 @@ describe("expert change cards", () => {
});
it("always offers Details when the panel is available", () => {
- artifactsFlag.enabled = true;
render(
<ExpertChangeCard
artifactId="call-1"
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/WorkspaceFilesTrigger.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/WorkspaceFilesTrigger.tsx
index 3e86baa371..65719eee69 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/WorkspaceFilesTrigger.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/WorkspaceFilesTrigger.tsx
@@ -1,7 +1,6 @@
"use client";
import { Button } from "@/components/ui/button";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { Icon } from "@/components/atoms/Icon/Icon";
import { Folder01Icon } from "@hugeicons/core-free-icons";
import { useCopilotUIStore } from "../../store";
@@ -14,9 +13,6 @@ interface Props {
// SidebarTrigger's ghost styling (no border, no shadow).
export function WorkspaceFilesTrigger({ className }: Props) {
const toggleContextPanel = useCopilotUIStore((s) => s.toggleContextPanel);
- const isContextPanelEnabled = useGetFlag(Flag.ARTIFACTS);
-
- if (!isContextPanelEnabled) return null;
return (
<Button
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/__tests__/WorkspaceFilesTrigger.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/__tests__/WorkspaceFilesTrigger.test.tsx
index f66640d64a..867b249be1 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/__tests__/WorkspaceFilesTrigger.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFilesTrigger/__tests__/WorkspaceFilesTrigger.test.tsx
@@ -1,47 +1,27 @@
import { render, screen, fireEvent } from "@/tests/integrations/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
-// Only the artifacts flag resolves — querying any other flag returns undefined,
-// so the trigger disappears and the assertions below fail loudly.
-const { artifactsEnabledMock, useGetFlagMock, toggleContextPanelMock } =
- vi.hoisted(() => {
- const artifactsEnabledMock = { current: true };
- return {
- artifactsEnabledMock,
- useGetFlagMock: vi.fn((flag: string) =>
- flag === "artifacts" ? artifactsEnabledMock.current : undefined,
- ),
- toggleContextPanelMock: vi.fn(),
- };
- });
-
-vi.mock("@/services/feature-flags/use-get-flag", async (importOriginal) => {
- const actual =
- await importOriginal<
- typeof import("@/services/feature-flags/use-get-flag")
- >();
- return { ...actual, useGetFlag: useGetFlagMock };
-});
+const { toggleContextPanelMock } = vi.hoisted(() => ({
+ toggleContextPanelMock: vi.fn(),
+}));
vi.mock("../../../store", () => ({
useCopilotUIStore: (selector: (state: unknown) => unknown) =>
selector({ toggleContextPanel: toggleContextPanelMock }),
}));
-import { Flag } from "@/services/feature-flags/use-get-flag";
import { WorkspaceFilesTrigger } from "../WorkspaceFilesTrigger";
describe("WorkspaceFilesTrigger", () => {
beforeEach(() => {
toggleContextPanelMock.mockClear();
- useGetFlagMock.mockClear();
- artifactsEnabledMock.current = true;
});
- it("gates on the artifacts flag specifically", () => {
+ it("offers workspace files without a feature flag", () => {
render(<WorkspaceFilesTrigger />);
-
- expect(useGetFlagMock).toHaveBeenCalledWith(Flag.ARTIFACTS);
+ expect(
+ screen.getByRole("button", { name: /open workspace files/i }),
+ ).toBeDefined();
});
it("toggles the context panel when clicked", () => {
@@ -54,16 +34,6 @@ describe("WorkspaceFilesTrigger", () => {
expect(toggleContextPanelMock).toHaveBeenCalledTimes(1);
});
- it("renders nothing when the artifacts flag is off", () => {
- artifactsEnabledMock.current = false;
-
- render(<WorkspaceFilesTrigger />);
-
- expect(
- screen.queryByRole("button", { name: /open workspace files/i }),
- ).toBeNull();
- });
-
it("forwards className so the header can restyle it", () => {
render(<WorkspaceFilesTrigger className="rounded-full" />);
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/briefing.test.tsx b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/briefing.test.tsx
index e89515e0fd..40ab26982e 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/briefing.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/briefing.test.tsx
@@ -16,7 +16,6 @@ import {
getGetV1ListAllExecutionsMockHandler,
getGetV1UserCostSummaryMockHandler,
} from "@/app/api/__generated__/endpoints/graphs/graphs.msw";
-import { Flag } from "@/services/feature-flags/use-get-flag";
import LibraryPage from "../page";
afterEach(() => {
@@ -29,7 +28,7 @@ vi.mock("@/services/feature-flags/use-get-flag", async () => {
>("@/services/feature-flags/use-get-flag");
return {
...actual,
- useGetFlag: (flag: Flag) => flag === "agent-briefing",
+ useGetFlag: () => false,
};
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/filter.test.tsx b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/filter.test.tsx
index d8329e0deb..3e06d6f4aa 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/filter.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/filter.test.tsx
@@ -13,7 +13,6 @@ import {
getGetV2ListLibraryFoldersResponseMock,
} from "@/app/api/__generated__/endpoints/folders/folders.msw";
import { getGetV1ListAllExecutionsMockHandler } from "@/app/api/__generated__/endpoints/graphs/graphs.msw";
-import { Flag } from "@/services/feature-flags/use-get-flag";
import { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";
import { LibraryAgentList } from "../components/LibraryAgentList/LibraryAgentList";
import { FavoriteAnimationProvider } from "../context/FavoriteAnimationContext";
@@ -24,7 +23,7 @@ vi.mock("@/services/feature-flags/use-get-flag", async () => {
>("@/services/feature-flags/use-get-flag");
return {
...actual,
- useGetFlag: (flag: Flag) => flag === "agent-briefing",
+ useGetFlag: () => false,
};
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/low-credit-banner.test.tsx b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/low-credit-banner.test.tsx
index a5ff0b5b4e..595d300baf 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/__tests__/low-credit-banner.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/__tests__/low-credit-banner.test.tsx
@@ -22,7 +22,7 @@ vi.mock("@/lib/auth/hooks/useAuth", () => ({
}));
// Billing must be on for the provider to derive `isOutOfCredits`; keep the real
-// `Flag` enum so other flags the page reads (e.g. AGENT_BRIEFING) resolve.
+// `Flag` enum so other flags the page reads resolve.
vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {
const actual =
await importActual<
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/components/BriefingTabContent/components/CopilotLibrarySummary.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/components/BriefingTabContent/components/CopilotLibrarySummary.tsx
index 7c57d58d89..e3dc839eca 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/components/BriefingTabContent/components/CopilotLibrarySummary.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/components/BriefingTabContent/components/CopilotLibrarySummary.tsx
@@ -6,11 +6,6 @@ import { Text } from "@/components/atoms/Text/Text";
import Link from "next/link";
export function CopilotLibrarySummary() {
- // Discoverability is already gated by AGENT_BRIEFING at the parent
- // panel — this pill renders only inside AgentBriefingPanel, which is
- // itself flag-gated. No second flag here because the count-based
- // hide below already keeps the pill quiet for users who don't use
- // the feature.
const { data: skillsRes } = useListCopilotSkills(undefined, {
query: { staleTime: 30_000 },
});
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx
index cf783b237d..2f6f61ba2c 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx
@@ -21,7 +21,6 @@ import type { LibraryTab, AgentStatusFilter, FleetSummary } from "../../types";
import { useLibraryAgentList } from "./useLibraryAgentList";
import { AgentBriefingPanel } from "../AgentBriefingPanel/AgentBriefingPanel";
import { LowCreditBanner } from "@/components/layout/TopUpPrompt/LowCreditBanner/LowCreditBanner";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { useAgentStatusMap, getAgentStatus } from "../../hooks/useAgentStatus";
import { ArrowLeft02Icon, FavouriteIcon } from "@hugeicons/core-free-icons";
import { Icon } from "@/components/atoms/Icon/Icon";
@@ -97,7 +96,6 @@ export function LibraryAgentList({
fleetSummary,
briefingAgents,
}: Props) {
- const isAgentBriefingEnabled = useGetFlag(Flag.AGENT_BRIEFING);
const shouldReduceMotion = useReducedMotion();
const activeContainerVariants = shouldReduceMotion
? reducedContainerVariants
@@ -150,8 +148,7 @@ export function LibraryAgentList({
return (
<>
- {isAgentBriefingEnabled &&
- !selectedFolderId &&
+ {!selectedFolderId &&
fleetSummary &&
briefingAgents &&
briefingAgents.length > 0 && (
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
index 0592db3cac..7143a50964 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
@@ -8,7 +8,6 @@ import { useLibraryListPage } from "./components/useLibraryListPage";
import { FavoriteAnimationProvider } from "./context/FavoriteAnimationContext";
import type { LibraryTab, AgentStatusFilter } from "./types";
import { useLibraryFleetSummary } from "./hooks/useLibraryFleetSummary";
-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
import { useLibraryAgents } from "@/hooks/useLibraryAgents/useLibraryAgents";
import { FavouriteIcon, Menu01Icon } from "@hugeicons/core-free-icons";
@@ -23,7 +22,6 @@ export default function LibraryPage() {
const [selectedFolderId, setSelectedFolderId] = useState<string | null>(null);
const [activeTab, setActiveTab] = useState(LIBRARY_TABS[0].id);
const [statusFilter, setStatusFilter] = useState<AgentStatusFilter>("all");
- const isAgentBriefingEnabled = useGetFlag(Flag.AGENT_BRIEFING);
const { agents } = useLibraryAgents();
const fleetSummary = useLibraryFleetSummary(agents);
@@ -58,8 +56,8 @@ export default function LibraryPage() {
onTabChange={handleTabChange}
statusFilter={statusFilter}
onStatusFilterChange={setStatusFilter}
- fleetSummary={isAgentBriefingEnabled ? fleetSummary : undefined}
- briefingAgents={isAgentBriefingEnabled ? agents : undefined}
+ fleetSummary={fleetSummary}
+ briefingAgents={agents}
/>
</main>
<AgentsTabIntro />
diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/memory/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/memory/__tests__/main.test.tsx
index 11f2765a77..b4c67616d6 100644
--- a/autogpt_platform/frontend/src/app/(platform)/settings/memory/__tests__/main.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/settings/memory/__tests__/main.test.tsx
@@ -55,7 +55,6 @@ vi.mock("@/services/feature-flags/use-get-flag", () => ({
Flag: {
GRAPHITI_MEMORY: "graphiti-memory",
HIRE_EXPERTS: "hire-experts",
- ARTIFACTS: "artifacts",
CHAT_MODE_OPTION: "chat-mode-option",
ENABLE_PLATFORM_PAYMENT: "enable-platform-payment",
},
diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.json
index c36699ed23..ad4f11b35d 100644
--- a/autogpt_platform/frontend/src/app/api/openapi.json
+++ b/autogpt_platform/frontend/src/app/api/openapi.json
@@ -4635,7 +4635,7 @@
"post": {
"tags": ["v2", "chat", "share", "chat", "share"],
"summary": "Enable Chat Sharing",
- "description": "Enable sharing for a chat session.\n\nFlag-gated: refuses with 403 when ``chat-sharing`` is off so a stale\nfrontend cannot enable shares post-rollback.",
+ "description": "Enable sharing for a chat session.",
"operationId": "postV2EnableChatSharing",
"security": [{ "HTTPBearerJWT": [] }],
"parameters": [
@@ -4665,7 +4665,6 @@
"401": {
"$ref": "#/components/responses/HTTP401NotAuthenticatedError"
},
- "403": { "description": "Chat sharing is not enabled for this user" },
"404": { "description": "Chat session not found for user" },
"422": {
"description": "Validation Error",
diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx
index 0bea413e2f..8d2b6127a8 100644
--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx
+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx
@@ -15,7 +15,6 @@ import { getNewChatHref, groupSessionsByDate } from "./helpers";
import { useRecentChats } from "./useRecentChats";
export function RecentChats() {
- const chatSharingEnabled = useGetFlag(Flag.CHAT_SHARING);
const chatPinningEnabled = useGetFlag(Flag.CHAT_PINNING);
const isExpertsEnabled = useGetFlag(Flag.HIRE_EXPERTS);
const { expertsById, activeExpertIds } = useExpertMap();
@@ -71,7 +70,6 @@ export function RecentChats() {
onCancelRename={cancelRename}
isExporting={exportingIds.has(session.id)}
isDeleting={isDeleting}
- chatSharingEnabled={chatSharingEnabled}
chatPinningEnabled={chatPinningEnabled}
onPin={togglePin}
onRename={startRename}
diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/RecentChats.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/RecentChats.test.tsx
index cfe49475db..0c3660552c 100644
--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/RecentChats.test.tsx
+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/RecentChats.test.tsx
@@ -13,7 +13,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { useCopilotUIStore } from "@/app/(platform)/copilot/store";
import { RecentChats } from "../RecentChats";
-const mockEnabledFlags = new Set<string>(["chat-sharing"]);
+const mockEnabledFlags = new Set<string>();
vi.mock("@/services/feature-flags/use-get-flag", async (importOriginal) => {
const actual =
diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx
index b613005450..e8002f267b 100644
--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx
+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx
@@ -48,7 +48,6 @@ interface Props {
onCancelRename: () => void;
isExporting: boolean;
isDeleting: boolean;
- chatSharingEnabled: boolean;
chatPinningEnabled: boolean;
onPin: (id: string, isPinned: boolean) => void;
onRename: (id: string, title: string | null | undefined) => void;
@@ -82,7 +81,6 @@ export function RecentChatItem({
onCancelRename,
isExporting,
isDeleting,
- chatSharingEnabled,
chatPinningEnabled,
onPin,
onRename,
@@ -197,12 +195,10 @@ export function RecentChatItem({
)}
{isExporting ? "Exporting…" : "Export chat"}
</DropdownMenuItem>
- {chatSharingEnabled && (
- <DropdownMenuItem onClick={() => onShare(session.id)}>
- <Icon icon={Share03Icon} className="mr-2 h-4 w-4" />
- Share chat
- </DropdownMenuItem>
- )}
+ <DropdownMenuItem onClick={() => onShare(session.id)}>
+ <Icon icon={Share03Icon} className="mr-2 h-4 w-4" />
+ Share chat
+ </DropdownMenuItem>
<DropdownMenuItem
onClick={() => onDelete(session.id, session.title)}
disabled={isDeleting}
diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/__tests__/RecentChatItem.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/__tests__/RecentChatItem.test.tsx
index a361fc0ecb..fdcebf58c2 100644
--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/__tests__/RecentChatItem.test.tsx
+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/__tests__/RecentChatItem.test.tsx
@@ -32,7 +32,6 @@ function makeProps(
onCancelRename: vi.fn(),
isExporting: false,
isDeleting: false,
- chatSharingEnabled: false,
chatPinningEnabled: false,
onPin: vi.fn(),
onRename: vi.fn(),
@@ -168,17 +167,9 @@ describe("RecentChatItem — actions menu", () => {
expect(onDelete).toHaveBeenCalledWith("s1", "My chat");
});
- it("hides the Share action when sharing is disabled", async () => {
- renderItem(makeProps({ chatSharingEnabled: false }));
-
- openActions();
- await screen.findByRole("menuitem", { name: /rename/i });
- expect(screen.queryByRole("menuitem", { name: /share chat/i })).toBeNull();
- });
-
- it("shows and triggers the Share action when sharing is enabled", async () => {
+ it("offers chat sharing without a feature flag", async () => {
const onShare = vi.fn();
- renderItem(makeProps({ chatSharingEnabled: true, onShare }));
+ renderItem(makeProps({ onShare }));
openActions();
fireEvent.click(
diff --git a/autogpt_platform/frontend/src/services/feature-flags/__tests__/envFlagOverride.test.ts b/autogpt_platform/frontend/src/services/feature-flags/__tests__/envFlagOverride.test.ts
index 6171cd63a0..656e659dbd 100644
--- a/autogpt_platform/frontend/src/services/feature-flags/__tests__/envFlagOverride.test.ts
+++ b/autogpt_platform/frontend/src/services/feature-flags/__tests__/envFlagOverride.test.ts
@@ -60,44 +60,11 @@ describe("envFlagOverride", () => {
});
});
-describe("BUILDER_CHAT_PANEL default", () => {
- beforeEach(() => {
- delete process.env["NEXT_PUBLIC_FORCE_FLAG_BUILDER_CHAT_PANEL"];
- });
-
- it("is disabled by default so the feature only ships when LaunchDarkly enables it", () => {
- // No env override configured → override helper must return undefined,
- // which causes useGetFlag to fall through to the defaultFlags value. The
- // default for a new gated feature MUST be false so a LaunchDarkly outage
- // cannot expose the feature to all users.
- expect(envFlagOverride(Flag.BUILDER_CHAT_PANEL)).toBeUndefined();
- });
-
- it("can still be force-enabled via the env override for local dev", () => {
- process.env["NEXT_PUBLIC_FORCE_FLAG_BUILDER_CHAT_PANEL"] = "true";
- expect(envFlagOverride(Flag.BUILDER_CHAT_PANEL)).toBe(true);
- });
-
- it("can still be force-disabled via the env override for QA", () => {
- process.env["NEXT_PUBLIC_FORCE_FLAG_BUILDER_CHAT_PANEL"] = "false";
- expect(envFlagOverride(Flag.BUILDER_CHAT_PANEL)).toBe(false);
- });
-});
-
describe("array-typed flags refuse env overrides", () => {
beforeEach(() => {
- delete process.env["NEXT_PUBLIC_FORCE_FLAG_BETA_BLOCKS"];
delete process.env["NEXT_PUBLIC_FORCE_FLAG_MARKETPLACE_SEARCH_TERMS"];
});
- it("ignores a boolean env override for BETA_BLOCKS (array type)", () => {
- process.env["NEXT_PUBLIC_FORCE_FLAG_BETA_BLOCKS"] = "true";
- // A boolean override on an array-typed flag would yield `true` where
- // callers expect a list — guard with `undefined` so they fall through
- // to LaunchDarkly / `defaultFlags`.
- expect(envFlagOverride(Flag.BETA_BLOCKS)).toBeUndefined();
- });
-
it("ignores a boolean env override for MARKETPLACE_SEARCH_TERMS (array type)", () => {
process.env["NEXT_PUBLIC_FORCE_FLAG_MARKETPLACE_SEARCH_TERMS"] = "false";
expect(envFlagOverride(Flag.MARKETPLACE_SEARCH_TERMS)).toBeUndefined();
@@ -159,6 +126,6 @@ describe("NEXT_PUBLIC_FORCE_ALL_FLAGS master switch", () => {
it("still skips array-typed flags when forced on", async () => {
const { envFlagOverride: override, Flag: F } =
await loadWith("development");
- expect(override(F.BETA_BLOCKS)).toBeUndefined();
+ expect(override(F.MARKETPLACE_SEARCH_TERMS)).toBeUndefined();
});
});
diff --git a/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts b/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts
index 8d865d3cef..2794b0e64a 100644
--- a/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts
+++ b/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts
@@ -6,17 +6,12 @@ import { useFlags } from "launchdarkly-react-client-sdk";
import { useEffect, useState } from "react";
export enum Flag {
- BETA_BLOCKS = "beta-blocks",
MARKETPLACE_SEARCH_TERMS = "marketplace-search-terms",
ENABLE_PLATFORM_PAYMENT = "enable-platform-payment",
- ARTIFACTS = "artifacts",
ARTIFACTS_PAGE = "artifacts-page",
CHAT_MODE_OPTION = "chat-mode-option",
- BUILDER_CHAT_PANEL = "builder-chat-panel",
- AGENT_BRIEFING = "agent-briefing",
GENERIC_TRIGGER_AGENTS = "generic-trigger-agents",
CHAT_SEARCH = "chat-search",
- CHAT_SHARING = "chat-sharing",
AUTOGPT_NEW_LAYOUT = "autogpt-new-layout",
CHAT_WORKSPACE_FILES = "chat-workspace-files",
CHAT_PINNING = "chat-pinning",
@@ -64,17 +59,12 @@ export enum Flag {
const isPwMockEnabled = process.env.NEXT_PUBLIC_PW_TEST === "true";
const defaultFlags = {
- [Flag.BETA_BLOCKS]: [],
[Flag.MARKETPLACE_SEARCH_TERMS]: DEFAULT_SEARCH_TERMS,
[Flag.ENABLE_PLATFORM_PAYMENT]: false,
- [Flag.ARTIFACTS]: false,
[Flag.ARTIFACTS_PAGE]: false,
[Flag.CHAT_MODE_OPTION]: false,
- [Flag.BUILDER_CHAT_PANEL]: false,
- [Flag.AGENT_BRIEFING]: true,
[Flag.GENERIC_TRIGGER_AGENTS]: false,
[Flag.CHAT_SEARCH]: false,
- [Flag.CHAT_SHARING]: false,
[Flag.AUTOGPT_NEW_LAYOUT]: false,
[Flag.CHAT_WORKSPACE_FILES]: false,
[Flag.CHAT_PINNING]: false,
@@ -120,30 +110,20 @@ type FlagValues = typeof defaultFlags;
*/
function readEnvOverride(flag: Flag): string | undefined {
switch (flag) {
- case Flag.BETA_BLOCKS:
- return process.env.NEXT_PUBLIC_FORCE_FLAG_BETA_BLOCKS;
case Flag.MARKETPLACE_SEARCH_TERMS:
return process.env.NEXT_PUBLIC_FORCE_FLAG_MARKETPLACE_SEARCH_TERMS;
case Flag.ENABLE_PLATFORM_PAYMENT:
return process.env.NEXT_PUBLIC_FORCE_FLAG_ENABLE_PLATFORM_PAYMENT;
case Flag.SKILLS_HUB:
return process.env.NEXT_PUBLIC_FORCE_FLAG_SKILLS_HUB;
- case Flag.ARTIFACTS:
- return process.env.NEXT_PUBLIC_FORCE_FLAG_ARTIFACTS;
case Flag.ARTIFACTS_PAGE:
return process.env.NEXT_PUBLIC_FORCE_FLAG_ARTIFACTS_PAGE;
case Flag.CHAT_MODE_OPTION:
return process.env.NEXT_PUBLIC_FORCE_FLAG_CHAT_MODE_OPTION;
- case Flag.BUILDER_CHAT_PANEL:
- return process.env.NEXT_PUBLIC_FORCE_FLAG_BUILDER_CHAT_PANEL;
- case Flag.AGENT_BRIEFING:
- return process.env.NEXT_PUBLIC_FORCE_FLAG_AGENT_BRIEFING;
case Flag.GENERIC_TRIGGER_AGENTS:
return process.env.NEXT_PUBLIC_FORCE_FLAG_GENERIC_TRIGGER_AGENTS;
case Flag.CHAT_SEARCH:
return process.env.NEXT_PUBLIC_FORCE_FLAG_CHAT_SEARCH;
- case Flag.CHAT_SHARING:
- return process.env.NEXT_PUBLIC_FORCE_FLAG_CHAT_SHARING;
case Flag.AUTOGPT_NEW_LAYOUT:
return process.env.NEXT_PUBLIC_FORCE_FLAG_AUTOGPT_NEW_LAYOUT;
case Flag.CHAT_WORKSPACE_FILES:
@@ -177,13 +157,12 @@ function readEnvOverride(flag: Flag): string | undefined {
}
}
-// Array-typed flags (e.g. ``BETA_BLOCKS``, ``MARKETPLACE_SEARCH_TERMS``)
+// Array-typed flags (e.g. ``MARKETPLACE_SEARCH_TERMS``)
// cannot be meaningfully overridden through a single boolean string env
// var — returning ``true`` / ``false`` would clash with the array type
// callers expect. These flags are still subject to LaunchDarkly + the
// ``defaultFlags`` fallback; the env override path just skips them.
const ARRAY_TYPED_FLAGS: ReadonlySet<Flag> = new Set([
- Flag.BETA_BLOCKS,
Flag.MARKETPLACE_SEARCH_TERMS,
Flag.COPILOT_BOT_PLATFORMS,
]);