Skip to content

feat:pinned pages#1237

Merged
perber merged 2 commits into
mainfrom
feat/pinned-pages
Jul 1, 2026
Merged

feat:pinned pages#1237
perber merged 2 commits into
mainfrom
feat/pinned-pages

Conversation

@perber

@perber perber commented Jul 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

perber added 2 commits July 1, 2026 14:59
Pages and sections can be pinned via toolbar or context menu. Pin state
is stored as `leafwiki_pinned: true` in frontmatter (filesystem-portable)
and surfaced through the tree API. The sidebar shows a sorted "Pinned"
section above the tree; it hides itself when no pages are pinned.

Sections without an index.md return a 400 error on pin attempts instead
of silently losing state across restarts.
- Sidebar layout: Pinned section first, then Pages header + toolbar + tree
- Pages header only visible when pinned section is active
- Avoid full tree reload on pin/unpin: setPinnedLocally patches byId and
  pinnedPages directly using the API response version
- Align pinned item styles with tree nodes (no rounded, full-width hover, py-2)
- Add ml-1 to tree toolbar
- Return 400 (not 500) for InvalidOpError; section without index.md returns
  error instead of silently losing pin state on restart
- Remove unused UserID from PinPageInput
@perber perber linked an issue Jul 1, 2026 that may be closed by this pull request
@perber perber merged commit e0ae7d9 into main Jul 1, 2026
9 checks passed
@perber perber deleted the feat/pinned-pages branch July 1, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Pinned pages section in the sidebar via frontmatter

1 participant