What problem are you trying to solve?
The Files sidebar order is fixed and cannot be changed from settings or the UI.
In a Daily Notes/ folder with YYYY-MM-DD.md files, notes are listed oldest first, so today's note is at the bottom and gets further away every day. There is no way to reverse the order.
From the source, FileTree.tsx calls useFileTree without a sort option, so @pierre/trees' default comparator applies: folders first, dot-prefixed entries first, then case-insensitive ascending name order. appearance.sidebar has no sort-related key.
|
const { model } = useFileTree({ |
Proposed solution
An ascending / descending sort option for the Files sidebar, persisted per project per machine in .ok/local/config.yml under appearance.sidebar, the same way showHiddenFiles is.
@pierre/trees already accepts a sort comparator, and the Skills tree already passes a custom one, so the Files tree could follow the same pattern:
|
export function createSkillSortComparator( |
Area
Editor
Alternatives considered
Moving older notes into archive subfolders (e.g. Daily Notes/_archive/2025/) keeps the list short, but the newest note is still at the bottom.
Environment: OpenKnowledge Desktop 0.75.0, macOS
What problem are you trying to solve?
The Files sidebar order is fixed and cannot be changed from settings or the UI.
In a
Daily Notes/folder withYYYY-MM-DD.mdfiles, notes are listed oldest first, so today's note is at the bottom and gets further away every day. There is no way to reverse the order.From the source,
FileTree.tsxcallsuseFileTreewithout asortoption, so@pierre/trees' default comparator applies: folders first, dot-prefixed entries first, then case-insensitive ascending name order.appearance.sidebarhas no sort-related key.open-knowledge/packages/app/src/components/FileTree.tsx
Line 1121 in 79e2f86
Proposed solution
An ascending / descending sort option for the Files sidebar, persisted per project per machine in
.ok/local/config.ymlunderappearance.sidebar, the same wayshowHiddenFilesis.@pierre/treesalready accepts asortcomparator, and the Skills tree already passes a custom one, so the Files tree could follow the same pattern:open-knowledge/packages/app/src/lib/skill-sort.ts
Line 7 in 79e2f86
Area
Editor
Alternatives considered
Moving older notes into archive subfolders (e.g.
Daily Notes/_archive/2025/) keeps the list short, but the newest note is still at the bottom.Environment: OpenKnowledge Desktop 0.75.0, macOS