From 2124be83c383e62acf5d298e05fb6d0c1a5ef344 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 25 Oct 2025 00:02:40 +0200 Subject: [PATCH 1/6] refactor: remove versioning from reading progress implementation - Remove 'ver' field from ReadingProgressContent interface - Remove ver: '1' from saveReadingPosition function - Update PROGRESS_CACHE_KEY to remove v1 suffix --- src/services/readingPositionService.ts | 4 +--- src/services/readingProgressController.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/services/readingPositionService.ts b/src/services/readingPositionService.ts index a3383d7f..3deb8fee 100644 --- a/src/services/readingPositionService.ts +++ b/src/services/readingPositionService.ts @@ -19,7 +19,6 @@ export interface ReadingProgressContent { progress: number // 0-1 scroll progress ts?: number // Unix timestamp (optional, for display) loc?: number // Optional: pixel position - ver?: string // Schema version } // Helper to extract and parse reading progress from event (kind 39802) @@ -117,8 +116,7 @@ export async function saveReadingPosition( const progressContent: ReadingProgressContent = { progress: position.position, ts: position.timestamp, - loc: position.scrollTop, - ver: '1' + loc: position.scrollTop } const tags = generateProgressTags(articleIdentifier) diff --git a/src/services/readingProgressController.ts b/src/services/readingProgressController.ts index 3d0af404..c3570e6d 100644 --- a/src/services/readingProgressController.ts +++ b/src/services/readingProgressController.ts @@ -13,7 +13,7 @@ type ProgressMapCallback = (progressMap: Map) => void type LoadingCallback = (loading: boolean) => void const LAST_SYNCED_KEY = 'reading_progress_last_synced' -const PROGRESS_CACHE_KEY = 'reading_progress_cache_v1' +const PROGRESS_CACHE_KEY = 'reading_progress_cache' /** * Shared reading progress controller From e86ae9f05eee59eb8b800bbd192802a0fc1cdcad Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 25 Oct 2025 00:04:02 +0200 Subject: [PATCH 2/6] ui: move highlight button higher up - Change bottom position from 32px to 80px - Provides more space from bottom edge for better positioning --- src/components/HighlightButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HighlightButton.tsx b/src/components/HighlightButton.tsx index b86448a2..3dc955ea 100644 --- a/src/components/HighlightButton.tsx +++ b/src/components/HighlightButton.tsx @@ -45,7 +45,7 @@ export const HighlightButton = React.forwardRef Date: Sat, 25 Oct 2025 00:05:04 +0200 Subject: [PATCH 3/6] fix: close mobile sidebar when clicking navigation items - Add mobile sidebar close logic to handleMenuItemClick for profile menu items - Add mobile sidebar close logic to Home, Settings, and Explore buttons - Fixes issue where mobile bookmarks bar didn't close when navigating to My Reads, My Highlights, etc. --- src/components/SidebarHeader.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/SidebarHeader.tsx b/src/components/SidebarHeader.tsx index 41ed3000..43465125 100644 --- a/src/components/SidebarHeader.tsx +++ b/src/components/SidebarHeader.tsx @@ -55,6 +55,10 @@ const SidebarHeader: React.FC = ({ onToggleCollapse, onLogou const handleMenuItemClick = (action: () => void) => { setShowProfileMenu(false) + // Close mobile sidebar when navigating on mobile + if (isMobile) { + onToggleCollapse() + } action() } @@ -127,21 +131,36 @@ const SidebarHeader: React.FC = ({ onToggleCollapse, onLogou
navigate('/')} + onClick={() => { + if (isMobile) { + onToggleCollapse() + } + navigate('/') + }} title="Home" ariaLabel="Home" variant="ghost" /> { + if (isMobile) { + onToggleCollapse() + } + onOpenSettings() + }} title="Settings" ariaLabel="Settings" variant="ghost" /> navigate('/explore')} + onClick={() => { + if (isMobile) { + onToggleCollapse() + } + navigate('/explore') + }} title="Explore" ariaLabel="Explore" variant="ghost" From 4d6b7e1a4638bdb891ff0fd3e46253aef65b3555 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 25 Oct 2025 00:05:23 +0200 Subject: [PATCH 4/6] ui: reorder bookmarks bar buttons - Change button order to: Home, Explore, Settings - Maintains all existing functionality --- src/components/SidebarHeader.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/SidebarHeader.tsx b/src/components/SidebarHeader.tsx index 43465125..80d9824f 100644 --- a/src/components/SidebarHeader.tsx +++ b/src/components/SidebarHeader.tsx @@ -141,18 +141,6 @@ const SidebarHeader: React.FC = ({ onToggleCollapse, onLogou ariaLabel="Home" variant="ghost" /> - { - if (isMobile) { - onToggleCollapse() - } - onOpenSettings() - }} - title="Settings" - ariaLabel="Settings" - variant="ghost" - /> { @@ -165,6 +153,18 @@ const SidebarHeader: React.FC = ({ onToggleCollapse, onLogou ariaLabel="Explore" variant="ghost" /> + { + if (isMobile) { + onToggleCollapse() + } + onOpenSettings() + }} + title="Settings" + ariaLabel="Settings" + variant="ghost" + /> {!isMobile && (