diff --git a/CHECKPOINT-encryption.md b/CHECKPOINT-encryption.md index 86dda29..2b2e456 100644 --- a/CHECKPOINT-encryption.md +++ b/CHECKPOINT-encryption.md @@ -6,13 +6,12 @@ verified green at the moment this file was written. ## Where things are - Project: `/home/avi/Projects/Nostr_Keynctr` -- Git repo: `master` @ `8130c3e` ("frontend: click a profile row on Home to - select it"). Before it: `98f4520` (active-profile picture on Compose + - sidebar), `f534165` (remove Profiles sidebar tab), `835b0a0` (list all - profiles on Home, pin dev host, widen card), `5635f79` (checkpoint), - `71e580f` (Trim white margins), `f29d4f9` (Checkpoint 0.45 migration), - `fa5ba08` (Security: upgrade nostr stack 0.40->0.45), `bf10ae3`, `e210f17`, - `7098e75`, `e6a1efc`, `6d5063d`, `1c428a9`. +- Git repo: `master` @ `98f4520` ("frontend: show active-profile picture on + Compose and sidebar"). Before it: `f534165` (remove Profiles sidebar tab), + `835b0a0` (list all profiles on Home, pin dev host, widen card), `5635f79` + (checkpoint), `71e580f` (Trim white margins), `f29d4f9` (Checkpoint 0.45 + migration), `fa5ba08` (Security: upgrade nostr stack 0.40->0.45), + `bf10ae3`, `e210f17`, `7098e75`, `e6a1efc`, `6d5063d`, `1c428a9`. - Working tree: still DIRTY with the long-standing user changes — `concept3.svg` deleted, `KeynectrAppIconPossibility02.jpeg` untracked. These are NOT part of the frontend commit above and remain uncommitted. @@ -44,7 +43,6 @@ verified green at the moment this file was written. ## Commits added most recently -- `8130c3e` frontend: click a profile row on Home to select it - `98f4520` frontend: show active-profile picture on Compose and sidebar - `f534165` frontend: remove redundant Profiles sidebar tab - `835b0a0` frontend: list all profiles on Home, pin dev host, widen profiles card @@ -1403,11 +1401,6 @@ A stopping point you can return to if this session is closed. Added `picture={active.picture}` to both the write and preview avatars in `ComposeScreen.tsx` and to the active-profile avatar in `Sidebar.tsx`. The picture now appears consistently wherever the active profile is shown. -8. **Click a profile row on Home to select it.** Mirrored the Profiles screen's - clickable-row pattern: the whole non-active row in the Home "Your profiles" - list now selects the profile on click (guarded so Copy/Select buttons don't - double-fire). Added `cursor: pointer` for non-active rows. Added a test - asserting row-click selection. ### Files changed diff --git a/frontend/src/screens/HomeScreen.tsx b/frontend/src/screens/HomeScreen.tsx index 2372f1b..da4a7f3 100644 --- a/frontend/src/screens/HomeScreen.tsx +++ b/frontend/src/screens/HomeScreen.tsx @@ -96,16 +96,6 @@ export function HomeScreen({ onNavigate, onCreateProfile }: HomeScreenProps) {
  • { - if ((event.target as HTMLElement).closest('button, a, input')) { - return; - } - void onSelect(profile.npub); - } - } > { .click(screen.getByRole('button', { name: /Create your first profile/i })); expect(onCreateProfile).toHaveBeenCalled(); }); - - it('selects a profile when its row is clicked (not just the Select button)', async () => { - const backend = createFakeBackend(); - renderHome(backend); - renderWithApp(); - - const bobRow = (await screen.findByText('Bob')).closest('.home-profile-row') as HTMLElement; - // Clicking the name (not the Select button) should select the profile. - await userEvent.setup().click(within(bobRow).getByText('Bob')); - - await waitFor(() => { - expect(within(bobRow).getByRole('button', { name: 'Selected' })).toBeInTheDocument(); - }); - // The previously active profile now offers a Select button again. - const aliceRow = screen.getByText('Alice').closest('.home-profile-row') as HTMLElement; - expect(within(aliceRow).getByRole('button', { name: 'Select' })).toBeInTheDocument(); - }); });