Checkpoint: card-click profile selection
This commit is contained in:
parent
653945a5e8
commit
355e07f40f
1 changed files with 29 additions and 48 deletions
|
|
@ -1,54 +1,34 @@
|
|||
# Checkpoint — Profile metadata publishing + profile pictures (2026-08-22)
|
||||
# Checkpoint — Card-click profile selection + rename to Nostr_Keynctr (2026-08-23)
|
||||
|
||||
**App renamed to Keynectr (2026-08-23).** A stopping point you can return to if this session is closed. Everything below was
|
||||
verified green at the moment this file was written.
|
||||
|
||||
## Where things are
|
||||
|
||||
- Project: `/home/avi/Projects/Nostr_Keynctr` (renamed from `0_Nostr` after commit `1116dfd`)
|
||||
- Git repo: `master` @ `a6329d5` ("Publish profile metadata (name + picture) so external
|
||||
clients show it"). Before it: `db81f8d` (profile deletion with undo), `9a8f334`
|
||||
(audit checkpoint refresh), and the 2026-08-21 audit-fix commits (`f7db29e`, `d90b6e5`,
|
||||
`130d7e2`).
|
||||
- Project: `/home/avi/Projects/Nostr_Keynctr` (renamed from `0_Nostr` after commit `1116dfd`;
|
||||
folder itself renamed from `Nostr-Keynectr` — see `2e4005d`)
|
||||
- Git repo: `master` @ `653945a` ("Select a profile by clicking anywhere on its card").
|
||||
Before it: `2e4005d` (folder-rename checkpoint), `24b34b6`, `6ead6f4`, `31ef305`
|
||||
(Keynectr rebrand), `a6329d5` (metadata publishing), `db81f8d` (delete + undo).
|
||||
- Working tree is **clean** apart from this checkpoint update, which is committed right after.
|
||||
|
||||
## What was completed
|
||||
|
||||
**Problem:** profiles created in the app never published a Nostr kind 0 metadata event,
|
||||
so other clients showed generated petnames ("evil iguana", "homeless leech") or a
|
||||
truncated npub instead of the user's chosen name.
|
||||
1. **Click anywhere on a profile card to select it (2026-08-23)** — on the Profiles
|
||||
screen, clicking an inactive profile's card now does the same as pressing its
|
||||
"Select" button (`653945a`). Clicks on buttons inside the card (Copy / Publish name /
|
||||
Picture / Delete / Secret key / Select) do not trigger selection. The active card is
|
||||
not clickable and shows a hover highlight on inactive cards.
|
||||
2. **Project folder renamed** to `Nostr_Keynctr` (`2e4005d`) — old path
|
||||
`Nostr-Keynectr` no longer exists; same project, new name.
|
||||
3. Earlier in the session: Keynectr rebrand across UI/package/binary (`31ef305`,
|
||||
`6ead6f4`, `24b34b6`), metadata/picture publishing (`a6329d5`) — see previous
|
||||
checkpoint notes below for details.
|
||||
|
||||
1. **Automatic metadata on creation** — `create_profile` now publishes a kind 0 event
|
||||
with the label as `name`/`display_name` to all enabled relays (best-effort; relay
|
||||
failures never block creation).
|
||||
2. **"Publish name" action for existing profiles** — new button on every Profiles-screen
|
||||
card plus CLI `publish-name <npub>`. Returns a per-relay report shown in the UI.
|
||||
3. **Profile pictures end-to-end** —
|
||||
- Vault: optional `picture: Option<String>` per profile (serde default → old vaults
|
||||
load unchanged).
|
||||
- Backend: `set_profile_picture` validates http(s) URLs only, stores the URL, and
|
||||
publishes kind 0 including `picture`; clearing supported (`None`).
|
||||
- GUI: "Picture" button opens a modal — paste a URL, upload a file via the existing
|
||||
nostr.build pipeline, or remove; avatar shows the picture everywhere in-app.
|
||||
- CLI: `set-picture <npub> <url>`.
|
||||
4. **Nested-runtime safety** — metadata publishing runs on a dedicated OS thread with its
|
||||
own tokio runtime, so both sync (CLI) and async (IPC server) callers are safe.
|
||||
5. **Finished prior session's delete/undo work** — exposed `undo_history` in
|
||||
`AppStateView`, fixed invalid Button variants / missing icon / null-safety errors so
|
||||
the frontend typechecks again.
|
||||
6. **Test hygiene fix** — `Settings::default()` points at real relays and tests were
|
||||
silently publishing events to them (one got rate-limited by damus.io). All test suites
|
||||
now use offline settings; test time dropped from ~126 s to ~3 s.
|
||||
## Commits added most recently
|
||||
|
||||
## Commits added in this session
|
||||
|
||||
- `7c6a085` Rename the app to Keynectr
|
||||
- `ae5ddda` Allow new profile methods through the Electron IPC allowlist
|
||||
- `a6329d5` Publish profile metadata (name + picture) so external clients show it
|
||||
|
||||
**Gotcha for future work:** any new backend request type must also be added to
|
||||
`RENDERER_METHODS` in `frontend/electron/main.ts`, or the main process rejects it with
|
||||
"rejected renderer method" before it reaches the Rust backend.
|
||||
- `653945a` Select a profile by clicking anywhere on its card
|
||||
- `2e4005d` Checkpoint: project folder renamed to Nostr_Keynctr
|
||||
|
||||
## Verification commands run (all green)
|
||||
|
||||
|
|
@ -56,7 +36,8 @@ Rust (repo root):
|
|||
|
||||
```
|
||||
cargo test # 96 passed; 0 failed
|
||||
cargo clippy --all-targets # 0 errors/warnings from session code
|
||||
cargo clippy --all-targets # finishes; 2 pre-existing warnings in src/profiles.rs
|
||||
# (drop of reference at :170, unused delete_profile at :761)
|
||||
cargo fmt --check # clean
|
||||
cargo build --release # success
|
||||
```
|
||||
|
|
@ -64,7 +45,7 @@ cargo build --release # success
|
|||
Frontend (`frontend/`):
|
||||
|
||||
```
|
||||
npm test # 14 files, 78 tests passed
|
||||
npm test # 14 files, 80 tests passed (incl. 2 new card-click tests)
|
||||
npm run typecheck # clean
|
||||
npm run lint # 0 errors
|
||||
npm run format:check # clean
|
||||
|
|
@ -80,6 +61,8 @@ GUI:
|
|||
cd ~/Projects/Nostr_Keynctr/frontend && npm start
|
||||
```
|
||||
|
||||
- Profiles screen: click an inactive profile's card (anywhere except its buttons) to
|
||||
make it active; the Select button still works as before.
|
||||
- New profiles publish their name automatically on creation.
|
||||
- Existing profiles: **Profiles → Publish name** button, or **Picture** button to set a
|
||||
photo (URL paste or file upload) which publishes immediately.
|
||||
|
|
@ -94,12 +77,10 @@ $B publish-name <npub> # republish stored name
|
|||
$B set-picture <npub> https://…/img.png # set + publish picture
|
||||
```
|
||||
|
||||
Verified live during the session: kind 0 events confirmed present on nos.lol,
|
||||
relay.primal.net, relay.damus.io and the user's own wss://nostr.l484.com via direct
|
||||
websocket queries; Iris shows the stored names after publish.
|
||||
|
||||
## Notes & next steps
|
||||
|
||||
- Pre-existing clippy warnings in `src/profiles.rs` (drop of a reference, unused
|
||||
`delete_profile`) are untouched — worth cleaning up in a future pass.
|
||||
- Nostr has no relay-to-relay sync: names/pictures are only visible on relays they were
|
||||
published to. Keep major relays enabled so clients that don't read your own relay can
|
||||
see the profile.
|
||||
|
|
@ -116,7 +97,7 @@ websocket queries; Iris shows the stored names after publish.
|
|||
- **Rename details:** binary is now `keynectr`; data lives in `~/.local/share/keynectr`
|
||||
(auto-migrated from `nost-feed-manager` on first run — verified live). The KDF verifier
|
||||
string in crypto.rs was deliberately NOT renamed so old encrypted backups stay readable.
|
||||
If a GitHub remote is ever added, rename the repo to `Nostr_Keynctr` there too.
|
||||
The git remote is `https://git.atitlan.io/avi/Nostr_Keynctr`.
|
||||
- Relay config at time of writing (all enabled): nos.lol, relay.primal.net, l484.com
|
||||
(user's own), damus.io, snort.social, soloco.nl; relay.nostr.band added but was
|
||||
unreachable (handshake timeout) — retry enabling later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue