From 48c6cf39d59a2cbc679e779e3bed78fee2312a06 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Mon, 21 Sep 2026 18:22:47 +0200 Subject: [PATCH] Lay the notes screen out like a notes app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The list of notes and the note being written are one screen now, two panes: the notes on the left, the open one on the right, side by side where there is room and one at a time on a phone, where the back button returns to the list. The search box moved into the top of that list, and its results *are* the list — searching is a way of finding a note, not a separate place to be, and a tab for it was a tab too many. Emptying the box brings the whole list back. Opening a hit opens that day at the lesson that matched, rather than at the top of a day with six of them. A row has to say what the note holds, so the listing carries it: the subjects a day covers, how many lessons, and the first line actually written in it. One request for the whole list rather than one per note. `plainText` is now one rule in one place for wherever a note is shown rather than edited — the search snippet and the list row both went through their own half-copy of it, and the row's copy rendered a table as `| | |` and left `_Fazit_` wearing its markers. It strips one leading marker, not each in turn, because `## 1. Deutsch` keeps its lesson number and the list rule was eating it. Driven in Firefox at both widths: the list, the search, opening a hit, the jump to the lesson, and the phone's list-then-note. 390 unit tests, 116/117 smoke. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 6 +- docs/NOTES.md | 37 +++-- scripts/smoke.mjs | 19 ++- src/core/notes.ts | 40 +++-- src/http/api.ts | 37 ++++- src/http/app/app.css | 136 +++++++++++------ src/http/app/app.js | 327 +++++++++++++++++++++++++++------------- src/http/app/index.html | 42 +++--- test/notes.test.ts | 24 +++ 9 files changed, 478 insertions(+), 190 deletions(-) diff --git a/README.md b/README.md index 6387233..b7bba38 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,11 @@ teachers, rooms, cancellations dropped and substitutions marked. Each heading is indexed as its own lesson, so a search answers "my own note, Deutsch, 18.09.2026" rather than "Friday". -A **Suche** tab searches your own notes straight from the files — no crawl in +It reads like a notes app: the notes on the left, the open one on the right, and +a search box above the list. Search goes straight to the files — no crawl in between, so a lesson written this morning is findable this morning — and a -result names the lesson it matched in rather than the day. +result names the lesson it matched in rather than the day, opening that day at +that lesson. Writing is **formatted, not Markdown**: headings, bold, lists, tick boxes, quotes, links and tables come from a toolbar, and `MD` shows the Markdown diff --git a/docs/NOTES.md b/docs/NOTES.md index e2789cf..aa22b30 100644 --- a/docs/NOTES.md +++ b/docs/NOTES.md @@ -68,7 +68,22 @@ On a phone it is worth adding to the home screen — it has a manifest and opens standalone, which is the difference between "a page I have to find" and "the thing I open in a free period". -**Notizen** is one screen: the day, `‹ ›` to move between days, and the editor. +**Notizen** is one screen in two panes: your notes on the left, the open one on +the right. Side by side where there is room; on a phone the list comes first and +a note pushes over it, with `‹ Notizen` to come back. + +The list is every note, newest first — the day, the lessons it covers, and the +first thing written in it: + +``` +Freitag, 18.09.2026 +Deutsch · LF07 +Dreischritt: These, Argument mit Beleg, Fazit. +``` + +**+** opens today, whether or not it has a note yet — the one thing a list of +notes cannot show you, because an empty day is not a note. `‹ ›` and the date +field move between days from there. - Opening a day with no note yet **fills in that day's lessons from WebUntis** — numbered, with times, teacher and room, cancellations left out and @@ -130,17 +145,21 @@ so rather than being quietly reduced. `test/app-markdown.test.ts` is what holds that promise up: every construct in this document goes in and comes back out unchanged. -### Suche — the notes themselves +### Searching, in the list -The **Suche** tab searches your own notes and nothing else. Every word has to -appear, in any order, ignoring case and accents; there is no stemming, so -*Argument* does not find *Argumente*. +The box above the list searches your own notes and nothing else, and the results +*are* the list — searching is a way of finding a note, not a separate place to +be. Emptying the box brings the whole list back. + +Every word has to appear, in any order, ignoring case and accents; there is no +stemming, so *Argument* does not find *Argumente*. A result names the **lesson**, not the day — `1. LF10 — 08:00–08:45` with the -date beside it — because a day note holds five or six lessons and "Freitag" says -nothing about which one matched. Tapping a day note opens it in the editor; -anything else, such as a note from the Apple Notes import, opens read-only, -since the editor is day-shaped and those notes have no day. +date under it and the matched words marked — because a day note holds five or +six lessons and "Freitag" says nothing about which one matched. Opening a hit +opens that day **at that lesson**. A note that is not a school day, such as one +from the Apple Notes import, opens read-only: the editor is day-shaped and those +notes have no day. It reads the **files**, not the index. That is the point: notes reach the Postgres index only on a full crawl, so a lesson written this morning would not diff --git a/scripts/smoke.mjs b/scripts/smoke.mjs index a009990..e9ff2ca 100644 --- a/scripts/smoke.mjs +++ b/scripts/smoke.mjs @@ -742,7 +742,9 @@ console.log('\n== web app =='); 'the shell loads the app as a module, so its imports resolve', /