Repository navigation
[ee] feat: let an app's author give it an icon - #12794
Guilhem-lm wants to merge 13 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 2m 17s —— View job Good to merge Review
I found no P0, P1 or P2 issues. These are the risky spots I checked, and why each holds:
AGENTS.md compliance
Test coverageBackend:
There is no integration test of update keeping the icon when the field is absent and clearing it on Frontend: CLI: Manual checks before merge (the PR says the E2E run is still in progress):
|
Deploying windmill with
|
| Latest commit: |
6326abd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bd134980.windmill.pages.dev |
| Branch Preview URL: | https://app-icon.windmill.pages.dev |
Codex Reviewcc @Guilhem-lm Should address issues before merging: MCP raw-app deployment clears an omitted icon.
Test coverageBackend tests cover raster data-URL handling and explicit-null preservation in draft normalization. The diff adds no integration coverage for icon serving, update omission/removal, or MCP deployment; add a regression for the finding above. Frontend icon utilities and the modified draft/diff helpers have no icon-specific tests. Component tests are not expected. CLI add/unchanged/remove round trips also lack regression coverage. Documentation-only changes need no automated tests. No repository test suite or live-instance E2E was run during this review. Before merge, save a raw-app draft without an Exercise Lucide and uploaded-image icons in both editors, including save/reload, Review & Deploy, homepage display, and favicon restoration after navigation. Also verify CLI pull/push preserves an unchanged icon and clears one removed from YAML. |
Pi Reviewcc @Guilhem-lm Mergeable, but should ideally address nits: absent-vs-null icon semantics diverge in P2 — AI-session deploy removes the icon when the draft omits it, contradicting the "absent keeps deployed" contract
let icon = non_null(draft.get("icon")).cloned();
if exists {
// An update keeps the deployed icon when the field is absent: `null` removes it.
app.insert("icon".into(), icon.unwrap_or(Value::Null));
This is inconsistent with every other layer this PR introduces:
The comment on line 450 also reads as if the code preserves the icon when absent, which it does not. Given the AGENTS.md rule that Considered and dismissed
Test coverageBackend — reasonable: Frontend — the new absent-vs-null logic in Manual verification still needed — The settings drawer path: pick a Lucide icon and confirm the homepage |
…con key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 31s —— View job cc @Guilhem-lm Mergeable, but should ideally address nits: the new Review (follow-up to my earlier pass, covering
|
Codex ReviewGood to merge The previous MCP deployment finding is addressed: an omitted icon stays omitted, while explicit Test coverageThe diff adds backend unit coverage for raster data URLs, draft icon preservation, and omitted-versus-null deployment fields. Frontend tests cover settings inheritance and explicit removal. API integration tests, image conversion tests, and CLI icon round-trip tests are absent. Component tests are not expected; documentation changes need no automated tests. I ran 11 read-only assertions against the frontend logic covering draft inheritance/removal, codec round trips, metadata separation, and image URL selection; all passed. Manual verification remains for Lucide selection and color-picker layout, image upload, save/reload, deployment, homepage/header display, and favicon restoration. Verify that unauthorized image reads fail and authorized responses carry the intended content type and cache headers. Confirm that CLI pull/push preserves an unchanged icon and clears one removed from YAML. Exercise MCP deployment with both an omitted icon and explicit |
Pi ReviewGood to merge The single finding from my previous pass — Considered and dismissed
Test coverage
Manual verification still needed before merge: pick a Lucide icon and separately upload an image for a low-code app, save and reload the editor, then deploy and confirm the homepage |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 17s —— View job Good to merge Review (follow-up covering
|
Codex ReviewGood to merge Reviewed the changes since Test coverageThe PR adds backend unit coverage for image validation and icon inheritance/removal, plus frontend coverage for draft settings. Handler/DB integration tests and image utility tests remain absent. Svelte component tests are not expected. The comment-only follow-up needs no additional tests.
The latest commit introduces no runtime behavior to exercise. Remaining checks documented in the PR are API edge cases and the actual MCP surface. Through the app API, submit SVG, oversized image, invalid Lucide name, and invalid color inputs; each should return 400. Updating without Through MCP, deploy an older raw-app draft without an |
Pi Reviewcc @Guilhem-lm Mergeable, but should ideally address nits: raw-app diff treats an absent P2 — Raw-app diff shows "icon removed" for a draft that omits
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 25s —— View job Good to merge Review (follow-up covering
|
Codex ReviewGood to merge Reviewed Test coverageBackend unit coverage now includes the raw-app diff regression. Handler/DB integration tests remain absent. Frontend settings tests cover inheritance/removal; automated CLI icon round-trip tests remain absent. Documentation/config changes need no automated tests. I ran eight source-extracted frontend diff scenarios with a mocked API, covering inheritance, removal, replacement, no draft, draft-only rows, and rename/content preservation; all passed. Full and incremental The PR reports E2E coverage for editors, icon display, CLI round trips, and fork propagation; those checks were not rerun here. In Review & Deploy, open a raw-app draft without Through the actual MCP surface, confirm The PR’s skipped API checks remain: SVG, oversized image, invalid name, and invalid color should return 400; updates without |
Pi ReviewGood to merge Follow-up to my previous pass, which flagged the raw-app diff treating an absent What changed since my last review. Considered and dismissed
Test coverageBackend — Frontend — CLI — no automated tests for the icon round trip; the PR's E2E run exercised pull/push, a color change, removal, and the "0 changes" re-push. Manual verification still outstanding — the two items the PR itself lists as unexercised: (1) the API edge cases (SVG / oversize / bad name / bad color → 400; update without |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 19s —— View job Good to merge Review (follow-up covering
|
Codex ReviewGood to merge Reviewed Test coverageBackend unit tests cover image validation, draft preservation, and omitted-versus-null deploy/diff behavior; handler/DB integration tests remain absent. Frontend settings tests cover inheritance/removal; image utilities lack dedicated coverage. Automated CLI icon round-trip tests remain absent. This import-only follow-up needs no new logic tests; documentation/config changes need none. Full and incremental A public-app page smoke test after this import change remains unverified here: it should render without console errors or loading the generated services chunk. The PR’s skipped API and actual MCP checks remain: invalid icon payloads should reject, omitted icons should persist through updates and deployment, and explicit |
Pi ReviewGood to merge This PR has already been through several review rounds (Codex P1 and Pi P2 findings on absent-vs- Considered and dismissed
Test coverageBackend — Frontend — CLI / docs / config — the CLI icon round-trip has no automated test, but the E2E list covers pull/push, color-change, remove-from-yaml, and a second-push-reports-0-changes; Manual verification still neededThe two paths the PR itself lists as unexercised: the API edge cases (SVG, oversize image, bad name, bad color → 400; update without |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 1m 2s —— View job Good to merge Review (follow-up covering
|
Codex ReviewGood to merge Reviewed Test coverageCommitted backend unit tests cover image validation and icon inheritance/removal; API integration coverage remains absent. Frontend settings tests cover inheritance/removal, but the new crop/image utilities and recent-item icon refresh have no dedicated regression tests. Svelte component tests are not expected. Automated CLI icon round-trip coverage remains absent; documentation/config changes need no tests. Full and incremental Repository suites and live-instance verification were not run: frontend dependencies/generated client and running services are absent. Exercise image cropping with wide and tall uploads, dragging, wheel/slider zoom, cancellation, and deployment. Confirm the saved crop and rounded favicon match the previews. Verify Lucide/image icons across the newly changed pickers, search, favorites, recent items, chat, and deployment lists, including icon replacement and removal. The PR’s skipped API validation and actual MCP omission/removal scenarios remain unverified here. |
Pi ReviewGood to merge The two commits added since the last reviewed head ( The earlier findings I would otherwise re-raise are already resolved and pinned by tests, so I did not re-flag them. My independent pass over the new surface (the Considered and dismissed
Test coverageBackend — the last two commits add no Rust logic (only Frontend — the new pure logic in Docs/config-only ( Manual verification still needed before merge: the two paths the PR itself lists as unexercised remain open. First, the API edge cases — send an SVG data URL, an image over 512 KB, a bad Lucide name and a bad color through the raw-source and low-code update endpoints and confirm each returns 400; then confirm an update with no |
|
/claude |
|
/review |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @Guilhem-lm's task in 1m 1s —— View job Good to merge Review (follow-up covering
|
Codex ReviewGood to merge Reviewed Test coverageBackend unit tests cover image validation and icon inheritance/removal; handler/DB integration coverage remains absent. Frontend settings tests cover inheritance/removal; crop/image utilities and recent-item refresh lack dedicated regression tests. Svelte component tests are not expected. Automated CLI icon round-trip coverage remains absent; documentation/config changes need no tests. Full and incremental Repository suites and live-instance verification were not run: frontend dependencies/generated client and running services are absent. After the merge, smoke-test Home’s Recent and Favorites with Lucide and image icons on both app kinds. Icons should survive starring/un-starring, while other item kinds retain their usual glyphs. The actual MCP omission/removal scenario remains unexercised in the PR: an omitted |
Pi ReviewGood to merge This PR has already been through several review rounds (Codex/Claude/Pi findings on absent-vs- Considered and dismissed
Test coverageBackend — Frontend — CLI / OpenAPI / docs / config — no automated tests expected; the PR's E2E run covers Manual verificationThe PR's own E2E checklist covers nearly everything. The two paths called out across every prior review remain the only unexercised surfaces: the raw API edge cases (submit an SVG data URL, a >512 KB image, a bad Lucide name, and a bad color, each expecting 400 with nothing written; then an update without |
Summary
An app's author can give the app an icon: a Lucide icon on a color, or an uploaded image. The icon
replaces the app-kind glyph wherever the app is listed (homepage rows, Recent and Favorites, search,
pickers, chat mentions, the Compare page) and in the app page header (before the summary), and
becomes the app page's browser-tab icon. Apps without an icon look exactly as before.
EE companion: windmill-labs/windmill-ee-private#1037 (registers the
app_icon/setusage counter).Changes
Storage and API
app.icon(JSONB descriptor:{kind: "lucide", name, color}or{kind: "image", hash}) andapp.icon_image(the image's data URL). Two columns so the applist never reads image bytes: Postgres decompresses a whole jsonb value to read one key.
CreateApp.icon/EditApp.icon(raw create/update included). On update an absenticonkeepsthe stored one and
nullclears it. Validation: Lucide name[a-z0-9-]{1,64}, color#rrggbb, image a PNG/JPEG/WebP base64 data URL up to 512 KB. SVG is refused because theimage is served from the API origin, where an SVG opened on its own would run its scripts.
get_app,get_app_by_id, workspace export) return the image assrc; the list,lite read and runnables list return the descriptor only.
GET /w/{ws}/apps/icon/{path}?v=<hash>: the decoded image with its content type,nosniff, andprivate, max-age=31536000, immutablewhenvis the current hash(
no-cacheotherwise). Read through the user's DB connection plus theapps:readscope.iconthrough edits,deploy_workspace_itemsends it (absent on update →
null, so a removal deploys), anddiffcompares it for low-codeand raw apps, mirroring the UI's deploy and diff code.
Frontend
AppIconSettingin the app settings drawer (None / Icon / Image). An uploaded image goes througha crop dialog (zoom and pan) and is stored as a 512 px WebP (JPEG fallback). Lucide icons come from the bundled
lucide-sveltethrough a lazy
import.meta.glob, loaded only when an app has a Lucide icon.AppIconBadgedraws the icon;ItemIconuses it in place of the kind glyph for apps in everyworkspace item list (homepage rows, Recent and Favorites, ⌘K search, path and breadcrumb pickers,
chat mentions and context, the Compare and Review & Deploy rows) and in the page header
(
PageHeaderItem.icon). It falls back to the kind glyph if the icon fails to load. Lists andbrowser storage hold only the descriptor, never image data.
leave.
null= removed, absent = a draft from beforeicons, which keeps the deployed one), in Review & Deploy and in the AI session's raw-app editor.
CLI
app.yaml/raw_app.yamlcarryicon, an image inline as a data URL. The yaml is the source oftruth: removing
iconfrom it and pushing clears the deployed icon; an unchanged icon is notre-pushed.
windmill-utils-internaldeployItemsendsicon: nullfor an app without one, so deploying afork's removal reaches the parent.
Telemetry
feature_usageapp_icon/set, keylucide|image, logged when an author picks a Lucideicon or uploads an image. Plain counter, no disclosure change.
Test plan
End-to-end run by an independent agent against this branch's backend (
quickjs,enterprise,private,parquet) and frontend, scratch apps only:rocket/#e11d48→ deploy. Home row shows the badge, app page header shows it before the summary, tab icon is thedata:image/svg+xmlwith that color./apps/icon/<path>?v=<hash>, which answersimage/webp,nosniff, andprivate, max-age=31536000, immutable(only with the current hash;no-cacheotherwise; 401 without auth)./logo.svg, icon endpoint 404.iconkeeps it;icon: nullclears both columns; an icon-only update adds no version./logo.svg.sync pullwritesiconintoapp.yaml/raw_app.yaml(image inline); a color change pushes; removingiconfrom the yaml clears the deployed icon; a second push reports 0 changes.feature_usagegetsapp_icon/set/lucideandapp_icon/set/image; one pick and one upload each add exactly 1.write_app_filekeeps a drafted icon (and a draftednull),diffreports icon changes for raw and low-code apps,deploy_workspace_itemdeploys the drafted icon or its removal. The MCP surface, where the server saves the draft itself, runs the samenormalize_app_draftbut was not exercised (nomcpfeature or AI key on this backend); the unit tests below pin it.cargo test -p windmill-api --lib -- ai_session_tools app_icon: 66 passed (new:stores_only_raster_data_urls,app_drafts_keep_a_removed_icon,a_raw_app_update_removes_the_icon_only_on_an_explicit_null).vitestappDraftSettings.test.ts(new icon case) passes;npm run check: 0 errors.Demo
1796374932-app-icon-demo.mp4
Screenshots
Home page rows (Lucide icon, no icon, uploaded image):
App page header, before (no icon) and after (Lucide icon, image):
The setting in the app settings drawer:
An icon-only raw-app draft in Review & Deploy, and a fork's icon removal on the Compare page:
Notes
raw_apps/utils.test.ts› "collapses a nested deployed row and a flat draft…" fails onmaintoo (it differs on
parent_version); not touched here.🤖 Generated with Claude Code