Skip to content

fix(opencode): persist project icon override in database - #17807

Closed
clansty wants to merge 1 commit into
anomalyco:devfrom
clansty:fix/persist-project-icon-override
Closed

clansty wants to merge 1 commit into
anomalyco:devfrom
clansty:fix/persist-project-icon-override

Conversation

@clansty

@clansty clansty commented Mar 16, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #14465

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Custom project icons (uploaded via the edit-project dialog) are lost after restarting the desktop app. The project.update() endpoint receives icon.override (a base64 data URL) from the client but the project table has no column for it, so the value is silently dropped. On restart, the server returns the project without the override and the icon reverts to the first-letter fallback.

This PR adds an icon_override text column and wires it through fromRow, update, and the fromDirectory upsert so the server persists and round-trips the value. Also normalizes the client-side dialog to send undefined instead of an empty string when no custom icon is set.

How did you verify your code works?

  1. Confirmed the migration SQL is ALTER TABLE project ADD icon_override text — matches the single-column pattern used by existing migrations.
  2. Traced the full data flow: dialog save → SDK call → server update → DB → server list → client enrich → sidebar render. After this change icon.override survives the round-trip through the DB instead of relying solely on local Tauri Store cache.
  3. No LSP diagnostics on any changed file; existing project tests remain compatible (they don't assert on override).

Screenshots / recordings

N/A — logic-only change, no UI modifications.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The project.update() endpoint accepted icon.override from the client
but never stored it — the project table had no icon_override column.
Custom icons survived only in the desktop app's local Tauri Store cache,
which could lose the data across restarts.

Add icon_override column and wire it through fromRow, update, and the
fromDirectory upsert so the server round-trips the value reliably.
@clansty
clansty requested a review from adamdotdevin as a code owner March 16, 2026 13:19
@clansty

clansty commented Mar 23, 2026

Copy link
Copy Markdown
Author

seems fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace name, icon etc. are not saved

1 participant