Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Project icon picker leaves many image files on the generic icon #48237

ClosedOlbii-17(GitHub profile, opens in a new tab) opened this issue 1 comment
Olbii-17(GitHub profile, opens in a new tab)commented

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Add a project whose tree contains many images (a Drupal checkout does: theme logos, files/favicons/*.png, and copies under libraries/ and core/).
  2. Open Settings → Projects → the project → Choose file.
  3. Search for "icon".
  4. Look at the rows for real PNGs such as apple-touch-icon-57x57.png (valid 57×57 PNG).
  5. Also try an SVG logo larger than about 24 KB, a white SVG (fill="#FFF"), a wide wordmark (about 211×30), and a .ico / .svg from files/favicons/.

Expected behavior

Each image the browser can draw shows its own preview in the picker. Choosing a square PNG, SVG, or ICO from the project uses that picture as the project icon. A wide logo stays recognizable. A missing file is the only case that shows the monogram.

Actual behavior

Many rows keep the red/blue generic file icon. Valid PNGs in the list do this, not only exotic formats.

After a file is chosen, a lot of files still end as the generic icon or the project monogram:

  • SVG responses are sent with Content-Security-Policy: sandbox, and Chromium often will not paint those in an <img>.
  • An SVG around 40 KB is past the ~24 KB inline cache. After the signed asset link expires it becomes the monogram. That part matches #42328.
  • A white SVG (fill="#FFF") disappears on a light background.
  • A wide wordmark (PNG 2096×390 or SVG 211×30) becomes a thin strip in the square slot.
  • TIFF, HEIC/HEIF, and .icns stay on the generic icon in the list. .icns is turned into a PNG only after it is selected.

The placeholder is PierreEntryIcon in ProjectFaviconPickerDialog / ProjectFaviconThumbnail. Thumbnails load through a draft-workspace-file asset URL and stay on the fallback when that image fails.

Impact

Cosmetic issue

Version or commit

0.1.13

Environment

macOS, Apple Silicon, T3 Code desktop app, server 0.1.13

Logs or stack traces

Screenshots, recordings, or supporting files

SCR-20261203-medk.png

Workaround

Pick a small square PNG, for example files/favicons/apple-touch-icon.png (180×180) or files/favicons/favicon-32x32.png. Avoid libraries/, white SVGs, and wide wordmarks.

  1. Olbii-17(GitHub profile, opens in a new tab) added labelsbug

  2. Olbii-17(GitHub profile, opens in a new tab) added labelsneeds-triage

  3. I tried to reproduce this on the current build and could not.

    Commit 9a08ffb840 (origin/main). Ran T3CODE_DEV_SEED=0 vp run dev (fresh database) and opened the web client in Chromium on Linux. Built a synthetic Drupal-like git repo with real files: favicons/apple-touch-icon-57x57.png (57x57), apple-touch-icon.png (180x180), favicon-32x32.png, favicon.ico (32x32), copies of the 57x57 PNG under web/libraries/ and web/core/, webroot/libraries/jquery.select2/docs/themes/site/images/apple-touch-icon-60x60.png (the reporter's dotted path), a nested git repo under webroot/libraries/nested, a 43 KB SVG, a white SVG (fill=#FFF), a small SVG favicon, and a 2096x390 wide PNG. Added it with Add project > Local folder, then opened Settings > Projects > drupal > Choose file and searched "icon" and "apple-touch". Every row showed its real image: all 14 thumbnails had complete=true and naturalWidth>0 (57x57, 180x180, 32x32, ICO 32x32, SVGs 32/64, wide PNG 2096x390), including the libraries/, core/, dotted-directory and nested-repo copies. SVG asset responses do carry Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox, but Chromium still paints them in . Choosing the 43 KB SVG made it the project icon at once in Settings and in the project selector. Not reproduced: the generic PierreEntryIcon on valid PNGs, and SVGs failing to paint because of the sandbox CSP. Matches the report but is not a defect: the white SVG renders white on a light surface (that is the image's own colour), and the wide PNG is letterboxed by object-contain into a thin strip. Gitignored folders and symlinked folders outside the root are not listed at all. Not tried: the macOS Electron desktop app the reporter used. Its renderer is the same Chromium loading the same asset URLs, and the reporter says favicons/ PNGs do preview, so a platform-wide failure is unlikely, but a macOS-only cause is not excluded. The large-SVG-after-link-expiry part was issue #42328, closed as fixed by PR #42329 (merged 2026-11-24).

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  4. juliusmarminge closed this

Sign in to join this conversation.