refactor(frontend/copilot): remove ARTIFACTS feature flag#13113
Conversation
The artifact panel is now always enabled — drop the Flag.ARTIFACTS gate from the page, ChatContainer, useAutoOpenArtifacts, MessageAttachments, and MessagePartRenderer, and remove the flag enum entry plus the associated test mocks and the now-redundant "flag disabled" assertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (5)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🧰 Additional context used📓 Path-based instructions (13)autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/**/*.{tsx,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/**/*.{tsx,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/**/*.{tsx,jsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)
Files:
autogpt_platform/frontend/src/**/components/**/*.{tsx,jsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)
Files:
autogpt_platform/frontend/src/**/components/**/*.{ts,tsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)
Files:
autogpt_platform/frontend/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (9)📚 Learning: 2026-02-27T10:45:49.499ZApplied to files:
📚 Learning: 2026-03-24T02:05:04.672ZApplied to files:
📚 Learning: 2026-03-24T02:23:31.305ZApplied to files:
📚 Learning: 2026-03-31T14:04:42.444ZApplied to files:
📚 Learning: 2026-04-01T18:54:16.035ZApplied to files:
📚 Learning: 2026-04-07T09:24:16.582ZApplied to files:
📚 Learning: 2026-04-02T05:43:49.128ZApplied to files:
📚 Learning: 2026-04-13T13:11:07.445ZApplied to files:
📚 Learning: 2026-04-15T22:49:06.896ZApplied to files:
🔇 Additional comments (5)
WalkthroughThis PR removes the ChangesRemove ARTIFACTS feature flag
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 PR Overlap DetectionThis check compares your PR against all other open PRs targeting the same branch to detect potential merge conflicts early. 🔴 Merge Conflicts DetectedThe following PRs have been tested and will have merge conflicts if merged after this PR. Consider coordinating with the authors.
🟢 Low Risk — File Overlap OnlyThese PRs touch the same files but different sections (click to expand)
Summary: 3 conflict(s), 0 medium risk, 5 low risk (out of 8 PRs with file overlap) Auto-generated on push. Ignores: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a9d212. Configure here.
| // open state drive layout width; an artifact generated in a stale session | ||
| // state would otherwise shrink the chat column with no panel rendered. | ||
| const isArtifactOpen = isArtifactsEnabled && isArtifactPanelOpen; | ||
| const isArtifactOpen = isArtifactPanelOpen; |
There was a problem hiding this comment.
Redundant variable alias after flag removal
Low Severity
isArtifactOpen is now a trivial alias for isArtifactPanelOpen with no additional logic. Previously it combined two conditions (isArtifactsEnabled && isArtifactPanelOpen), giving it purpose. After the flag removal it's just an unnecessary indirection — the store selector result could be used directly at line 155 where it controls max-w-3xl.
Reviewed by Cursor Bugbot for commit 4a9d212. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #13113 +/- ##
==========================================
+ Coverage 70.43% 70.86% +0.42%
==========================================
Files 2186 2192 +6
Lines 163824 164138 +314
Branches 16757 16875 +118
==========================================
+ Hits 115389 116310 +921
+ Misses 45087 44377 -710
- Partials 3348 3451 +103
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|


Why / What / How
Why: The
artifactsLaunchDarkly flag was gating the copilot artifact panel and related UI. The feature is shipped and the flag is now stale — keeping it adds a branch on every render and forces every artifact code path to stay defensive about afalsevalue.What: Removes
Flag.ARTIFACTSfrom the feature-flag enum, drops the gate from every consumer, and prunes the tests' flag mocks and the now-redundant "flag disabled" case.How: The artifact panel is now mounted unconditionally on
/copilot(still mobile/desktop branched),useAutoOpenArtifactsno longer takesisArtifactsEnabled, andChatContainer'sisArtifactOpenderives directly from the store. Artifact-card rendering inMessageAttachmentsandMessagePartRendererno longer skips work when the flag is off.Changes 🏗️
src/services/feature-flags/use-get-flag.ts: removeARTIFACTSenum entry + defaultsrc/app/(platform)/copilot/CopilotPage.tsx: drop flag check, panel always renderedsrc/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx: drop flag,isArtifactOpenmirrors store statesrc/app/(platform)/copilot/components/ChatContainer/useAutoOpenArtifacts.ts: removeisArtifactsEnabledparamsrc/app/(platform)/copilot/components/ChatMessagesContainer/components/MessageAttachments.tsx: always render artifact cardssrc/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx: always render artifact cards from extracted workspace URLsuseGetFlagmocks across the touched specs and drop the now-meaningless "flag disabled" assertion inuseAutoOpenArtifacts.test.tsChecklist 📋
For code changes:
/copilotdesktop — artifact panel renders without LD flag toggled/copilotmobile — artifact panel renders without LD flag toggledNote
Low Risk
Low risk refactor that removes LaunchDarkly gating and associated test mocks; primary risk is unintended always-on artifact UI/layout behavior changes in
/copilot.Overview
Removes the stale LaunchDarkly
ARTIFACTSflag and all conditional gating around Copilot artifacts.The
/copilotartifact panel and artifact-card rendering now mount unconditionally (desktop and mobile),useAutoOpenArtifactsno longer accepts an enablement parameter, and chat layout width is driven directly by the artifact panel store state. Tests are updated to dropuseGetFlagmocks and the now-irrelevant “flag disabled” coverage.Reviewed by Cursor Bugbot for commit 4a9d212. Bugbot is set up for automated code reviews on this repo. Configure here.