Mapping a page writes the project's existing todos onto it #77

Closed
opened 2026-11-12 00:15:30 +00:00 by jfro · 0 comments
Owner

Follow-up to #51 (todo sync).

Today, mapping a page to a Vikunja project doesn't seed anything: only tasks created in the app after the mapping are written onto the page (PollWorker.new_in_app?/2). Jeremy wants the page and the project as 1:1 as possible, so linking a page should bring the project's existing todos onto it.

What changes

On a new mapping (not a same-project remap that keeps its rows, D54), once the page's current text has been read:

  • The project's open tasks are listed (done tasks are skipped, D68/D69).
  • A page row whose text matches a task's title (normalized, Todos.Match.normalize/1) is linked to that task: no new task in the app, no new line on the page (D67). Each task is matched at most once.
  • The other open tasks become rows pending :add, and WriteBack writes them onto the page's free rows in the app's order.
  • More tasks than free rows: the rest wait, and the sync panel says page full, N not written.
  • Page rows with no matching task are created in the app, as today.

Done when

  • docs/todo-sync.md (Polling, Test UI) describes the seed.
  • Tests cover: empty page seeded, page rows adopted by title, duplicates titles, done tasks skipped, overflow, remap to the same project doesn't seed again.
  • PR with 390px + desktop screenshots of the sync panel after a seeded map.
Follow-up to #51 (todo sync). Today, mapping a page to a Vikunja project doesn't seed anything: only tasks created in the app *after* the mapping are written onto the page (`PollWorker.new_in_app?/2`). Jeremy wants the page and the project as 1:1 as possible, so linking a page should bring the project's existing todos onto it. ## What changes On a new mapping (not a same-project remap that keeps its rows, D54), once the page's current text has been read: - The project's **open** tasks are listed (done tasks are skipped, D68/D69). - A page row whose text matches a task's title (normalized, `Todos.Match.normalize/1`) is linked to that task: no new task in the app, no new line on the page (D67). Each task is matched at most once. - The other open tasks become rows pending `:add`, and WriteBack writes them onto the page's free rows in the app's order. - More tasks than free rows: the rest wait, and the sync panel says `page full, N not written`. - Page rows with no matching task are created in the app, as today. ## Done when - docs/todo-sync.md (Polling, Test UI) describes the seed. - Tests cover: empty page seeded, page rows adopted by title, duplicates titles, done tasks skipped, overflow, remap to the same project doesn't seed again. - PR with 390px + desktop screenshots of the sync panel after a seeded map.
jfro closed this issue 2026-11-12 01:01:45 +00:00
Sign in to join this conversation.
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#77
No description provided.