Skip to content

Folders: an empty folder offers the Paste or create card - #1678

Merged
vmillet-dev merged 1 commit into
dev/1.2.2from
empty-folder-ghost
Nov 27, 2026
Merged

vmillet-dev merged 1 commit into
dev/1.2.2from
empty-folder-ghost

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Closes #1670

Reproduced on dev/1.2.2 by the new kittest: a folder just created and opened shows canvas-no-results (« Aucune note ne correspond à cette recherche. » and « Comment ça marche »), although nothing was searched (first capture).

Change

  • An empty folder shows its list, named after it, with the dashed « Paste or create » card in the first cell, exactly as when it holds notes; clicking it opens a new note filed in the folder.
  • An empty space does the same: its « this week » section keeps the card.
  • « No note matches » stays for a search or a filter that finds nothing.
  • The core says whether a view offers the card (NotesView::offers_creation); the canvas draws its empty state only when nothing matched and no section keeps it.
  • As the ticket says, the « How it works » link of an empty space goes with the message; it stays in the About menu.
Before After

Tests

  • notes/canvas/tests.rs: an empty folder shows create-ghost and no canvas-no-results; the card opens a draft filed in the folder. Fails on dev/1.2.2. The empty library's test now expects the card.
  • engine/src/notes/view.rs: an empty opened folder keeps one Results section offering the card; a search that finds nothing offers nothing.
  • e2e 20_folder_descent: the folder, opened empty, offers the card and not « nothing matches », and its first note is made from it (the search step still asserts canvas-no-results).
  • captures.rs: an empty folder opened.
  • Run: fmt, clippy (workspace, all targets, all features), cargo test -p ui --lib (987 passed), cargo test -p engine.

🤖 Generated with Claude Code

The canvas drew its empty state whenever nothing matched, before the sections; it now asks the view whether a section keeps the creation card.
@vmillet-dev vmillet-dev added the bug Something isn't working label Nov 27, 2026
@vmillet-dev
vmillet-dev merged commit fd7cbdd into dev/1.2.2 Nov 27, 2026
11 checks passed
@vmillet-dev
vmillet-dev deleted the empty-folder-ghost branch November 27, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant