From 132e2bd0d98f8c890f9eb2466e416d3d9e97a2bb Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 16 Mar 2026 07:46:46 -0500 Subject: [PATCH] feat: cache project tab per-project and rename/reorder tabs - Rename "List" tab to "Issues" and reorder: Issues, Overview, Configuration - Cache the last active tab per project in localStorage - On revisit, restore the cached tab instead of always defaulting to Issues Closes PAP-520 Co-Authored-By: Paperclip Co-Authored-By: Claude Opus 4.6 --- ui/src/pages/ProjectDetail.tsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ui/src/pages/ProjectDetail.tsx b/ui/src/pages/ProjectDetail.tsx index 4de40782..a0f1b7d7 100644 --- a/ui/src/pages/ProjectDetail.tsx +++ b/ui/src/pages/ProjectDetail.tsx @@ -443,8 +443,21 @@ export function ProjectDetail() { return ; } - // Redirect bare /projects/:id to /projects/:id/issues + // Redirect bare /projects/:id to cached tab or default /issues if (routeProjectRef && activeTab === null) { + let cachedTab: string | null = null; + if (project?.id) { + try { cachedTab = localStorage.getItem(`paperclip:project-tab:${project.id}`); } catch {} + } + if (cachedTab === "overview") { + return ; + } + if (cachedTab === "configuration") { + return ; + } + if (isProjectPluginTab(cachedTab)) { + return ; + } return ; } @@ -453,6 +466,10 @@ export function ProjectDetail() { if (!project) return null; const handleTabChange = (tab: ProjectTab) => { + // Cache the active tab per project + if (project?.id) { + try { localStorage.setItem(`paperclip:project-tab:${project.id}`, tab); } catch {} + } if (isProjectPluginTab(tab)) { navigate(`/projects/${canonicalProjectRef}?tab=${encodeURIComponent(tab)}`); return; @@ -527,8 +544,8 @@ export function ProjectDetail() { handleTabChange(value as ProjectTab)}> ({