docs(checkpoint): grant kind-editing backend @ d7cf2a5; session stopped here

This commit is contained in:
Avi 2026-09-30 15:05:08 -05:00
commit 8070dfc0a2

View file

@ -1,3 +1,71 @@
# Checkpoint — grant kind-editing backend (2026-09-30, session stopped mid-Step-4)
## Where things are
- Project: `/home/avi/Projects/Keynctr`, branch `master` @ **`d7cf2a5`**
("feat(signer): grant kind-editing backend (vault + IPC + api plumbing)").
Previous: `ec8b515` + `aef47dd` (profile-relay queries, checkpoint above),
`eea6f0e` (white launcher icon), `abc2781` (one-click update script).
- Working tree: clean for tracked files. Untracked intentionally NOT
committed: `COSMIC_THEME.md`, `KeynectrAppIconPossibility02.jpeg`,
`deferred/SignerConnectionPanel.tsx.wip/`.
- origin/master behind: local ahead by 4 commits (push still blocked — no
Forgejo credentials stored; needs a token via the one-shot extraHeader
method).
## What was completed (this checkpoint)
**Grant kind-editing backend — Step 4 remainder, first half** (session was
stopped by the user mid-build; the UI half is NOT started):
1. `vault.rs`: `Vault::update_signer_grant_kinds(app, method, kinds)` —
replaces a standing grant's kind scope, normalised (sorted + deduped).
Empty list = "all kinds" (same representation legacy grants use), so
broadening is explicit, never from omission. Unknown (app, method)
returns false, changes nothing. New unit test
`signer_grant_kinds_can_be_edited`.
2. `ipc.rs`: `Request::SignerGrantUpdate { app_pubkey, grant_method,
grant_kinds }` (field names avoid the internal `method` tag; kinds use
`serde(default)` so legacy payloads stay valid) + handler that saves the
vault only when a grant actually changed.
3. Frontend plumbing only, NO UI yet: `api.signerGrantUpdate`, the
AppProvider context type + callback + value/deps lists, and the
`signer_grant_update` case in `fakeBackend.ts` mirroring the backend
normalisation.
## Commits added this session (newest first)
- (this checkpoint commit)
- `d7cf2a5` feat(signer): grant kind-editing backend
- `ec8b515` docs(checkpoint): profile-relay queries @ aef47dd
- `aef47dd` fix(feed): query profile relays for kind-3 follow lists and
kind-0 metadata (WIP of the previous dead session, verified + dedupe bug
fixed: trailing-slash normalising via a seen-set)
## Verification (2026-09-30 @ d7cf2a5)
- `cargo test` -> 226 unit passed, 0 failed (e2e 6 green at aef47dd run).
- `cargo clippy --all-targets` -> 0 warnings; `cargo fmt --check` clean.
- `cargo check` green. NOTE: release binary at target/release/keynectr was
built at aef47dd, NOT d7cf2a5 — rebuild before shipping the new RPC.
- `frontend`: `npm run typecheck` clean; `npm test` -> 139 passed (19
files). No new UI tests yet (no UI yet).
## How to resume
- NEXT UNIT (was next when stopped): the Signer-screen grant editor —
inline kind editing on the "Always-allow permissions" card in
`frontend/src/screens/SignerScreen.tsx` (grants list, lines ~243-268):
edit kinds for a `sign_event` grant -> `signerGrantUpdate(app, method,
kinds)`; include an explicit "all kinds" option (empty list), Revoke
stays as is. Add `SignerScreen.test.tsx` cases against the fakeBackend
`signer_grant_update` case, then the full gates + release rebuild +
checkpoint update.
- GUI dev loop: `cd frontend && npx vite --port 5173`, then
`NOSTR_GUI_DEV_URL=http://localhost:5173 KEYNCTR_ENABLE_GPU=1 npx electron .`
- Push when a token is available: `git push origin master` (4 ahead).
## Outstanding / next steps
- Grant editor UI (above) — second half of Step 4 remainder.
- Live pass: "My contacts" with the rebuilt backend (aef47dd fix).
- Push 4 commits to Forgejo.
---
# Checkpoint — profile-relay queries for contacts + metadata backfill (2026-09-30)
## Where things are