checkpoint: Impeccable themes + ProfileEditModal
This commit is contained in:
parent
8366af7d86
commit
b93443a716
1 changed files with 15 additions and 13 deletions
|
|
@ -1,27 +1,29 @@
|
||||||
# Checkpoint — fix profile delete/undo + themed auto-dismiss bar (2026-08-27)
|
# Checkpoint — Impeccable themes + ProfileEditModal (2026-08-27)
|
||||||
|
|
||||||
## Where things are
|
## Where things are
|
||||||
- Project: `/home/avi/Projects/Nostr_Keynctr`
|
- Project: `/home/avi/Projects/Nostr_Keynctr`
|
||||||
- Git repo: `master` @ `9e635e7` ("fix: restore profile delete/undo and themed auto-dismiss undo bar"). Before it: `56c2a6d` (checkpoint: click profile row), `8130c3e` (click profile row on Home), `a5838ea`, `98f4520` etc.
|
- Git repo: `master` @ `8366af7` ("feat: add Impeccable themes (light + dark) + unified ProfileEditModal"). Before it: `832e114` (checkpoint: fix delete/undo), `9e635e7` (fix delete/undo bar), `56c2a6d` (click profile row), `8130c3e` etc.
|
||||||
- Working tree: clean except `KeynectrAppIconPossibility02.jpeg` untracked (long-standing, not part of commits).
|
- Working tree: clean except `.opencode/` (impeccable skill install, not tracked) and `KeynectrAppIconPossibility02.jpeg` untracked (long-standing).
|
||||||
|
|
||||||
## What was completed
|
## What was completed
|
||||||
1. **Fixed broken profile delete/undo.** `src/ipc.rs` was missing `DeleteProfile`/`UndoDelete` request variants and handlers, so `delete_profile` from renderer returned `Unexpected signer request`. Added `DeleteProfile {npub}`/`UndoDelete` to `Request`, handlers that call `profiles::delete_profile`/`app.undo_delete()`, save vault, push/pop `undo_history`, return `state_view()`. Exposed `profiles::delete_profile` outside `#[cfg(test)]` (was only inside tests). Updated `src/profiles.rs` accordingly. CLI `delete_profile_direct` kept for `main.rs`.
|
1. **Fixed broken profile delete/undo** (previous). `src/ipc.rs` missing `DeleteProfile`/`UndoDelete`; added handlers returning `state_view`; exposed `profiles::delete_profile` outside tests; `api.ts`/`AppProvider` now `call<AppState>` via `applyState`; `fakeBackend` delete/undo.
|
||||||
2. **Wired frontend to backend state.** `frontend/src/lib/api.ts`: `deleteProfile`/`undoDelete` now `call<AppState>` (was `ProfileSummary`). `frontend/src/state/AppProvider.tsx`: both now use `applyState(...)` and type `Promise<AppState>`; added `clearLastDeleted` that locally slices `undo_history` for UI dismissal.
|
2. **Themed auto-dismiss undo bar.** Replaced permanent white bar with `var(--primary-soft)` + `var(--primary)` link `Undo and restore profile`, 5s `useEffect` watching `lastDeleted`, shown in both empty/populated states.
|
||||||
3. **Themed auto-dismiss undo bar.** `frontend/src/screens/ProfilesScreen.tsx`: replaced permanent white bar (`var(--token-item-bg, #f0f0f0)` + "Profile deleted. You can restore it until you delete another or quit.") with themed bar (`var(--primary-soft)` bg, `var(--border)` border) showing `Profile "X" deleted. — Undo and restore profile` where the link uses `var(--primary)` (adapts to light/dark/neon/glass). Bar appears in both empty and populated states, auto-dismisses after 5s via `useEffect` watching `lastDeleted` (previous version fired unconditionally on mount). Fake backend updated to simulate delete/undo for tests.
|
3. **Impeccable themes (light + dark).** `src/settings.rs`: `Theme::Impeccable` + `ImpeccableDark` (serde `impeccable-dark`); `types.ts` union extended; `styles.css` added `:root[data-theme='impeccable']` (oklch 97% lacquer light, kinpaku gold `oklch(77% .13 82)`, Alumni Sans 300) and `impeccable-dark` (oklch 15% lacquer-deep, champagne text), editorial refinements (uppercase labels, 8/3px radii, nav left-border active, card offset bar); `SettingsScreen.tsx` adds both options with live `var(--*)` swatches.
|
||||||
|
4. **Unified ProfileEditModal.** `frontend/src/components/ProfileEditModal.tsx` — Paper Lift modal (`var(--surface)`/`var(--border)`/`16px`/`0 12px 40px`), 3 tabs (Name/Picture/NIP-05) sharing `renameProfile`/`setProfilePicture`/`setNip05`; `ProfilesScreen.tsx` wires `Edit profile` (secondary) alongside legacy ghosts; `DESIGN.md` + `PRODUCT.md` + `.impeccable/design.json` from `impeccable document` (Vault & Atelier, warm ivory/charcoal/coral, 9 primitives).
|
||||||
|
|
||||||
## Commits added in this session (newest first)
|
## Commits added in this session (newest first)
|
||||||
|
- `8366af7` feat: add Impeccable themes (light + dark) + unified ProfileEditModal
|
||||||
|
- `832e114` checkpoint: fix delete/undo + themed auto-dismiss bar
|
||||||
- `9e635e7` fix: restore profile delete/undo and themed auto-dismiss undo bar
|
- `9e635e7` fix: restore profile delete/undo and themed auto-dismiss undo bar
|
||||||
|
|
||||||
## Verification commands run (all green)
|
## Verification commands run (all green)
|
||||||
- Rust: `cargo fmt --check` clean; `cargo clippy --all-targets` 2 pre-existing warnings; `cargo test` 115 passed; `cargo build --release` success
|
- Rust (repo root): `cargo fmt --check` clean; `cargo clippy --all-targets` 2 pre-existing warnings; `cargo test` 115 passed; `cargo build --release` success
|
||||||
- Frontend (`frontend/`): `npm run typecheck` clean; `npm run lint` clean; `npm run format:check` clean (after `npm run format`); `npm test` 15 files / 99 tests passed; `npm run build` success; `npm run electron:build` success
|
- Frontend (`frontend/`): `npm test` 15 files / 99 tests passed; `npm run typecheck` clean; `npm run lint` clean; `npm run format:check` clean (after `npm run format`); `npm run build` success; `npm run electron:build` success
|
||||||
- The `--ozone-platform=wayland` Vulkan and `has no handler with id` messages seen on `electron:build` are harmless Electron/Wayland warnings, not profile errors.
|
- Wayland `--ozone-platform` / `has no handler` messages on `electron:build` are harmless.
|
||||||
|
|
||||||
## How to resume / reproduce
|
## How to resume / reproduce
|
||||||
GUI: `cargo build --release && cd frontend && npm run build && npm run electron:build && npm start` (or `npm run dev`). Create 2 profiles, delete one via Profiles → Delete → confirm, see themed undo bar for 5s with "Undo and restore profile" in primary color, click it to restore, or wait for auto-dismiss.
|
GUI (Impeccable): `cargo build --release && cd frontend && npm run build && npm run electron:build && npm start` (or dev: `npm run dev` in one terminal + `NOSTR_GUI_DEV_URL=http://localhost:5173 npm start` in second). Settings → Appearance → `Impeccable — Light` / `Impeccable — Dark` (gold on ivory lacquer vs lacquer-deep). Profiles → Delete → see themed undo bar 5s; Edit profile → tabbed modal. CLI: `cargo run -- settings set theme impeccable` / `impeccable-dark`.
|
||||||
CLI: `cargo run -- delete-profile <npub>` then `cargo run -- undo-delete` (in-memory undo only within same `serve` session; CLI undo across processes is not persisted).
|
|
||||||
|
|
||||||
## Outstanding / next-step items
|
## Outstanding / next-step items
|
||||||
- Undo restores profile with empty `secret_key` (`StoredProfile { secret_key: "" }`) — existing design stores `ProfileSummary` in `undo_history` so secret cannot be recovered. Needs full `StoredProfile` in undo stack if secret preservation is required.
|
- Undo restores with empty `secret_key` (stores `ProfileSummary`); needs `StoredProfile` in `undo_history` for full secret recovery.
|
||||||
- `KeynectrAppIconPossibility02.jpeg` remains untracked; `concept3.svg` deletion already committed earlier.
|
- `.opencode/` skill files and `KeynectrAppIconPossibility02.jpeg` remain untracked; not part of theme commits.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue