feat(dashboard): extract real per-app icons for Time-by-app
Your work logs itself. Meridian watches what you build - no prompts, no timers - classifies every session into the right task, and auto-updates Jira, Linear, and GitHub Issues. All data stays on your machine.
Brought to you by:
prateekbhoge320
Originally posted by: coderabbitai[bot]
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feat/app-icon-extraction`Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands.Originally posted by: Akarsh-Hegde
Review — extract real per-app icons for Time-by-app
Summary: A cleanly-scoped, well-documented feature that swaps letter monograms for real
.app-bundle icons (with a vendored brand-wordmark mid-tier fallback); no blocking issues found.Blocking / correctness issues
None. I checked the highest-risk item — the asset protocol. The
<img src>relies onconvertFileSrc+ Tauri's asset protocol, which needssecurity.assetProtocol.enable+ ascopecovering the cache dir. This diff doesn't touchtauri.conf.json, but its base branch already setsassetProtocol.enable: truewithscope: ["$HOME/.meridian/icon-cache/*"], and the cache writes flat files (icon-cache/<key>.png), so the single-level*glob matches. Custom#[tauri::command]s need no capability entry in Tauri v2, so registeringget_app_iconininvoke_handler!(lib.rs:494) is complete.Suggestions / nits
simple-iconsis a runtimedependencybut never imported (ui/package.json). The path data inui/lib/brand-icons.tsis hand-vendored (noimport ... from 'simple-icons'). It's a build-time reference source only — belongs indevDependencies(or drop it). As-is it bloats installs without shipping anything. This is the one I'd fix before merge.app_icons.rs:241). Once~/.meridian/icon-cache/<key>.pngexists it's served forever — a stale icon survives an app update/reinstall (no TTL or bundle-mtime check). Acceptable for v1; worth a comment noting the cache is permanent.cache_keycollisions (app_icons.rs:175): lowercasing + mapping every non-alphanumeric to_means distinctapp_names can collapse to the same key ("Foo Bar"vs"Foo-Bar") and get served the wrong cached icon. Low probability, but combined with the permanent cache it's a sticky wrong-icon — a short hash suffix removes the risk.app_icons.rs:222): keepingget_app_iconsynchronous is correct — Tauri v2 runs non-asynccommands on the main thread, whereNSWorkspace/NSImagewant to be. Worth a one-line comment saying so, because the instinct to make the blocking fs + PNG-encodeasyncwould move the rawunsafeAppKit calls off the main thread. Footgun for the next editor, not a bug today..map_err(|e| e.to_string())(app_icons.rs:238,257) drops theanyhow-context style the repo prefers; minor given how shallow these are.Strengths
Map+ in-flight-promise cache inui/lib/app-icons.tsmeans oneinvokeper distinct app name for the whole session, not per render/instance.useAppIconUrlreturnsnulloff-Tauri / on failure so the existing glyph always renders;cancelledflag handles unmount/appName-change cleanly.iconForFile:only called afterresolve_bundle_pathconfirms the bundle exists, avoiding NSWorkspace's generic-icon trap. File headers on line 1,#[tracing::instrument]+ debug/warn, per-iconviewBoxstored, license/trademark provenance documented, hermetic unit tests forresolve_bundle_path_in/cache_key.Verdict: Approve with minor nits. No correctness blockers; the
simple-iconsdependency placement is the one to fix before merge, the rest are follow-up comments.🤖 Automated review via Claude Code
Ticket changed by: adityaharishch