From 9d04ffe5436a3573e308be8cb0b10cee2bc0f7ce Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:02:01 +0000 Subject: [PATCH 1/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/app-shell.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/app-shell.tsx b/src/components/app-shell.tsx index 5c30484..9044bf2 100644 --- a/src/components/app-shell.tsx +++ b/src/components/app-shell.tsx @@ -38,23 +38,23 @@ interface NavItem { } const NAV: NavItem[] = [ - { to: "/", label: "Dashboard", icon: LayoutDashboard }, + { to: "/admin/users", label: "Users", icon: ShieldCheck, adminOnly: true }, { to: "/calendar", label: "Calendar", icon: CalendarIcon }, - { to: "/clients", label: "Clients", icon: Users }, - { to: "/contacts", label: "Contacts", icon: UserPlus }, { to: "/cases", label: "Cases", icon: Briefcase }, - { to: "/tasks", label: "Tasks", icon: CheckSquare }, - { to: "/messages", label: "Messages", icon: MessageSquare }, - { to: "/inbox", label: "Inbox", icon: InboxIcon }, - { to: "/status", label: "Status Updates", icon: Activity }, + { to: "/clients", label: "Clients", icon: Users }, { to: "/collections", label: "Collections", icon: DollarSign }, - { to: "/documents", label: "Pleadings", icon: FolderOpen }, + { to: "/contacts", label: "Contacts", icon: UserPlus }, + { to: "/", label: "Dashboard", icon: LayoutDashboard }, { to: "/files", label: "Files", icon: FilesIcon }, { to: "/forms", label: "Forms", icon: ClipboardList }, + { to: "/inbox", label: "Inbox", icon: InboxIcon }, { to: "/invoices", label: "Invoices", icon: Receipt }, + { to: "/messages", label: "Messages", icon: MessageSquare }, + { to: "/documents", label: "Pleadings", icon: FolderOpen }, { to: "/settings", label: "Settings", icon: SettingsIcon }, - { to: "/admin/users", label: "Users", icon: ShieldCheck, adminOnly: true }, -]; + { to: "/status", label: "Status Updates", icon: Activity }, + { to: "/tasks", label: "Tasks", icon: CheckSquare }, +].sort((a, b) => a.label.localeCompare(b.label)); void FileText; export function AppShell({ children }: { children: ReactNode }) { From c75a9613248d090adcdb50bae8a7d8ed92aba140 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:02:26 +0000 Subject: [PATCH 2/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/contacts.index.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/contacts.index.tsx b/src/routes/contacts.index.tsx index 0a17e9a..9d841b8 100644 --- a/src/routes/contacts.index.tsx +++ b/src/routes/contacts.index.tsx @@ -44,6 +44,7 @@ function ContactsIndex() { const [selected, setSelected] = useState>(new Set()); const [bulkType, setBulkType] = useState(""); const [letter, setLetter] = useState("all"); + const [visibleLimit, setVisibleLimit] = useState(100); const load = async () => { setLoading(true); @@ -140,9 +141,17 @@ function ContactsIndex() { return preLetterFiltered.filter((r) => letterOf(r.name) === letter); }, [preLetterFiltered, letter]); + // Reset paging window when filters change + useEffect(() => { + setVisibleLimit(100); + }, [q, typeFilter, view, letter]); + + const visibleRows = useMemo(() => filtered.slice(0, visibleLimit), [filtered, visibleLimit]); + const hasMore = filtered.length > visibleRows.length; + const grouped = useMemo(() => { const map = new Map(); - for (const r of filtered) { + for (const r of visibleRows) { const l = letterOf(r.name); if (!map.has(l)) map.set(l, []); map.get(l)!.push(r); @@ -152,7 +161,7 @@ function ContactsIndex() { if (b === "#") return -1; return a.localeCompare(b); }); - }, [filtered]); + }, [visibleRows]); const archivedCount = rows.filter((r) => r.archived_at).length; const activeCount = rows.length - archivedCount; From c15e4312a00516b9f499580973649e5905b16a59 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:02:37 +0000 Subject: [PATCH 3/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/contacts.index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/contacts.index.tsx b/src/routes/contacts.index.tsx index 9d841b8..4f5a45d 100644 --- a/src/routes/contacts.index.tsx +++ b/src/routes/contacts.index.tsx @@ -262,7 +262,7 @@ function ContactsIndex() { load(); }; - const visibleIds = filtered.map((r) => r.id); + const visibleIds = visibleRows.map((r) => r.id); const allVisibleSelected = visibleIds.length > 0 && visibleIds.every((id) => selected.has(id)); const someVisibleSelected = visibleIds.some((id) => selected.has(id)); From 41c3b7aa66438f8cd3902d1c042b4eb0f149bdab Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:02:49 +0000 Subject: [PATCH 4/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/contacts.index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/contacts.index.tsx b/src/routes/contacts.index.tsx index 4f5a45d..fcd0c85 100644 --- a/src/routes/contacts.index.tsx +++ b/src/routes/contacts.index.tsx @@ -208,12 +208,12 @@ function ContactsIndex() { }); }; const toggleAllVisible = () => { - const visibleIds = filtered.map((r) => r.id); - const allSelected = visibleIds.every((id) => selected.has(id)); + const ids = visibleRows.map((r) => r.id); + const allSelected = ids.every((id) => selected.has(id)); setSelected((s) => { const next = new Set(s); - if (allSelected) visibleIds.forEach((id) => next.delete(id)); - else visibleIds.forEach((id) => next.add(id)); + if (allSelected) ids.forEach((id) => next.delete(id)); + else ids.forEach((id) => next.add(id)); return next; }); }; @@ -396,7 +396,7 @@ function ContactsIndex() { aria-label="Select all visible" /> - Select all {filtered.length} visible + Showing {visibleRows.length} of {filtered.length} )} From 207ff87204e0bcde2a6059e82133e873cb582696 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:03:01 +0000 Subject: [PATCH 5/5] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/contacts.index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/routes/contacts.index.tsx b/src/routes/contacts.index.tsx index fcd0c85..f3aba33 100644 --- a/src/routes/contacts.index.tsx +++ b/src/routes/contacts.index.tsx @@ -477,6 +477,13 @@ function ContactsIndex() { ))} )} + {!loading && hasMore && ( +
+ +
+ )}