Conversation
Projects could only pick icons from a fixed palette, so a project's identity in the sidebar depended on whoever remembered to pick something close. This adds a Generate tab to the icon picker: providers that support image generation (Codex app-server) produce one image with three icon variants in a single turn; the server slices it into individual tiles, drops blank or duplicate variants, and falls back to a single cropped icon when the model draws fewer than three. Icons live in the server state dir, so they render in every client through the existing project-favicon asset route. Providers without image generation see a plain notice instead of a broken form. Implementation used GLM (enablers/large) in T3 Code (OpenCode harness).
Live testing across dozens of generations exposed four slicer and prompt defects: corner background sampling read mid-image pixels on non-square canvases, sparse floating artwork escaped the content crop, icons stacked in a single canvas column defeated gap detection, and uniform or full-bleed single-icon canvases were cut into transparent strips. The prompt now bakes in the constraints of the actual render context (16px rounded-square slot on a dark sidebar): full-bleed solid cards, blocky silhouettes, saturated mid-bright backgrounds, no busy scenes. Implementation used GLM (enablers/large) in T3 Code (OpenCode harness).
Thread transfer impact
This comment will update automatically after the next completed run. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
The project icon picker in Settings → Project gets a Generate tab. Projects on a provider that supports image generation (Codex app-server) can describe the look they want in a small "Vibe" field, optionally tweak the auto-populated prompt under "Edit prompt", and press Generate. One Codex image-generation turn produces a single image with three icon variants; the server slices it into individual tiles, drops blank or duplicate variants, crops each kept tile to its content and centers it on a transparent square, and falls back to a single cropped icon when the model draws fewer than three distinct variants. Tiles preview in the dialog before saving; saving one stores the path on the project and renders through the existing
project-faviconasset route, so the icon shows up in web and desktop alike.Generated icons live in the server state directory (
<state>/generated-icons/), not the workspace, so nothing is written to the user's project. Providers without image-generation capability (Claude, Cursor, Grok, OpenCode) see a plain "this provider doesn't support image generation" notice instead of a broken form — capability comes from a newsupportsImageGenerationflag on the server provider snapshot, so gating is server-driven.Scope: this stacks on pingdotgg#11845 and touches the web icon picker, the server (new
generateProjectIconsorchestration RPC, Codex adapter, PNG slicing pipeline inapps/server/src/imageGeneration/), and the orchestration contracts. It does not touch mobile, other providers' adapters, or the checkpoint/reactor layers.Why
pingdotgg#11845 made project icons customizable, but the palette is still a fixed set — a project's identity depends on picking whichever preset is closest. AI generation is the natural extension: the user already has an image-generation-capable provider running in the app. Keeping the model interaction server-side (one ephemeral Codex
app-serverthread per generation, mechanical "three variants in one image" prompt framing, defensive slicing) means the client stays dumb and the failure modes (blank variants, duplicates, symbol collages, multi-image turns) are handled in one tested place rather than per client.Verification
tsc --noEmit):@t3tools/contracts,@t3tools/client-runtime,t3(server), web — all pass (suggestion-level diagnostics only, same as base).vp test run apps/server/src/imageGeneration apps/server/src/server.test.ts: 210 passed, 0 failed — includes 24pngGridtests covering horizontal/vertical/stacked layouts, transparent and opaque backgrounds, gap-following cuts, 2-variant cuts, blank-tile/fragment handling, duplicate rejection, single-icon fallback, sparse-artwork density crops, stacked-column reframing, and full-bleed single-icon detection.bdd4ea4b7b): fixed corner background sampling on non-square canvases, added density crops for sparse floating artwork, stacked-column reframing, and full-bleed single-icon detection; the prompt now encodes the actual render context (16px rounded-square slot on a dark sidebar).vp test run apps/web/src/components/settings/ProjectIconPickerDialog.test.tsx: 1 passed.projection_projects.favicon_path, and the settings row renders the saved icon with the "Custom image" label.CodexDriverinstaller-path test failures reproduce on the stacked base commit (35a4aff472) as well — not introduced here.UI Changes
After — Generate tab with a freshly generated tile previewing before save:
After — saved generated icon rendered in the settings row:
The before state is the stacked base (pingdotgg#11845 head): the picker offers Icons/Emoji/Monogram only, with no Generate tab. No base capture is attached.
Checklist
Implementation used GLM (enablers/large) in T3 Code (OpenCode harness).