Issue filing B: file a page's lines as issues (scan, approve panel, auto mode, strike + stamp) #95

Merged
jfro merged 11 commits from issues-52b-filing into main 2026-11-22 18:49:00 +00:00
Owner

Closes #52

Part B of #52 (part A, settings + adapters, merged in #94). A notebook page can now file its handwritten lines as issues in Forgejo, GitHub or Linear. Docs: docs/issue-filing.md ("Scanning a page", "Filing a line", "Approving lines").

What it does

  • Targets (issue_targets, issue_items): a page (or notebook, read by the scan; no notebook picker in the UI yet) maps to a repo or Linear team. A todo-synced page never files (D8).
  • Scan (Issues.ScanWorker, from the same transcription hook as todo sync): reads the page's rows, matches them against every item in every state (Todos.Match, plus our stamp's stroke ids), so a line is never queued twice. Held pages and stale reads file nothing.
  • Filing (Issues.FileWorker): each line is saved :filing before the call; a timeout or a job that died mid-call becomes :failed "may already be filed" and is never sent again on its own (D11). Rate limits requeue after the tracker's wait; at most 20 per run. Titles have @/# made inert; the body links back to the page.
  • Marks (Issues.WriteMarks): a filed line is struck through and stamped with its issue ref in pen strokes (D7, D12), drawn only once the page's latest version has been read. An erased filed line drops its pending mark (F4).
  • Auto mode: a scan files the page's new lines straight away.
  • Approve panel (/issues/pages/:document_id/:page_id, linked from the viewer's page bar): pick tracker, repo/team and mode (checked against the tracker's list again on save); waiting lines with editable title, File, Skip and File all; filed lines with their issue link and "ticked on page"; failed lines with Retry (asks first when it may already be filed) and Skip. Live via PubSub after each scan and filing run.

Ticking or erasing a filed line never changes the issue (D11).

Checks

  • mix precommit passes: 1571 tests (new: scan, file worker, write marks, erased mark, issue page live tests).
  • Screenshots below use example data on a dev DB with a fake Forgejo: a page with 3 waiting lines, one filed (#97, ticked on page), one failed "may already be filed", one skipped; and the target picker on an unmapped page. 390px and desktop, no horizontal scroll at either.

Screenshots

panel-390.png

panel-390.png

panel-desktop.png

panel-desktop.png

picker-390.png

picker-390.png

picker-desktop.png

picker-desktop.png

viewer-390.png

viewer-390.png

viewer-desktop.png

viewer-desktop.png

Closes #52 Part B of #52 (part A, settings + adapters, merged in #94). A notebook page can now file its handwritten lines as issues in Forgejo, GitHub or Linear. Docs: `docs/issue-filing.md` ("Scanning a page", "Filing a line", "Approving lines"). ## What it does - **Targets** (`issue_targets`, `issue_items`): a page (or notebook, read by the scan; no notebook picker in the UI yet) maps to a repo or Linear team. A todo-synced page never files (D8). - **Scan** (`Issues.ScanWorker`, from the same transcription hook as todo sync): reads the page's rows, matches them against every item in every state (`Todos.Match`, plus our stamp's stroke ids), so a line is never queued twice. Held pages and stale reads file nothing. - **Filing** (`Issues.FileWorker`): each line is saved `:filing` before the call; a timeout or a job that died mid-call becomes `:failed` "may already be filed" and is never sent again on its own (D11). Rate limits requeue after the tracker's wait; at most 20 per run. Titles have `@`/`#` made inert; the body links back to the page. - **Marks** (`Issues.WriteMarks`): a filed line is struck through and stamped with its issue ref in pen strokes (D7, D12), drawn only once the page's latest version has been read. An erased filed line drops its pending mark (F4). - **Auto mode**: a scan files the page's new lines straight away. - **Approve panel** (`/issues/pages/:document_id/:page_id`, linked from the viewer's page bar): pick tracker, repo/team and mode (checked against the tracker's list again on save); waiting lines with editable title, File, Skip and File all; filed lines with their issue link and "ticked on page"; failed lines with Retry (asks first when it may already be filed) and Skip. Live via PubSub after each scan and filing run. Ticking or erasing a filed line never changes the issue (D11). ## Checks - `mix precommit` passes: 1571 tests (new: scan, file worker, write marks, erased mark, issue page live tests). - Screenshots below use example data on a dev DB with a fake Forgejo: a page with 3 waiting lines, one filed (#97, ticked on page), one failed "may already be filed", one skipped; and the target picker on an unmapped page. 390px and desktop, no horizontal scroll at either. ## Screenshots **panel-390.png** ![panel-390.png](https://git.knope.dev/attachments/4be90df5-761f-4560-9d41-b78cc5e13527) **panel-desktop.png** ![panel-desktop.png](https://git.knope.dev/attachments/a07aaa37-13a3-483a-a07e-df3e55c8159d) **picker-390.png** ![picker-390.png](https://git.knope.dev/attachments/fe798521-8f59-4893-bf3a-b0422f3675b2) **picker-desktop.png** ![picker-desktop.png](https://git.knope.dev/attachments/e3ccc843-5b71-4e8a-9a04-f0f3f79941e2) **viewer-390.png** ![viewer-390.png](https://git.knope.dev/attachments/4ced3f60-0fe5-4046-925c-effbb5856368) **viewer-desktop.png** ![viewer-desktop.png](https://git.knope.dev/attachments/456702dc-4157-414f-84f2-2a7de7fbd1a8)
fix(issues): a title edited in the approve panel survives the page's next read
All checks were successful
CI / test (pull_request) Successful in 1m51s
8ec5ef2753
Retitling a waiting line sets title_edited, and the scan keeps its text
while the match text, row and box still follow the read (F5).
jfro merged commit c435792b80 into main 2026-11-22 18:49:00 +00:00
jfro deleted branch issues-52b-filing 2026-11-22 18:49:01 +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!95
No description provided.