Issue filing: an outline page files one issue per root item, nested items in the description #97

Merged
jfro merged 1 commit from issues-96-outline into main 2026-11-23 01:57:53 +00:00
Owner

Closes #96

A page with an issue target that's written as an outline now files one issue per root item. The title is the root's text without its outline formatting, and the nested items become the issue's description as a markdown bullet list, depth kept. Plain pages file exactly as before.

What changes

  • Detection (Issues.Outline): the transcription has list markers (-, *, +, •, 1., 1)) and at least one marked line indented under another. A list with nothing nested, or plain lines, stays flat and files as today.
  • Rows still pair one to one with lines. Lines.Rows.texts/4 gains raw: true, which returns each row's line with its indentation kept (same pairing, same rows-versus-lines hold). The scan then groups those reads: a root is a line at the shallowest indentation, and each deeper line nests under the root above it (a tab counts as two spaces).
  • Title: the root's text minus its marker, a checkbox, and the transcriber's [?] tags.
  • Nested items live on the item (issue_items.nested, new migration 20261122200000). They're never lines of their own: they're not in the panel's list and are never filed alone. A nested item struck by hand stays ~~struck~~.
  • Hand-struck roots: a root transcribed as ~~text~~ is never queued, and a pending root that gets struck leaves the queue, like an erased line. Our strike is on our own layer, which OCR never reads, so a filed root still reads as it was, and our strokes pin it to its row anyway. A filed root struck by hand stays filed.
  • After filing: a pending root's nested items follow each read. A filed root's stay as filed, so items added under it later never change the issue (D24). The strike + stamp goes on the root row only (D23), and WriteMarks is unchanged.
  • Issue body: the quoted line, then the nested list, then the existing page link and key. Each nested item is one line with @/# made inert, and < is swapped for ‹ so handwriting can't open an HTML comment that hides the rest.
  • Approve panel: each root shows its nested items under its title, in both Waiting and Filed. A hand-struck nested item is shown struck through.
  • docs/issue-filing.md: new "Outline pages" section, plus the body and panel notes.

Example body for "issue trackers":

`issue trackers`

- project + label[?] match[?]
- mark as filed, layer with stamp issue?
  - stamp on the root row only

Filed from page 1 of [Project ideas](…/remarkable/documents/…?page=1) in rM Analyzer.

<!-- rm-analyzer:… -->

Tests

  • outline_test.exs: Jeremy's page from #96, depth in and out (tabs, numbered and * markers, checkboxes), flat pages, title cleaning, struck detection, and markdown output.
  • scan_worker_test.exs "outline pages (#96)": one pending item per root carrying its nested items; a pending root's nested items follow the page while a filed root's stay; a hand-struck root isn't queued and a pending one struck drops out; a filed root struck by hand stays filed; a marker list with nothing nested files each line as before.
  • file_worker_test.exs: the body carries the nested list with depth, mentions inert and < neutralized.
  • issue_page_live_test.exs: the panel shows nested items, struck ones struck, with indentation.
  • mix precommit: 1585 tests, 0 failures.

Screenshots use example outline data: three waiting roots (two with nested items, one plain) and one filed root.

Screenshots

outline-panel-390.png

outline-panel-390.png

outline-panel-desktop.png

outline-panel-desktop.png

Closes #96 A page with an issue target that's written as an outline now files one issue per **root item**. The title is the root's text without its outline formatting, and the nested items become the issue's description as a markdown bullet list, depth kept. Plain pages file exactly as before. ## What changes - **Detection** (`Issues.Outline`): the transcription has list markers (`-`, `*`, `+`, `•`, `1.`, `1)`) and at least one marked line indented under another. A list with nothing nested, or plain lines, stays flat and files as today. - **Rows still pair one to one with lines.** `Lines.Rows.texts/4` gains `raw: true`, which returns each row's line with its indentation kept (same pairing, same rows-versus-lines hold). The scan then groups those reads: a root is a line at the shallowest indentation, and each deeper line nests under the root above it (a tab counts as two spaces). - **Title**: the root's text minus its marker, a checkbox, and the transcriber's `[?]` tags. - **Nested items** live on the item (`issue_items.nested`, new migration `20261122200000`). They're never lines of their own: they're not in the panel's list and are never filed alone. A nested item struck by hand stays `~~struck~~`. - **Hand-struck roots**: a root transcribed as `~~text~~` is never queued, and a pending root that gets struck leaves the queue, like an erased line. Our strike is on our own layer, which OCR never reads, so a filed root still reads as it was, and our strokes pin it to its row anyway. A filed root struck by hand stays filed. - **After filing**: a pending root's nested items follow each read. A filed root's stay as filed, so items added under it later never change the issue (D24). The strike + stamp goes on the root row only (D23), and WriteMarks is unchanged. - **Issue body**: the quoted line, then the nested list, then the existing page link and key. Each nested item is one line with `@`/`#` made inert, and `<` is swapped for `‹` so handwriting can't open an HTML comment that hides the rest. - **Approve panel**: each root shows its nested items under its title, in both Waiting and Filed. A hand-struck nested item is shown struck through. - `docs/issue-filing.md`: new "Outline pages" section, plus the body and panel notes. Example body for "issue trackers": ``` `issue trackers` - project + label[?] match[?] - mark as filed, layer with stamp issue? - stamp on the root row only Filed from page 1 of [Project ideas](…/remarkable/documents/…?page=1) in rM Analyzer. <!-- rm-analyzer:… --> ``` ## Tests - `outline_test.exs`: Jeremy's page from #96, depth in and out (tabs, numbered and `*` markers, checkboxes), flat pages, title cleaning, struck detection, and markdown output. - `scan_worker_test.exs` "outline pages (#96)": one pending item per root carrying its nested items; a pending root's nested items follow the page while a filed root's stay; a hand-struck root isn't queued and a pending one struck drops out; a filed root struck by hand stays filed; a marker list with nothing nested files each line as before. - `file_worker_test.exs`: the body carries the nested list with depth, mentions inert and `<` neutralized. - `issue_page_live_test.exs`: the panel shows nested items, struck ones struck, with indentation. - `mix precommit`: 1585 tests, 0 failures. Screenshots use example outline data: three waiting roots (two with nested items, one plain) and one filed root. ## Screenshots **outline-panel-390.png** ![outline-panel-390.png](https://git.knope.dev/attachments/629773ff-9c25-4d1a-a6cf-091120b89d99) **outline-panel-desktop.png** ![outline-panel-desktop.png](https://git.knope.dev/attachments/e1ad5e1b-2054-449c-b928-e9718e821675)
A page whose transcription has list markers with items indented under
others is read as its roots: the title is the root's text without its
marker, checkbox or [?] tags, and the nested items (depth kept, a
hand-struck one as ~~struck~~) ride on the item and go into the issue
body as a markdown bullet list. Nested rows are never lines of their
own; a root struck by hand isn't queued; a filed root's nested items
never change (D24). The approve panel shows them under the title.
Plain pages file as before.

Closes #96
jfro merged commit a76e5d827a into main 2026-11-23 01:57:53 +00:00
jfro deleted branch issues-96-outline 2026-11-23 01:57:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/rm-analyzer!97
No description provided.