From f5fedf1d7bd3fb7e0ed01c2d5df5f97bf13b6777 Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 10 Jul 2026 10:01:19 -0400 Subject: [PATCH] fix: Private tab in library now shows pages by parent_section, not workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: lib_private filtered on p.source == '🔒 Private' which only matched pages without a workspace. All pages have parent_section='Private' by default, so filtering by source excluded them all. Fix: add 'section' field to page dict from parent_section DB column, filter lib_private by p.section == 'Private' --- app/routers/dashboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 35c2c0c..63898bf 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -105,6 +105,7 @@ async def library_page(request: Request, owner: str = Query(default=""), repo: s "source": r.get("workspace") or "🔒 Private", "last_edited": r.get("updated_at", "now"), "last_visited": r.get("updated_at", "now"), + "section": r.get("parent_section", "Private"), } all_pages = [to_page(r) for r in rows] @@ -136,7 +137,7 @@ async def library_page(request: Request, owner: str = Query(default=""), repo: s sidebar["lib_recent"] = all_pages sidebar["lib_favorites"] = lib_favs sidebar["lib_shared"] = [] - sidebar["lib_private"] = [p for p in all_pages if p.get("source") == "🔒 Private"] + sidebar["lib_private"] = [p for p in all_pages if p.get("section") == "Private"] sidebar["lib_has_favorites"] = len(lib_favs) > 0 sidebar["lib_has_shared"] = False