Checkpoint: taskbar icon via desktop entry

This commit is contained in:
Avi 2026-08-24 11:48:34 -05:00
commit 5f27c4585b

View file

@ -6,30 +6,39 @@ verified green at the moment this file was written.
## Where things are
- Project: `/home/avi/Projects/Nostr_Keynctr`
- Git repo: `master` @ `8a644af` ("App icon: hummingbird-key mark for window
and packaged Linux builds"). Before it: `c11ab9f` (security dependency
upgrades), `48efaad` (checkpoint), `8bce428` (updates card).
- Git repo: `master` @ `cbbe779` ("Desktop entry + Wayland app id so the
taskbar shows the app icon"). Before it: `8a644af` (app icon), `4d9489b`
(checkpoint), `c11ab9f` (security upgrades).
- Working tree: clean apart from this checkpoint update. Note: `concept3.svg`
shows as deleted in the working tree and `KeynectrAppIconPossibility02.jpeg`
(the icon source art) is untracked — both left as the user had them, not committed.
## What was completed
1. **App icon (2026-08-24, `8a644af`).** The hummingbird-key artwork
(`KeynectrAppIconPossibility02.jpeg`) is now the app icon everywhere:
- `frontend/build/icon.png` — 512×512 PNG used by electron-builder for
packaged Linux builds (`build.linux.icon`), i.e. desktop entries/installers.
- `frontend/public/icon.png` — copied by Vite into `dist/`, shipped inside
the packaged asar; `BrowserWindow({ icon })` loads it at runtime in both
dev (`public/`) and packaged (`dist/`) modes.
- Verified end-to-end: `npm run dist` produced `release/linux-unpacked`
with the icon inside `app.asar` (`/dist/icon.png`).
2. Earlier today: all npm security advisories cleared via major upgrades
1. **Taskbar icon on KDE Wayland (2026-08-24, `cbbe779`).** The user reported
no icon after restart. Root cause: on Wayland there are no per-window
icons — the KDE taskbar resolves the running app through an installed
`.desktop` file, which Keynectr did not have. Fix:
- `frontend/scripts/install-desktop-entry.sh` (npm script
`desktop:install`) installs
`~/.local/share/icons/hicolor/512x512/apps/keynectr.png` and
`~/.local/share/applications/keynectr.desktop` (Icon=keynectr,
StartupWMClass=keynectr) and refreshes the desktop database. **Run once
per machine.**
- `app.setDesktopName('keynectr.desktop')` in `electron/main.ts` (called
before `ready`; Electron 43 renamed the old `setDesktopFileName`) pins
the app id so the desktop file always matches.
2. **Window + packaged icon (2026-08-24, `8a644af`).** Hummingbird-key artwork
as `frontend/build/icon.png` (electron-builder `linux.icon`) and
`frontend/public/icon.png` (shipped in the asar, loaded by BrowserWindow —
effective on X11 titlebars and inside packaged builds).
3. Earlier today: all npm security advisories cleared via major upgrades
(`c11ab9f`), Updates card (`8bce428`), feed profile filter (`55a49b4`),
publish latency trim (`b001b3c`).
## Commits added most recently
- `cbbe779` Desktop entry + Wayland app id so the taskbar shows the app icon
- `8a644af` App icon: hummingbird-key mark for window and packaged Linux builds
## Verification commands run (all green)
@ -37,34 +46,34 @@ verified green at the moment this file was written.
Frontend (`frontend/`):
```
npm run desktop:install # installed icon + keynectr.desktop for this user
npm test # 14 files, 91 tests passed
npm run typecheck # clean
npm run lint # 0 errors
npm run format:check # clean
npm run build # vite build success (dist/icon.png present)
npm run electron:build # tsc electron main success
npm run dist # electron-builder linux dir target packaged OK (electron 43.4.1)
npm run electron:build # tsc electron main success (setDesktopName compiled)
npm run dist # electron-builder linux dir target packaged OK (earlier)
```
## How to use / reproduce
```bash
cd ~/Projects/Nostr_Keynctr/frontend
npm start # dev window shows the icon
npm run dist # packaged app in release/linux-unpacked (icon in asar)
npm run desktop:install # once per machine
npm start # restart the app -> taskbar shows the icon
```
To change the artwork later: overwrite `frontend/build/icon.png` and
`frontend/public/icon.png` (512×512 PNG), rebuild.
## Notes & next steps
- The source JPEG has a white background (kept as-is). If a transparent
version is ever wanted for dark taskbars, regenerate the PNGs from a
transparent source.
- On Wayland, KDE may need the app restarted (and occasionally the panel to
refresh) before the icon swaps from the generic one.
- The source JPEG has a white background (kept as-is); regenerate the PNGs
from a transparent source if dark-taskbar polish is wanted.
- For real installer targets (deb/AppImage), electron-builder embeds the icon
and desktop file automatically from `build/`; the manual install above only
covers running from source.
- Sharing decision (this session): user chose "shared access on same machine" —
the current single-vault + passcode model already covers it; no new sharing
feature needed. Distribution to others = `npm run dist` + their own passcode.
the current single-vault + passcode model already covers it.
- Relay health (earlier today): damus.io 503, nostr.band WS handshake timing out.
---