From df8ed500aca50b10640a2db0b6f08a67b4b20861 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sat, 4 Apr 2026 11:03:50 +0200 Subject: [PATCH] fix: remove Inbox period filter pills, show all notes by default --- src/App.tsx | 4 ++-- src/components/NoteList.tsx | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 1afc43b0..395237d7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -76,7 +76,7 @@ function App() { const noteWindowParams = useMemo(() => isNoteWindow() ? getNoteWindowParams() : null, []) const [selection, setSelection] = useState(DEFAULT_SELECTION) const [noteListFilter, setNoteListFilter] = useState('open') - const [inboxPeriod, setInboxPeriod] = useState('month') + const inboxPeriod: InboxPeriod = 'all' const handleSetSelection = useCallback((sel: SidebarSelection) => { setSelection(sel) setNoteListFilter('open') @@ -564,7 +564,7 @@ function App() { {selection.kind === 'filter' && selection.filter === 'pulse' ? ( setViewMode('all')} /> ) : ( - + )} diff --git a/src/components/NoteList.tsx b/src/components/NoteList.tsx index 450b90ed..bb9b045b 100644 --- a/src/components/NoteList.tsx +++ b/src/components/NoteList.tsx @@ -1,7 +1,7 @@ import { useState, useMemo, useCallback, useEffect, memo } from 'react' import type { VaultEntry, SidebarSelection, ModifiedFile, NoteStatus, InboxPeriod, ViewFile } from '../types' import type { NoteListFilter } from '../utils/noteListHelpers' -import { countByFilter, countAllByFilter, countInboxByPeriod } from '../utils/noteListHelpers' +import { countByFilter, countAllByFilter } from '../utils/noteListHelpers' import { NoteItem } from './NoteItem' import { prefetchNoteContent } from '../hooks/useTabManagement' import { BulkActionBar } from './BulkActionBar' @@ -9,7 +9,6 @@ import { useMultiSelect } from '../hooks/useMultiSelect' import { useNoteListKeyboard } from '../hooks/useNoteListKeyboard' import { NoteListHeader } from './note-list/NoteListHeader' import { FilterPills } from './note-list/FilterPills' -import { InboxFilterPills } from './note-list/InboxFilterPills' import { EntityView, ListView } from './note-list/NoteListViews' import { DeletedNotesBanner } from './note-list/TrashWarningBanner' import { routeNoteClick, toggleSetMember, resolveHeaderTitle } from './note-list/noteListUtils' @@ -44,7 +43,7 @@ interface NoteListProps { views?: ViewFile[] } -function NoteListInner({ entries, selection, selectedNote, noteListFilter, onNoteListFilterChange, inboxPeriod = 'month', onInboxPeriodChange, modifiedFiles, modifiedFilesError, getNoteStatus, sidebarCollapsed, onSelectNote, onReplaceActiveTab, onCreateNote, onBulkArchive, onBulkTrash, onBulkRestore, onBulkDeletePermanently, onEmptyTrash, onUpdateTypeSort, updateEntry, onOpenInNewWindow, views }: NoteListProps) { +function NoteListInner({ entries, selection, selectedNote, noteListFilter, onNoteListFilterChange, inboxPeriod = 'all', modifiedFiles, modifiedFilesError, getNoteStatus, sidebarCollapsed, onSelectNote, onReplaceActiveTab, onCreateNote, onBulkArchive, onBulkTrash, onBulkRestore, onBulkDeletePermanently, onEmptyTrash, onUpdateTypeSort, updateEntry, onOpenInNewWindow, views }: NoteListProps) { const { modifiedPathSet, modifiedSuffixes, resolvedGetNoteStatus } = useModifiedFilesState(modifiedFiles, getNoteStatus) const isSectionGroup = selection.kind === 'sectionGroup' @@ -59,11 +58,6 @@ function NoteListInner({ entries, selection, selectedNote, noteListFilter, onNot [entries, isSectionGroup, isAllNotesView, isFolderView, selection], ) - const inboxCounts = useMemo( - () => isInboxView ? countInboxByPeriod(entries) : { week: 0, month: 0, quarter: 0, all: 0 }, - [entries, isInboxView], - ) - const { listSort, listDirection, customProperties, handleSortChange, sortPrefs, typeDocument } = useNoteListSort({ entries, selection, modifiedPathSet, modifiedSuffixes, subFilter, inboxPeriod: isInboxView ? inboxPeriod : undefined, onUpdateTypeSort, updateEntry }) const { search, setSearch, query, searchVisible, toggleSearch } = useNoteListSearch() const [collapsedGroups, setCollapsedGroups] = useState>(new Set()) @@ -117,7 +111,6 @@ function NoteListInner({ entries, selection, selectedNote, noteListFilter, onNot {isChangesView && deletedCount > 0 && } {showFilterPills && } - {isInboxView && onInboxPeriodChange && } {multiSelect.isMultiSelecting && (