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