Checkpoint: profile rename feature

This commit is contained in:
Avi 2026-08-23 18:49:50 -05:00
commit 6df690fe8f

View file

@ -1,4 +1,4 @@
# Checkpoint — Card-click selection + narrow-window button wrap (2026-08-23)
# Checkpoint — Profile rename + card-click selection + button wrap (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.
@ -7,31 +7,39 @@ verified green at the moment this file was written.
- Project: `/home/avi/Projects/Nostr_Keynctr` (renamed from `0_Nostr` after commit `1116dfd`;
folder itself renamed from `Nostr-Keynectr` — see `2e4005d`)
- Git repo: `master` @ `64502c1` ("Wrap profile card action buttons on narrow windows").
Before it: `653945a` (card-click selection), `2e4005d` (folder-rename checkpoint),
`24b34b6`, `6ead6f4`, `31ef305` (Keynectr rebrand), `a6329d5` (metadata publishing),
`db81f8d` (delete + undo).
- Git repo: `master` @ `d618a5a` ("Add profile rename with metadata republish (GUI +
CLI)"). Before it: `64502c1` (button wrap), `653945a` (card-click selection),
`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
1. **Click anywhere on a profile card to select it (2026-08-23)** — on the Profiles
1. **Rename a profile (2026-08-23)** — new "Edit name" button on every Profiles card
opens a modal (prefilled with the current name); saving stores the new label and
republishes kind 0 metadata to enabled relays (`d618a5a`). Wired end-to-end:
`profiles::rename_profile` (Rust), `rename_profile` IPC request, Electron
RENDERER_METHODS allowlist, `api.renameProfile`, AppProvider `renameProfile`,
RenameModal UI, fake-backend support + test. CLI: `keynectr rename <npub>
<new-name>`. Empty names rejected; whitespace trimmed; works offline (change saved,
publish retried later via "Publish name").
2. **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. **Action buttons wrap on narrow windows (2026-08-23)** — `.profile-card-actions` now
uses `flex-wrap: wrap`, so at half-screen width the Copy/Publish/Picture/Delete/
Secret key/Select buttons wrap onto extra rows inside the card instead of spilling
past its border (`64502c1`).
3. **Project folder renamed** to `Nostr_Keynctr` (`2e4005d`) — old path
Picture / Edit name / Delete / Secret key / Select) do not trigger selection. The
active card is not clickable and shows a hover highlight on inactive cards.
3. **Action buttons wrap on narrow windows (2026-08-23)** — `.profile-card-actions` now
uses `flex-wrap: wrap`, so at half-screen width the action buttons wrap onto extra
rows inside the card instead of spilling past its border (`64502c1`).
4. **Project folder renamed** to `Nostr_Keynctr` (`2e4005d`) — old path
`Nostr-Keynectr` no longer exists; same project, new name.
4. Earlier in the session: Keynectr rebrand across UI/package/binary (`31ef305`,
5. Earlier in the session: Keynectr rebrand across UI/package/binary (`31ef305`,
`6ead6f4`, `24b34b6`), metadata/picture publishing (`a6329d5`) — see previous
checkpoint notes below for details.
## Commits added most recently
- `d618a5a` Add profile rename with metadata republish (GUI + CLI)
- `64502c1` Wrap profile card action buttons on narrow windows
- `653945a` Select a profile by clicking anywhere on its card
- `2e4005d` Checkpoint: project folder renamed to Nostr_Keynctr
@ -41,9 +49,9 @@ verified green at the moment this file was written.
Rust (repo root):
```
cargo test # 96 passed; 0 failed
cargo test # 99 passed; 0 failed
cargo clippy --all-targets # finishes; 2 pre-existing warnings in src/profiles.rs
# (drop of reference at :170, unused delete_profile at :761)
# (drop of reference at :170 area, unused delete_profile)
cargo fmt --check # clean
cargo build --release # success
```
@ -51,7 +59,7 @@ cargo build --release # success
Frontend (`frontend/`):
```
npm test # 14 files, 80 tests passed (incl. 2 new card-click tests)
npm test # 14 files, 81 tests passed (incl. rename + card-click tests)
npm run typecheck # clean
npm run lint # 0 errors
npm run format:check # clean
@ -69,6 +77,8 @@ 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.
- Profiles screen: **Edit name** button opens a modal to rename a profile and publish
the new name.
- 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.
@ -81,6 +91,7 @@ $B list # show profiles
$B relays enable wss://nos.lol # enable at least one relay first
$B publish-name <npub> # republish stored name
$B set-picture <npub> https://…/img.png # set + publish picture
$B rename <npub> <new-name> # rename + publish the new name
```
## Notes & next steps
@ -98,8 +109,8 @@ $B set-picture <npub> https://…/img.png # set + publish picture
identifier field per profile (GUI + CLI), include it in published metadata, plus docs
or a helper for serving `.well-known/nostr.json` on the user's domain (the HTTP side
cannot be done by the app alone).
- Other candidates: rename profiles (edit label + republish), banner/about fields in the
edit UI.
- Other candidates: banner/about fields in the edit UI. (Rename profiles was completed
2026-08-23.)
- **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.