From 9e63f5cd5f00b3630c62acfa43709ca01a38ee08 Mon Sep 17 00:00:00 2001 From: "[._.]/ Adam Eivy" Date: Tue, 28 Jul 2026 17:33:49 -0700 Subject: [PATCH] test image-gen connection against the provider tab you're on, not the saved default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Test Connection button in Settings → Image Gen sits in a bar shared by every sub-tab and called /api/image-gen/status with no ?mode=, so the server fell back to settings.imageGen.mode. Testing from the Grok CLI or Agy CLI tab reported the saved default backend — "codex — codex-cli 0.145.0" — which reads as Agy having resolved to the codex binary rather than as never having been probed at all. Each provider tab now carries a probeMode that is passed as ?mode=, and every result is tagged with the tab that requested it and rendered only under that tab, so a probe left in flight across a tab switch can't paint its answer under another provider's panel. --- .changelog/NEXT.md | 1 + PLAN.md | 4 ++ .../src/components/settings/ImageGenTab.jsx | 49 +++++++++----- .../components/settings/ImageGenTab.test.jsx | 64 ++++++++++++++++++- 4 files changed, 101 insertions(+), 17 deletions(-) diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md index fd6c44f5c..de1060456 100644 --- a/.changelog/NEXT.md +++ b/.changelog/NEXT.md @@ -12,6 +12,7 @@ - **[issue-3180] Agent terminals on Windows get a working environment** — the environment filter for agent shell sessions was written for macOS/Linux and dropped variables Windows needs, including `Path` itself (Windows spells it mixed-case, which the filter didn't match), plus `SystemRoot`, `ComSpec`, `TEMP`, and the per-user `APPDATA` folders where the coding CLIs keep their configuration and credentials. Windows sessions now keep those while still withholding API keys and tokens. ## Image generation +- **Test Connection in Image Gen settings now tests the CLI whose tab you're on.** Pressing it from the Grok CLI or Agy CLI tab probed whichever backend was saved as the default instead — so an Agy test answered `codex — codex-cli 0.145.0`, which looked like Agy had somehow resolved to the Codex binary. The button now probes the provider for the open tab (Backend, Tokens, Expose, and Test still probe the saved default backend), and every result is shown only under the tab that asked for it — so a slow probe you left behind can't surface under the provider you switched to. - **[issue-3186] Agy CLI is now an opt-in image-generation backend.** Users can enable Antigravity in Image Gen settings, select an installed or custom model, and send text-to-image work through its `generate_image` tool with queue progress, cancellation, gallery metadata, cleaner options, and CoS tool registration. Each render runs in an isolated scratch directory and only a signature-verified directed image is imported; image-edit surfaces continue to use an edit-capable backend. ## Game diff --git a/PLAN.md b/PLAN.md index 076438a16..953657efe 100644 --- a/PLAN.md +++ b/PLAN.md @@ -318,3 +318,7 @@ is not reliably announced. ### Migrate the bespoke gallery-upload callers onto `GalleryImagePicker allowUpload` - [ ] `client/src/components/imageGen/GalleryImagePicker.jsx` gained an `allowUpload` prop (#2953) that encapsulates the file → `readFileAsBase64` → `uploadGalleryImage` → normalize → select flow inside the shared picker. Three existing callers still roll their own upload path with a separate file `` + `toast` alongside the picker: `client/src/components/music/AlbumsManager.jsx:177`, `client/src/components/music/ArtistsManager.jsx:147`, and `client/src/pages/Authors.jsx:167`. Migrate each to `` and delete the bespoke upload handlers so the duplication the prop was designed to end actually collapses. Deferred from #2953 (adjacent files outside that issue's scope). Surfaced by the /simplify altitude review. + +### Let the Image Gen "Test Render" panel pick its provider + +- [ ] `client/src/components/settings/ImageGenTab.jsx` — Test Connection now probes the provider whose sub-tab is open, but the Test tab's `handleRenderTest` still renders with `saved.mode` (the saved default backend). So a user who wants to smoke-test an Agy or Grok render must first make it their default, which is the same friction the Test Connection fix just removed. Add a provider `