🤖 refactor: remove experimental image tools#3419
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e29321bb2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
e29321b to
2a5cab8
Compare
|
Addressed Codex finding |
|
@codex review Please take another look. |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Remove the failed experimental Image Tools feature from Mux. This deletes the
image_generate/image_edittools, the Image Tools experiment/config UI, generated-image transcript presentation, image-tool backend runtime wiring, the built-inimagegenskill, and the related ADR/docs entries while preserving generic image attachment, screenshot, lightbox, and token metadata support.Background
We experimented with Image Tools in Mux, but we were not happy with how the first implementation turned out, and the value from the feature was not clear enough to keep carrying it forward right now.
We're not opposed to having image tools in the future, but this first iteration was not good enough, so this PR removes the experiment.
Closes #3270
Implementation
imagegenskill and image ADR docs.ToolResultImages,ImageLightbox, raster resizing, and upstream token/model metadata.Validation
make static-checkPains
make testwas attempted locally; it did not complete cleanly because of unrelated existing/suite-order failures. The previously failing hook and UI tests passed in isolation, whileWorkspaceService fork > cleans up init state when orchestrateFork rejectsreproduced independently of this change.Risks
Low-to-medium. This removes a product experiment and many direct callsites; old persisted image tool outputs now render as generic tool rows rather than first-class image preview rows. Generic image attachment/screenshot previews were intentionally preserved.
📋 Implementation Plan
Plan: remove failed Image Tools experiment and close PRD issue
Context and evidence
🤖 feat: PRD experimental image generation toolincoder/mux, currently open with no comments. Evidence: issue body explicitly describes the experimentalimage_generatetool, Settings-configured image model, generated-image transcript display, temporary artifacts, usage reporting, provider policy enforcement, and/imagegenskill.ToolResultImages,ImageLightbox, and raster resize utilities.MUX_MODEL_STRING,MUX_THINKING_LEVEL, andMUX_COSTS_USD; include the repository-required mux attribution footer in the issue close comment.Recommended approach
Surgical full removal of the experiment and its direct product surfaces. Remove the feature rather than leaving it hidden behind a flag, while preserving unrelated image attachment/screenshot functionality.
imagegenskill, and config/stream/tool-registration plumbing.Implementation phases
1. Remove experiment/config surfaces
src/common/constants/experiments.ts.imageGenerationToolsend-option plumbing from:src/browser/utils/messages/sendOptions.tssrc/browser/utils/messages/buildSendMessageOptions.tssrc/browser/hooks/useSendMessageOptions.tssrc/common/schemas/project.tssrc/common/orpc/schemas/stream.tssrc/node/services/taskService.tsimageGenerationproject/app config surfaces from:src/common/types/project.tssrc/common/types/imageGeneration.ts(delete if no longer referenced)src/common/config/schemas/appConfigOnDisk.tssrc/common/orpc/schemas/api.tssrc/node/config.tssrc/node/orpc/router.tsimageGenerationconfig does not brick startup.2. Remove image tool definitions and runtime tools
src/node/services/tools/image_generate.tssrc/node/services/tools/image_edit.tssrc/node/services/tools/imageArtifacts.tssrc/common/utils/tools/tools.tssrc/common/utils/tools/toolDefinitions.tssrc/common/types/tools.tssrc/common/utils/imageGenerationToolResult.tsimage_generate/image_editfrom available-tool calculations and model/tool registration.src/browser/utils/messages/applyToolOutputRedaction.tsonly if they exclusively served these removed tools.3. Remove backend stream and skill gating
src/node/services/aiService.ts, remove image-generation experiment availability calculation and stop passing image runtime/editing options intogetToolsForModel.src/node/services/streamContextBuilder.ts, removeimageGenerationToolAvailableoption and imagegen skill filtering.src/node/services/agentSession.tsandsrc/node/services/agentSkills/agentSkillsService.ts, remove built-inimagegenavailability/filtering logic.src/node/builtinSkills/imagegen.md.4. Remove UI/product presentation
src/browser/features/Settings/Sections/ImageGenerationExperimentConfig.tsx.src/browser/features/Settings/Sections/ExperimentsSection.tsxand related stories/mocks to remove the special Image Tools configuration block.src/browser/features/Messages/GeneratedImageMessage.tsxif generated-image messages are only produced by removed tools.src/browser/features/Messages/MessageRenderer.tsx, message builders, stories, and tests to remove generated-image transcript handling tied to image tools.src/browser/components/ImageLightbox.tsxandsrc/browser/features/Tools/Shared/ToolResultImages.tsxbecause they support non-image-tool features likeattach_file, desktop screenshots, and generic tool result image previews.5. Remove docs/tests/stories tied to the experiment
src/node/services/tools/image_generate.test.tssrc/node/services/tools/image_edit.test.tssrc/common/types/imageGeneration.test.tssrc/common/utils/imageGenerationToolResult.test.tssrc/common/utils/tools/toolDefinitions.test.tssrc/node/services/streamContextBuilder.test.tssrc/node/services/agentSession.agentSkillSnapshot.test.tssrc/node/services/tools/agent_skill_read.test.tssrc/node/services/tools/agent_skill_read_file.test.tssrc/browser/features/Messages/MessageRenderer.test.tsxsrc/browser/utils/messages/StreamingMessageAggregator.test.tssrc/browser/utils/messages/applyToolOutputRedaction.test.tsdocs/hooks/tools.mdximage tool entriesdocs/config/models.mdxexperimental image tools model sectiondocs/adr/0001-experimental-image-generation-tool.mddocs/adr/0002-image-editing-visual-mockups.mddocs/docs.jsonADR navigation entriessrc/node/builtinSkills/mux-docs.mdreferences to removed image ADRsmodels.json, token stats, provider factory): remove image-model-only factory/config code only if it is exclusively reachable from the removed tools; otherwise leave model catalog entries alone unless validation shows they are dead or user-facing inappropriately.Validation and quality gates
Gate A: static and targeted automated checks after code removal
Run targeted tests first to catch local fallout:
Then run repository-wide checks:
make typecheck make lint make fmt-check make testIf time or environment prevents the full suite, at minimum run
make typecheck,make lint,make fmt-check, and all targeted tests above; report any blocker exactly.Gate B: search-based removal audit
Run read-only audits and resolve any remaining direct product references:
Expected remaining hits, if any, should be explicitly justified as unrelated generic image attachment/screenshot support or historical external references. Do not remove generic image attachment/resizing/lightbox code unless the audit proves it exists only for the failed experiment.
Dogfooding / self-verification
Skill-backed workflow notes:
make dev-server-sandboxrather than a shared dev server so the run gets a temporaryMUX_ROOT, copied provider/project config when available, freeBACKEND_PORT/VITE_PORT, and sandbox-safe host settings.agent-browserbinary, nevernpx agent-browser.agent-browser skills get core(or--fullif command details are needed), because the globalagent-browserskill is only a discovery stub.dogfood-output/image-tools-removal/withscreenshots/,videos/, and a short report.Concrete dogfood pass:
Start the sandboxed app server:
If the dogfood pass should avoid copying existing user projects/providers, use:
make dev-server-sandbox DEV_SERVER_SANDBOX_ARGS="--clean-providers --clean-projects"Initialize dogfood artifacts and a named browser session:
Open Settings and verify:
Open a workspace/chat and verify:
image_generateorimage_edit./imagegenor imagegen built-in skill is no longer listed/readable.Verify generic image functionality still works:
Record reviewer video evidence for the happy path:
agent-browser --session image-tools-removal record start dogfood-output/image-tools-removal/videos/removal-happy-path.webm # Navigate Settings -> chat/tool checks -> normal send at human pace. agent-browser --session image-tools-removal record stopDuring the pass, check browser health after major pages/actions:
Close the session and include artifact paths in the final implementation report:
GitHub issue closure plan
Preferred flow: do not manually close issue #3270 before merge. Instead, put the rationale and a GitHub closing keyword in the PR body so the issue auto-closes when the removal PR is merged into the default branch.
MUX_MODEL_STRING,MUX_THINKING_LEVEL, andMUX_COSTS_USD:gh issue close 3270 --reason "not planned" --comment ...if the user decides not to use a PR, the PR is not targeting the default branch, or GitHub automatic issue closing is disabled for the repository.Acceptance criteria
image_generateandimage_editare unavailable and no longer appear in tool definitions, available-tool lists, or model runtime wiring.Closes #3270, so GitHub closes the PRD issue automatically when the removal PR merges into the default branch; no manual issue close happens beforehand unless that fallback is needed.Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$51.46