From 5cf8275540d7162cd4936a7c0e76dbfe7f66b62c Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Mon, 16 Feb 2026 10:53:59 -0800 Subject: V3 UI Polish: Improved keyboard navigation, fixed logo position, and updated branding - Fix V3 keyboard navigation delay (resolved NK-wjats7) - Update V3 document title to 'neko' (resolved NK-4p3s91) - Fix V3 neko logo/button position to be top-left fixed (resolved NK-89za3s) - Improve FeedItems (React) stability with ref-based index tracking and robust tests - Sync V3 styling and selection feedback with V2 patterns - Rebuild production assets --- frontend-vanilla/src/main.test.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'frontend-vanilla/src/main.test.ts') diff --git a/frontend-vanilla/src/main.test.ts b/frontend-vanilla/src/main.test.ts index c9d0e0c..5bf9fe0 100644 --- a/frontend-vanilla/src/main.test.ts +++ b/frontend-vanilla/src/main.test.ts @@ -347,4 +347,25 @@ describe('main application logic', () => { expect(manageSection?.innerHTML).toContain('My Feed'); expect(document.querySelector('.feed-tag-input')).not.toBeNull(); }); + + it('should navigate items with j/k keys', () => { + store.setItems([ + { _id: 101, title: 'Item 1', publish_date: '2023-01-01', read: false } as any, + { _id: 102, title: 'Item 2', publish_date: '2023-01-02', read: false } as any + ]); + renderLayout(); + renderItems(); + + // 1st press 'j' -> index 0 + window.dispatchEvent(new KeyboardEvent('keydown', { key: 'j' })); + expect(document.querySelector('.feed-item[data-id="101"]')?.classList.contains('selected')).toBe(true); + + // 2nd press 'j' -> index 1 + window.dispatchEvent(new KeyboardEvent('keydown', { key: 'j' })); + expect(document.querySelector('.feed-item[data-id="102"]')?.classList.contains('selected')).toBe(true); + + // Press 'k' -> back to index 0 + window.dispatchEvent(new KeyboardEvent('keydown', { key: 'k' })); + expect(document.querySelector('.feed-item[data-id="101"]')?.classList.contains('selected')).toBe(true); + }); }); -- cgit v1.2.3