refactor(frontend): remove artifacts feature flag#13063
Conversation
Artifacts has been fully launched in all environments (local, test, production). LaunchDarkly fallthrough served `true` everywhere with no remaining off-variation paths. Hardcoding the on-state and removing the flag from the Flag enum, defaults, all consumer components, and test mocks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
ℹ️ 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 ChangesARTIFACTS Feature Flag Removal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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. 🟢 Low Risk — File Overlap OnlyThese PRs touch the same files but different sections (click to expand)
Summary: 0 conflict(s), 0 medium risk, 1 low risk (out of 1 PRs with file overlap) Auto-generated on push. Ignores: |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (40.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #13063 +/- ##
=======================================
Coverage 70.43% 70.43%
=======================================
Files 2186 2186
Lines 163824 163817 -7
Branches 16757 16755 -2
=======================================
Hits 115389 115389
- Misses 45087 45117 +30
+ Partials 3348 3311 -37
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 is fully released — every environment (local, test, production) is on with fallthrough variationtrue, and LD reports alaunchedlifecycle state across all envs. Carrying the flag in code is now pure dead-code overhead and risks accidental regressions if someone toggles it off.What: Remove the
artifactsfeature flag from the frontend. Hardcode the on-state (forward value:true), strip the dead branches, and clean up flag usage in tests.How: Searched the codebase for
Flag.ARTIFACTS/isArtifactsEnabledreferences, queried LaunchDarkly to confirm the forward value is unambiguouslytrue(production rule + fallthrough both serve variation 0), then removed the flag check from each consumer. The artifact rendering paths (panel, cards, auto-open) are now always-on.Changes 🏗️
use-get-flag.ts: removedFlag.ARTIFACTSenum entry and itsdefaultFlagsvalue.CopilotPage.tsx: removed the flag gate around<ArtifactPanel />(mobile and desktop).ChatContainer.tsx: dropped the flag check;isArtifactOpennow reads directly from the panel store.useAutoOpenArtifacts.ts: removed theisArtifactsEnabledoption and its readiness gate; tests updated.MessageAttachments.tsx: removed the flag check; agent/user attachments always render viaArtifactCardwhen convertible.MessagePartRenderer.tsx: artifact cards in text parts always render when present.mockArtifactsEnabledplumbing andFlag: { ARTIFACTS: ... }mocks fromChatContainer.test.tsx,MessagePartRenderer.test.tsx,CopilotPage.test.tsx, anduseAutoOpenArtifacts.test.ts(including the now-obsolete "does not set ready when artifacts feature flag is disabled" case).After merge: archive the
artifactsflag in LaunchDarkly.Checklist 📋
For code changes:
npx vitest runpasses foruseAutoOpenArtifacts.test.ts,ChatContainer.test.tsx,MessagePartRenderer.test.tsx,CopilotPage.test.tsx(32 tests, all green)pnpm lintclean for touched filespnpm formatclean for touched fileslaunchedin all envs with forward valuetrue🤖 Generated with Claude Code
Note
Low Risk
Low risk refactor that removes a fully-launched feature flag and associated dead branches; main risk is unintended always-on artifact UI in edge cases that previously relied on the flag being off.
Overview
Removes the
artifactsLaunchDarkly feature flag and makes artifacts UI always-on in Copilot. The Copilot page now always rendersArtifactPanel(mobile + desktop), and chat layout width reacts directly to the artifact panel store state.useAutoOpenArtifactsno longer accepts/gates on anisArtifactsEnabledoption, and message rendering always shows artifact cards when attachments/text can be converted. Related tests were simplified by deletingARTIFACTSflag mocks and the now-obsolete flag-disabled test case.Reviewed by Cursor Bugbot for commit 6db0e0c. Bugbot is set up for automated code reviews on this repo. Configure here.