t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Project settings icon picker save does not persist projectIcon/faviconPath

Open brahimhamichan opened this issue 2 months ago • 5 comments

Description

Changing a project's icon in Project Settings (emoji/lucide via the icon picker, or a favicon file) and clicking save has no effect: the project keeps showing no icon (or the previous one).

Steps to reproduce

  1. Open an existing project in t3code desktop.
  2. Open Project Settings.
  3. Pick an icon in the icon picker (or set a favicon image).
  4. Click save.
  5. Reopen settings / look at the sidebar — the icon is not applied.

Title renames on the same screen persist fine, so the save path itself works.

Actual behavior

Inspecting orchestration_events after saving shows the emitted project.meta-updated payload contains only title/updatedAt, e.g.:

{"projectId": "...", "title": "SAV clients", "updatedAt": "..."}

The projectIcon / faviconPath fields are never included, so the projection row is never updated. Across the whole local event store, the only icon/favicon write ever persisted was a faviconPath update from an older build — no project.meta-updated event has ever carried projectIcon.

Expected behavior

Saving the icon picker should include projectIcon: {kind: "emoji"|\”lucide", ...} (and/or faviconPath) in the project.meta.update command payload, per the existing schema (ProjectIconOverride, ProjectFaviconPath), and the sidebar should render it.

Environment

  • t3code desktop 0.0.40 (AppImage, linux-x64)
  • t3 server 0.0.39-nightly.20260904.1279
  • Ubuntu 26.04 (LXQt/X11)

Notes

Setting favicon_path directly on the projection row (plus a matching project.meta-updated event) renders correctly, so this looks client-side: the picker selection never makes it into the save payload.

brahimhamichan avatar Sep 08 '26 03:09 brahimhamichan

Update from further investigation (holding off on a PR until retested):

I traced the full save chain on current code (main, v0.0.40 release commit 09e8de9, latest nightly): ProjectIconPickerDialog.save -> setProjectIcon -> updateAllMembers fan-out -> updateProject dispatch (project.meta.update) -> decider (includes faviconPath/projectIcon when defined) -> projection. The chain is complete everywhere — I could not find a dropped field.

Revised read of my own evidence: the failing attempts happened on desktop 0.0.38, whose bundle has no projectIcon concept at all (only the image-file favicon picker), and at the time the projects contained no image files to pick. So there was likely nothing broken to save with.

Retesting on 0.0.40 now; will close this if the picker persists correctly, or reopen with fresh event-log evidence if it still drops the fields.

brahimhamichan avatar Sep 08 '26 03:09 brahimhamichan

Confirmed by reporter: icon picker (incl. Lucide icons) works on latest (0.0.40). The failure was specific to 0.0.38, which had no Lucide/emoji picker. No code change needed — closing.

brahimhamichan avatar Sep 08 '26 03:09 brahimhamichan

Reopening — reporter confirms the failure is on latest (0.0.40): picking a Lucide icon + save does not persist. (0.0.38 never had the Lucide picker, so this was only ever testable on latest.) Investigating the dispatch path now.

brahimhamichan avatar Sep 08 '26 03:09 brahimhamichan

Triage

Thanks for the follow-up and for closing this after retesting.

Independent pass on current main agrees with your revised read: this is not a dropped-field bug in the icon save path.

What the code does today

Project Settings does not have a combined “save the whole form” action. Name and icon are separate writes:

  • Name blur → updateAllMembers({ title }) → project.meta.update with only title. That matches the project.meta-updated payload you originally inspected (projectId / title / updatedAt).
  • Icon picker Save icon → ProjectIconPickerDialog → setProjectIcon({ faviconPath: null, projectIcon }) → the same project.meta.update command, which already includes optional projectIcon / faviconPath in the contract. The decider copies those fields when they are present; the projector writes project_icon_json / favicon_path.

So a title-only event is expected if the write was a rename, not an icon pick.

Why 0.0.38 looked broken

ProjectIconPickerDialog does not exist on v0.0.38. That build only had the image-file favicon picker. Lucide/emoji overrides shipped in #9137 (2026-09-03) and are in 0.0.39 and 0.0.40. Your confirmation that the picker persists on 0.0.40 matches that.

Related work (#9368, #9457, #7823, #10138) is UI/cache/follow-up — none of it is a missing save-payload fix, and none is needed here.

Next step

Leave closed. No code change. If a current 0.0.40+ build still drops the icon, reopen with a project.meta-updated event from a picker save (not a title blur).

juliusmarminge avatar Sep 08 '26 03:09 juliusmarminge

Closing as invalid per triage — icon save path works on current 0.0.40; original event was a title-only rename. Reopen with a picker-save event if it still fails.

juliusmarminge avatar Sep 08 '26 03:09 juliusmarminge