Library: /pages (no id) shows the All-pages info view, not auto-opened page
release gate / check (push) Canceled after 1m2s

- Remove the auto-select-first-page effect so the Library index (filters,
  folder path, relative edited label, click-to-edit) is actually reachable
- Edited column uses Today/Yesterday/Mon D labels computed in the fetch callback
- Update mobile regression + e2e to the new /pages landing (index, not editor)
This commit is contained in:
Andrew S Erwin
2026-12-01 06:50:19 -06:00
parent 521987e16d
commit 4523a07fc0
4 changed files with 24 additions and 15 deletions
+2 -7
View File
@@ -155,13 +155,8 @@ export function PagesClient({ initialId }: { initialId: string | null }) {
editorRef.current?.resetContent(draft ?? data.content)
}, [autosave])
useEffect(() => {
const timer = setTimeout(() => loadPages().then((data) => {
if (!activePage.current && data.length) { activePage.current = data[0].id; setActiveId(data[0].id) }
}).catch((e) => console.error('Failed to load pages', e)), 0)
return () => clearTimeout(timer)
}, [loadPages])
// /pages with no ?id is the Library "All pages" info view (library-index);
// it must NOT auto-open the first page, or the index would never be seen.
useEffect(() => {
const timer = setTimeout(() => {
if (activeId) loadPage(activeId).catch((e) => console.error('Failed to load page', e))