Fix a permanent black line in the note list, and add separators

The drop indicator was a `borderTop` set in the same style object as a `border`
shorthand. Clearing the longhand resets its width and colour to the defaults
while the shorthand's `solid` stays, so a row kept a 2px black line for good —
measured at rest, before any drag. It is now its own element, which also stops
the list twitching as a row grows and shrinks by a pixel.

That element then turned out to be a dead strip of its own: it pushes the row
down as it appears, so the pointer ended up over the line rather than over the
row and releasing there dropped on nothing. The drag handlers moved to the whole
row and the indicator no longer takes pointer events. A strip below the last row
means "put it at the end", which otherwise needs a drop onto the final note.

Separators are lines drawn between notes, optionally named, stored on the
notebook beside its sort mode. They drag like notes do, and their position is
"how many notes come before me", so they hold their place as the notes around
them are renamed or edited. Shown only in the manual order — in "newest first"
the notes would slide past the line on every edit.

"All Notes" and "Starred" no longer offer a hand-made order: they are questions
asked of every notebook, so there is nothing for an arrangement to belong to.

199 unit tests, 190 browser checks across eleven suites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
marcandClaude Opus 5 committed 2026-08-10 01:45:38 +02:00
1 parent 0a0864c58b
commit 2cee00e38e
10 files changed
+731 -125

No files matched your search

+14
View File
@@ -74,6 +74,18 @@ export interface NoteContent {
*/
export type SortMode = "manual" | "updated" | "oldest" | "created" | "title";
/**
* A line drawn between notes in a notebook's own order.
*
* `order` is "how many notes come before me", so it stays meaningful as the
* notes around it are renamed, edited or opened.
*/
export interface Separator {
id: string;
label: string;
order: number;
}
export interface Notebook {
id: string;
name: string;
@@ -83,6 +95,8 @@ export interface Notebook {
maxVersions?: number | null;
/** Null means the app default, newest first. */
sortMode?: SortMode | null;
/** Lines drawn between notes in the manual order. */
separators?: Separator[];
_pendingCreate?: boolean;
}