Skip to content

[Feature]: Configurable sort order for the Files sidebar #1720

Description

@identity16

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions