Extensions and board¶
Requirements and design for the todo.txt extensions and the Kanban board.
Requirements¶
Recurring tasks¶
req~recurring-tasks~1
When the user completes a task that has a recurrence tag (rec:), the application adds the next occurrence of the task.
A plain recurrence counts from the day of completion, a strict one (rec:+…) from the due date.
Covers:
feat~extensions~1
Needs: dsn
Top tasks¶
req~top-tasks~1
One click restricts the list to the tasks to do next, as the top add-on of the todo.txt command line does.
The number of tasks is a setting.
Covers:
feat~extensions~1
Needs: dsn
Most important tasks¶
req~most-important-tasks~1
The user marks the most important tasks and the day they are meant for, and sees them first.
Covers:
feat~extensions~1
Needs: dsn
Notes¶
req~notes~1
The user attaches a note of several lines to a task.
As with the note add-on of the todo.txt command line, the note is a file in the directory notes next to the todo.txt file, and the task names it with the tag note:.
Covers:
feat~extensions~1
Needs: dsn
Templates of tasks¶
req~templates~1
The user keeps sets of tasks that are needed again and again, such as everything for a journey, and adds the tasks of such a template at once, all due on the same day and at the same time. A task of a template can have a note, such as a checklist.
Covers:
feat~extensions~1
Needs: dsn
Checklist in a note¶
req~note-checklist~1
The user ticks off the items of a checklist in the note of a task without editing its text, and sees in the list how many are ticked off.
Covers:
feat~extensions~1
Needs: dsn
Note on hover¶
req~note-preview~1
On a computer, the user reads the note of a task by resting the mouse on its card, follows a link in it, and ticks off an item of its checklist without opening the task. On a phone, which has no mouse, a tap on the label of the note on the card does the same.
Covers:
feat~extensions~1
Needs: dsn
Images of a task¶
req~note-images~1
The user attaches images to a task: ones that are chosen on the device, a photo taken with the camera of a phone, or images that another application shares on Android. The image is kept and synchronized with the tasks, and the dialog of the task shows it.
Covers:
feat~extensions~1
Needs: dsn
Contexts below contexts¶
req~context-hierarchy~1
A context lies below another context, over any number of levels. A task shows the last level of its context and, on request, the whole path. From the context of a task, the user gets to the tasks of that context. Restricting the list to a context includes the contexts below it.
Covers:
feat~extensions~1
Needs: dsn
Projects below projects¶
req~project-hierarchy~1
A project lies below another project, over any number of levels. A task shows the last level of its project and, on request, the whole path. From the project of a task, the user gets to the tasks of that project. Restricting the list to a project includes the projects below it, and so does what the plan states for a project.
Covers:
feat~extensions~1
Needs: dsn
Duration of a task¶
req~duration~1
A task states the time it is expected to take.
Covers:
feat~extensions~1
Needs: dsn
Inbox¶
req~inbox~1
The user sees the open tasks that have no context and gives such a task a context of the file with one action.
Covers:
feat~task-list~1
Needs: dsn
Overview of the contexts¶
req~overview~1
The user sees for each context how it is doing: whether tasks are overdue or due today. The user sees the same for each project or for each hashtag instead. For a context, a project or a hashtag, the user sees its tasks ordered by urgency, each with the days until or since its due date and with the part of its time that has passed.
Covers:
feat~task-list~1
Needs: dsn
Task of ContextSwitcher¶
req~context-switcher-link~1
A task refers to a task of ContextSwitcher, and the user switches to it from the task.
Covers:
feat~extensions~1
Needs: dsn
Page of OneNote¶
req~onenote-link~1
A task refers to a page of OneNote, and the user opens the page from the task. The user pastes the link that OneNote copies for a page; the task shows a short label instead of the long link.
Covers:
feat~extensions~1
Needs: dsn
Links back from a page of OneNote¶
req~onenote-backlinks~1
On Windows with OneNote and AnchorHub, a page of OneNote that tasks refer to shows at its top a link to each of these tasks, named by its description. A click on the link opens the task in koppter. The links follow the tasks: a changed description changes its link, a completed task, also one that is archived, has its link struck through, and a deleted task loses its link. The file of the tasks gets no tag for this.
Covers:
feat~extensions~1
Needs: dsn
Items of Outlook¶
req~outlook-items~1
The list shows the open items of the To-Do list of the classic desktop Outlook, flagged mails and tasks of all accounts, next to the tasks of the file, without writing them to the file. A click opens an item in Outlook. When the user gives an item a context or a project, or changes it otherwise, it is written to the file as a task that refers to the item. Completing an item, or a task that refers to one, marks it done in Outlook.
Covers:
feat~outlook~1
Needs: dsn
TODOs of a LaTeX document¶
req~latex-todos~1
The user gives a project the main file of a LaTeX document. On the desktop, the list shows the TODOs of that file and of the files it takes in as tasks of the project, without writing them to the file, and shows new and removed TODOs while the application is open. When the user changes a TODO, such as by giving it a priority, it is written to the file as a task that refers to the TODO, which is then no longer shown on its own. The document is not changed. So the user cannot tick off an open TODO, nor a task that refers to one: the mark of a document stands in the place of its checkbox, and a tap on it says that the TODO is done when it is removed from the document.
Covers:
feat~latex~1
Needs: dsn
Changed TODOs of a LaTeX document¶
req~latex-rematch~1
When the text of a TODO changes a little in the document, the task that refers to it follows it: it takes the new text and keeps its priority, labels and dates. A TODO is not followed while its document cannot be read.
Covers:
feat~latex~1
Needs: dsn
Opening a TODO of a LaTeX document¶
req~latex-open~1
From a task, the user opens its TODO where it stands in the document, with a program that the settings of the device name.
Covers:
feat~latex~1
Needs: dsn
Scheduled tasks¶
req~scheduled-tasks~1
The application adds the tasks that the file ice_recur.txt next to the todo.txt file schedules for the current day and for the days since it last did so, in the format of the ice_recur add-on.
A task is not added while an open task with the same text exists; as in the add-on, priority, dates and the tags t:, due: and note: are not part of that text.
Covers:
feat~extensions~1
Needs: dsn
Archive of completed tasks¶
req~archive~2
Once a day, the application moves the tasks that were completed more than a week ago from the todo.txt file to the file done.txt next to it, as the todo.txt command line names its archive.
The todo.txt file so keeps the tasks completed lately, which a comparison of two versions of the file shows, and does not grow with every completed task.
The number of days is set in the configuration file, so that it is the same on every device.
A moved task carries the day on which it was completed.
The menu of a completed task, and the one of a heading whose tasks are all completed, such as Done, move them at once.
Covers:
feat~extensions~1
Needs: dsn
Expiring tasks¶
req~expiry~1
A task can state the last day on which it is of use, such as putting out the bins before the collection. If it is still open after that day, the application removes it from the todo.txt file instead of keeping it as overdue or planning it for a later day. A task without such a day is never removed. Until the day has passed, the task is planned and shown as due on it, unless it states a due date of its own.
Covers:
feat~extensions~1
Needs: dsn
Editor of the scheduled tasks¶
req~scheduled-tasks-editor~1
The user edits the schedule of ice_recur.txt in the application.
The application tells for each entry on which day it adds its task next, and which lines it does not understand.
Covers:
feat~extensions~1
Needs: dsn
Board¶
req~board~1
The application shows the tasks as a board with columns. The user chooses whether the columns are the priorities, the projects, the contexts, the hashtags or ranges of the due date. The board shows the tasks that match the filter.
Covers:
feat~kanban~1
Needs: dsn
Board columns defined by filters¶
req~board-defined-columns~1
The user defines columns of the board, each by a title and a filter expression, and switches the board to these columns.
Covers:
feat~kanban~1
Needs: dsn
Moving a task on the board¶
req~board-move~1
The user moves a task to another column of the board by dragging it there. The task then has the value of that column: its priority, its project, its context or a due date in its range. For a column defined by a filter, the task then matches the filter.
Covers:
feat~kanban~1
Needs: dsn
Hashtags¶
req~hashtags~1
A word of a task that starts with # and a letter is a hashtag: a label without a fixed meaning.
The application shows, filters and edits hashtags like projects and contexts, and offers them as the columns of the board.
Covers:
feat~extensions~1
Needs: dsn
Deadline next to the due date¶
req~deadline~1
A task can state the day that others set for it next to the day by which the user wants to have it done. The days between the two are a buffer: the task is overdue, and its plan late, only after the deadline. A task that states the deadline only is due on it. The deadline can state a time of its day, and for a deadline that is given for another place, the offset of that time from UTC.
Covers:
feat~extensions~1
Needs: dsn
Next actions¶
req~next-actions~1
One click restricts the list to the next actions as Getting Things Done has them: of each project, the first task that can be worked on now. The user sees which projects have open tasks but no next action.
Covers:
feat~extensions~1
Needs: dsn
Design¶
Hashtags of a task¶
dsn~hashtags~1
Task.hashtags are the words of the body that start with # followed by a letter or a currency sign, without the # (Task.isHashtagName): #money and #$$$ are hashtags.
A number sign followed by another character, such as #123, and a number sign inside a word stay words of the description.
Hashtags are not part of the description, and Task.edit writes them between the contexts and the tags.
Covers:
req~hashtags~1adr~hashtags~1
Needs: impl, utest
Hashtags in the user interface¶
dsn~hashtags-in-ui~1
A hashtag is an outlined label on the task, after the contexts.
The filter panel and the edit dialog have a section for hashtags that works like those for projects and contexts; the edit dialog accepts only names that start with a letter or a currency sign, typed with or without the #.
The board offers the hashtags as columns.
Covers:
req~hashtags~1
Needs: impl, utest
Recurrence on completion¶
dsn~recurrence-on-completion~1
Task.nextOccurrence returns the open copy of a recurring task with its dates moved: the due date to the next date of the recurrence, the start date by the same distance.
A task with only a start date gets a new start date; a task without dates gets a due date.
TodoController.toggle appends the next occurrence in the same write as the completion, so that both are one commit.
Covers:
req~recurring-tasks~1
Needs: impl, utest
Top tasks¶
dsn~top-tasks~1
With the option Only the first n tasks of the filter panel on, TodoController.visible is cut to the first topCount entries of the filtered list in list order.
Clear all in the filter panel turns the option off.
Covers:
req~top-tasks~1
Needs: impl, utest
Most important tasks through priority and due date¶
dsn~most-important-tasks~1
There is no separate notation for most important tasks.
Such a task has priority A and a due date; the list order shows it first, and the option for the first tasks restricts the list to these tasks.
Covers:
req~most-important-tasks~1adr~no-mit-notation~1
Needs: impl
Groups of the board¶
dsn~board-groups~1
groupEntries distributes entries over groups by priority, project, context, hashtag or due date.
A task with several projects or contexts appears in each of their groups.
The due date groups are described in dsn~due-groups~2.
Tasks without a value form the last group; empty groups are left out.
Covers:
req~board~1adr~board-columns-by-attribute~1
Needs: impl, utest
Groups by due date¶
dsn~due-groups~2
The groups by due date are Overdue, then one group for each day of dueChoices, then Later, No due date and Done.
Overdue has the open tasks due before today; Done has the completed ones, which are not overdue.
A group is titled by the name of its day, except that of next weekend: it spans the days of the next week up to its Sunday and is titled Next week.
The days of dueChoices are those that the menu of the due date and the edit dialog offer: today, tomorrow, this weekend, in three days, next weekend, in two weeks and in a month.
The group of a day has the tasks that are due after the day of the group before it, up to its own day; Later has those after the last day.
Moving a task to the group of a day sets that day as its due date, and moving it to Later the day after the last one; no move leads into Overdue or Done.
Covers:
req~board~1req~list-groups~1
Needs: impl, utest
Board¶
dsn~board~1
Board shows the groups of the visible tasks as columns side by side.
The board scrolls horizontally, each column vertically.
The columns contain the task cards of the list, with the same operations.
Covers:
req~board~1
Needs: impl, utest
Filter expressions¶
dsn~query~1
Query evaluates a filter expression in the syntax of topydo: terms separated by blanks, all of which a task has to match.
+project, @context and #hashtag match a task with this project, context or hashtag.
(A) matches a task with this priority; (>B) and (<=C) match a higher priority, and this or a lower one; a task without priority matches none of them.
key:value matches a task whose tag has this value; with <, <=, >, >= in front of the value, the tag is compared to it, as a date if both are dates.
A date is an ISO date, today, tomorrow, yesterday, or an interval from today such as 1w.
A leading - negates a term, and any other word matches a line that contains it, ignoring case.
Covers:
req~board-defined-columns~1
Needs: impl, utest
Configuration file¶
dsn~config-file~1
ConfigFile reads and changes the companion file koppter.yml, a YAML file with the configuration that belongs to the todo.txt file; it is named after the application that reads it.
The key board-columns maps the title of each column to its filter expression, one column per line, in the order of the board.
Titles and expressions are read as plain, single-quoted or double-quoted scalars and written double-quoted.
Replacing the columns keeps the other content of the file.
Covers:
req~board-defined-columns~1adr~board-columns-by-filter~1
Needs: impl, utest
Defaults of the configuration¶
dsn~config-defaults~1
A configuration without the key board-columns has the columns ConfigFile.DEFAULT_BOARD_COLUMNS, which are lists of Getting Things Done: Today, Next for what neither waits nor is for someday, Waiting for @waiting and Someday for #someday.
A configuration without the key share-actions has the actions ConfigFile.DEFAULT_SHARE_ACTIONS: inbox, which takes the shared text as it is, and reading, which adds a project, a context, a due date and a duration.
A configuration without the key new-task has ConfigFile.DEFAULT_NEW_TASK: the priority C and the due date of the next weekend.
The board and the settings thereby show what such a definition looks like, and the share sheet offers a choice.
A user who removes all columns, actions or entries of a new task wants none: the key is then written without entries, which is read as none.
A storage that keeps no configuration file has neither columns nor actions and starts a new task empty, as the user could not change them.
Covers:
req~board-defined-columns~1req~share-actions~1req~new-task-defaults~1
Needs: impl, utest
Columns defined by filters¶
dsn~board-defined-columns~1
The configuration file holds the columns.
The settings dialog edits them as text with one column per line as title = expression; a line without title is titled by its expression.
A change of the columns is recorded as a change of its own.
The controller reads the configuration file again when it looks for changes of the todo.txt file, so that columns defined on another device appear.
groupByColumns distributes the visible tasks over these columns, in the order of their definition.
A task appears in every column whose expression it matches, and a column without tasks stays on the board.
The view options offer these columns once at least one is defined.
Covers:
req~board-defined-columns~1adr~board-columns-by-filter~1
Needs: impl, utest
Move between groups¶
dsn~board-move~1
moveToGroup returns the task as it is after a move from one group to another.
For priorities, the task gets the priority of the target group, or none.
For projects, contexts and hashtags, the value of the source group is replaced by that of the target group; the other projects, contexts and hashtags of the task stay.
For due dates, a group sets its day (dsn~due-groups~2), and the group without due date removes the date.
A move within a group or into the group of overdue tasks changes nothing.
Covers:
req~board-move~1adr~board-columns-by-attribute~1
Needs: impl, utest
Move to a column defined by a filter¶
dsn~board-move-to-filter~1
Query.applyTo returns the task with the smallest change that makes it match the expression.
A term that the task matches changes nothing.
Otherwise, +project, @context and #hashtag add the project, context or hashtag, and key:value sets the tag; negated, they remove it.
A priority term sets the nearest priority that matches, and its negation removes the priority.
A comparison of a tag with a date sets the nearest date that matches.
A word, a negated comparison, and a comparison with a value that is not a date cannot be established; the column then does not take the task.
Projects, contexts and tags that the expression does not name stay, so the task may still match the filter of its former column.
Covers:
req~board-move~1adr~smallest-change-on-drop~1
Needs: impl, utest
Dragging on the board¶
dsn~board-drag~1
A task card is dragged with the mouse, or with the finger after a long press, as a plain drag with the finger scrolls. While a card is dragged, its description follows the pointer and the column under the pointer is marked. Only a column that can take the card is marked. Dropping the card on such a column applies the move as one change, with a message that names the column. Only the columns that are shown can be a target, so a value that no visible task has is set in the edit dialog.
Covers:
req~board-move~1
Needs: impl, utest
Place of a card in its column¶
dsn~board-drag-position~1
A card that is dropped next to another card of a column is put before or behind it, as a task is in the list (dsn~list-drag~1); a line marks the place while the card is dragged.
Within its own column, the card takes the priority of the card it is put next to.
In another column, the card changes what the column stands for and nothing else: it gets its place only next to a card of the priority it then has, and otherwise the order of the list places it.
TodoController.move applies the change of the column and the place as one change.
Covers:
req~board-move~1req~list-step~1
Needs: impl, utest
View options¶
dsn~view-options~1
A row of switches above the tasks selects the view: overview, agenda, week, board, list or inbox, from the views that show what is up to those that change the tasks. One of them is always selected. For the list and the board, a second row below it selects the attribute of the groups of the list, which a second click switches off, or of the columns of the board, for which the columns defined by filters are a choice as well. While the list has no groups, a text at the end of that row tells its order: by priority, then by due date. For the overview, the second row selects what the tiles stand for: contexts, projects or hashtags. Each row is one line that scrolls sideways in a window that is too narrow for it.
Covers:
req~board~1req~list-groups~1
Needs: impl, utest
Companion files¶
dsn~companion-files~1
A storage that implements CompanionFiles reads and writes files relative to the directory of the todo.txt file.
FileStorage and GitStorage implement it; GitStorage commits the companion files written since the last commit together with the next change of the todo.txt file.
A file that is no text, such as an image of a note, is read and written as bytes (readCompanionBytes, writeCompanionBytes) and recorded in the same way.
A deleted file (deleteCompanion), such as the note of a task that moved to a shared list, is recorded in the same way.
The storage of a single document on Android does not implement it, so that notes, scheduled tasks and board columns defined by filters are not available there.
Covers:
req~notes~1req~scheduled-tasks~1req~board-defined-columns~1
Needs: impl, utest
Images of a note¶
dsn~note-images~1
An image of a task is a file in the directory notes, which the note of the task shows as a Markdown image: .
noteImages gives the images of a note: the targets of its Markdown images that are a plain file name, so that neither an address nor a path that leads out of the directory is read.
For a storage with companion files, the edit dialog has the button Add image where the platform gives a function that chooses an image, and Take photo where it gives one for the camera.
The function gives the bytes of the images, several when the user chooses several, each scaled down to at most NOTE_IMAGE_SIZE pixels on its longer side and as JPEG, which compressImage of FileKit does.
The dialog names each file after the note with the first number that is free (imageName), appends each Markdown image as a paragraph to the note, and shows the images of the note below it at a height of 96 dp; a file that is missing or not shown is named instead.
Then the note has the focus, with the cursor at its end, behind the image.
TodoController writes the images that were added, and that the note still shows, to notes/<name> before it writes the note; an image whose line was removed from the note again is not written.
The desktop application chooses images with the file dialog; the Android application chooses them with the picker of the system and takes a photo with the camera application, into its cache.
On Android, ShareActivity also receives one or several shared images: TodoController.share adds a task with the shared text, or Image without one, applies the share action, and gives the task a note that shows the images.
A storage without companion files has no notes and therefore no images; an image shared to it is not added.
An image is not deleted: the file of an image whose line was removed from a saved note stays.
Covers:
req~note-images~1adr~images-next-to-notes~1
Needs: impl, utest
Hierarchy of contexts¶
dsn~context-hierarchy~1
> separates the levels of a context: research>reading lies below research.
Filter and the context term of Query match a context and the contexts below it (isWithin); removing a context term from a task removes the contexts below it as well.
TaskLabels shows the last level of a context and the path in a tooltip; a click on the label sets the filter to this context.
FilterPanel offers the contexts of the file and the contexts above them as a tree: a context with contexts below it starts a tree of one context per line, indented by its level, and the contexts without any share lines.
Covers:
req~context-hierarchy~1adr~context-hierarchy~1
Needs: impl, utest
Hierarchy of projects¶
dsn~project-hierarchy~1
> separates the levels of a project as it separates those of a context: papers>survey lies below papers.
Filter and the project term of Query match a project and the projects below it (isWithin); removing a project term from a task removes the projects below it as well.
A barrier or a limit of the plan for a project holds for the projects below it.
TaskLabels shows the last level of a project and the path in a tooltip; a click on the label sets the filter to this project.
FilterPanel offers the projects of the file and the projects above them as a tree: a project with projects below it starts a tree of one project per line, indented by its level, and the projects without any share lines.
A group of the list or the board stands for one project with its whole path, without those below it.
Covers:
req~project-hierarchy~1adr~project-hierarchy~1
Needs: impl, utest
Tag for the duration¶
dsn~duration~1
The tag dur: holds the duration in hours and minutes, such as 45m, 2h or 1h30m.
Task.duration reads it with the parser of the Kotlin standard library and gives nothing for a value that is no positive duration.
The edit dialog has a field for the tag and disables Save while its value is no duration.
Covers:
req~duration~1adr~duration-tag~1
Needs: impl, utest
Overview¶
dsn~overview~1
Task.urgency gives the days until the due date of an open task and the part of the time that has passed since its start: the start date, else the creation date, else two weeks before the due date.
overviewStates groups the open tasks by their contexts of the outermost level, a context including the contexts below it, and sorts the tasks of each by urgency; the tasks without context form a group of their own.
It groups by the projects of the outermost level or by the hashtags in the same way.
The state of a group is that of its most urgent task: overdue, due today, or neither.
Overview shows the groups of the visible tasks as tiles with a dot in the color of the state, and after a click on a tile the tasks of that group with a box that completes the task, a progress bar and the text of their urgency.
The second row of the view options selects contexts, projects or hashtags; contexts are selected at the start, and another choice shows the tiles again.
A switch above the tasks turns the overview on; it and the other views that replace the list exclude each other.
Covers:
req~overview~1
Needs: impl, utest
Inbox¶
dsn~inbox~1
TodoController.inbox gives the visible open tasks without context.
Inbox shows each of them with a box that completes it, and its hashtags next to its text and, after Give it:, the contexts of the file as labels with all their levels; a click on a label gives the task that context through Task.edit, and a click on the task opens the edit dialog.
One task is marked, at first the first one.
A field takes typed text: the marked task then shows the contexts that contain the text, those first of which a level starts with it.
Enter gives the marked task the first of them, or the typed text as a new context if no context contains it; the arrow keys up and down move the mark.
The switch of the inbox above the tasks shows the number of its tasks in parentheses, as the headings of groups show their counts.
Covers:
req~inbox~1
Needs: impl, utest
Tag for the task of ContextSwitcher¶
dsn~context-switcher-tag~1
The tag cs: holds the id of a task of ContextSwitcher as its links have it.
TaskLabels shows the tag as a label that opens the link contextswitcher://switch/<id> through the platform; App reports a link that the platform cannot open.
Task.withContextSwitcherTags replaces links of the forms contextswitcher://task/<id> and contextswitcher://switch/<id> by the tag; the edit dialog applies it.
The edit dialog has a field for the tag, which takes the id or such a link (Task.contextSwitcherId); emptying the field removes the tag.
Covers:
req~context-switcher-link~1adr~context-switcher-tag~1
Needs: impl, utest
Tag for a page of OneNote¶
dsn~onenote-tag~1
The tag onenote: holds the link of OneNote to a page without its scheme, so the link onenote:https://… that Copy Link to Page puts on the clipboard is the tag as it stands, and nothing has to be converted.
TaskLabels shows the tag as a label that opens the link through the platform; the label names the page as the fragment of the link has it (Task.oneNotePage), cut after thirty characters, and its tooltip the whole name; a link without a page is shown as OneNote.
OneNote copies an address of onedrive.live.com for the browser next to its link; when the task has the tag, the edit dialog drops that address (Task.withoutOneNoteWebLinks), so that no title is fetched for it and the description stays short.
Covers:
req~onenote-link~1adr~onenote-tag~1
Needs: impl, utest
Link to one task¶
dsn~task-link~1
taskLink writes the link koppter://task?onenote=<key>&text=<description> for a task and one of its tags onenote:, with the values encoded as by linkTo; taskLinkOf reads it back, also as koppter:task? and koppter://task/?.
The key (oneNoteKey) is the GUID of page-id={…} in the link of OneNote, with the braces as they are or encoded, and the whole link for one without it; keys are compared without regard to case.
TaskLink.find takes the tasks with a tag onenote: of that key, and of these the ones whose description is the text of the link; when none has it, as the task was edited since the link was written, all of them.
TodoController.openLink opens the edit dialog of a single task that it finds (taskRequested), also a completed one; for several, it shows the list with the key as the text of the filter, completed tasks and those before their threshold date included, as dsn~app-links~1 does for a filter.
With none in the file, the message, in the snackbar as other failures, says whether the task is archived in done.txt, which the application does not edit, or no task refers to the page.
The flow of .claude/skills/ux-review/SKILL.md: the link opens the existing edit dialog, whose Save, Cancel, Esc and back behave as for a click on the task; the dialog has the focus.
Nothing of it is kept in the settings, except the filter for several tasks, as for every link.
On a phone, the same link opens the dialog; Android has no AnchorHub, so the links on the page come from a desktop.
Covers:
req~onenote-backlinks~1adr~task-link-by-page-and-text~1
Needs: impl, utest
Links back on the pages of OneNote¶
dsn~onenote-backlinks~1
backlinks makes the complete set of links: for each task of the file and each completed task of done.txt, and for each of its tags onenote:, the link of OneNote with its scheme, the description as the label, the link of dsn~task-link~1 and whether the task is completed.
A task that is in both files, after an archiving that failed halfway, counts once.
TodoController.syncBacklinks sends the set at the start, after each synchronization that succeeded, which follows every change of the file, and, for a file without synchronization, at each periodic synchronization; it does not send the set that was sent last with success, and nothing before the file was read, as an empty set would remove every link.
It runs off the main thread, one call at a time, and logs what fails.
On the desktop, AnchorHubOneNote writes the set as JSON to ankd onenote-backlinks-sync with the source koppter and the icon of the application, koppter.png in Base64, which the page shows in front of the links: AnchorHub removes the links of this source from the pages that the set no longer names and strikes through those of completed tasks.
Its answer counts the pages updated, removed and unchanged and names those that failed; the counts and every failure go to the log, and a set with a failed page is sent again at the next synchronization.
An AnchorHub without the command is found by dsn~anchorhub-version~1; this is logged once and the set is not sent again until the next start.
Any other failure, such as an exit code other than 0, is logged with what AnchorHub printed to its error output, and the set is sent again.
Covers:
req~onenote-backlinks~1adr~outlook-through-anchorhub~1
Needs: impl, utest
Items of Outlook in the list¶
dsn~outlook-items~1
OutlookTodos reads the items; on the desktop, AnchorHubOutlook runs ankd outlook-todos of AnchorHub, installed in %LOCALAPPDATA%\Programs\AnchorHub, and reads the JSON array it prints (parseOutlookTodos).
App has TodoController.refreshOutlook read them at the start and every two minutes; a failure is logged and keeps the items read before.
Outlook.entries makes each item an entry with a negative index, whose task has the subject, the hashtag #outlook, due: and the tag ol: (Outlook.task); an item that the tag ol: of a line names, open or completed, is left out.
TodoController.visible adds them to the lines of the file, so that filter, order, groups and inbox treat them as tasks; TodoController.dueUnplanned does so as well, so that the agenda lists the due ones.
replace and move add the changed task of an item to the file as a new line, with the creation date if dates are written; the other operations that need a line do nothing for an item.
A subject that would read as the completion mark, a priority or a date at the start of a line gets a hyphen and a blank in front.
Covers:
req~outlook-items~1adr~outlook-through-anchorhub~1
Needs: impl, utest
AnchorHub that is too old¶
dsn~anchorhub-version~1
An ankd that does not know a command starts the host of the browser extension instead, prints nothing and exits with 0; it also ends before it reads the request on its input.
AnchorHubOutlook therefore takes an empty answer to a command that answers, all but outlook-open and outlook-complete, as a failure, and asks ankd version, which prints the version and the commands of the build.
missingCommand makes the message from that answer: an empty one means AnchorHub is too old, a list without the command names the version that lacks it, and each says to install the latest release of AnchorHub.
The list of commands is checked rather than the version, so that a build of AnchorHub of its own is judged by what it can do.
The message appears where the failure of the action appears already, such as in the plan dialog or in the log for the list of Outlook; a failed write of the request is left to that check.
Covers:
adr~outlook-through-anchorhub~1
Needs: impl, utest
TODOs of a LaTeX document in the list¶
dsn~latex-todos~1
The key latex of koppter.yml maps a project, written with its sign, to the path of the main file of a LaTeX document; ~ at its start stands for the home directory.
Latex.todos reads the file through the function readFile of TodoController, which only the desktop has, and follows \input, \include and \subfile, resolved against the directory of the main file, each file once.
Comments are left out.
A TODO is the argument of one of the commands \todo, \Todo, \TODO, \FIXME, \missingfigure, \zebratodo, \snaptodo, \fxnote, \fxwarning, \fxerror, \fxfatal, \draftnote, \pdfcomment, \commentatside and the second one of \commentontext: the packages compared in gadr-latex-packages, without those with generic names such as \note and \comment.
App has TodoController.refreshLatex read the documents at the start, after a change of the key, and every minute.
Latex.entries makes each TODO an entry with a negative index below those of the items of Outlook, whose task has the text, the project, the hashtag #latex and the tag tex:, a hash of the file and the text in base 36 (Latex.tag); a TODO that the tag tex: of a line names, open or completed, is left out.
TodoController.visible adds them to the lines of the file; replace and move add the changed task as a new line, as for an item of Outlook.
Task.completable is false for an open task with the tag tex:, and toggle leaves such a task as it is.
DoneBox shows the checkbox of a task in the list, the board, the inbox, the overview and the family calendar; for such a task, it shows the icon of a document instead, as a disabled checkbox looks almost like an enabled one.
A tap on the icon shows the hint Can't be ticked off here: done when the TODO is removed from the LaTeX document as a tooltip, which stays until the next tap elsewhere and on the desktop also appears when the pointer rests on it: a phone has no hover.
A completed line with the tag, from a version that allowed ticking it off, keeps its checkbox and can be reopened.
A click on the task opens the TODO in the document (dsn~latex-open~1).
TaskLabels shows the tag as the label LaTeX.
Covers:
req~latex-todos~1adr~latex-tag~1
Needs: impl, utest
Lines that follow a changed TODO¶
dsn~latex-rematch~1
Latex.todos returns null for a document whose main file cannot be read, and TodoController.refreshLatex keeps only the documents that were read.
After each reading, Latex.rematched takes, per project, the open lines whose tag tex: names no TODO of the document and the TODOs that no line names.
It pairs them by the share of words they have in common, the labels of the line left out, at least one half, the most alike pair first and each line and TODO once.
The line of a pair takes the text and the tag of the TODO and keeps its priority, dates, labels and other tags; refreshLatex writes all of them in one change.
A line without a pair stays as it is, open.
Covers:
req~latex-rematch~1adr~latex-rematch~1
Needs: impl, utest
Opening a TODO of a LaTeX document¶
dsn~latex-open~1
TaskLabels makes the label LaTeX open the link koppter-latex:<tag>, which App hands to TodoController.openLatex.
It looks up the TODO with that tag among those read last and calls the function openFile of the platform with its path and line, which only the desktop has.
The setting latexEditor, Program that opens a TODO in the settings, is a template such as code --goto {file}:{line}: Latex.command splits it at blanks and then replaces {file} and {line} in each word, so that a path with blanks stays one argument.
Blank, the desktop opens the file with the program of the system.
A TODO that is no longer in its document is reported.
Covers:
req~latex-open~1
Needs: impl, utest
Tag for an item of Outlook¶
dsn~outlook-tag~1
The tag ol: holds the EntryID of an item of Outlook as its bytes in Base64 for URLs, without padding (Outlook.tag, Outlook.entryId).
TaskLabels, and Inbox next to the hashtags, show the tag as the label Outlook (OutlookLabel), which opens the link anchor://outlook/message/<EntryID>?v=1 (Outlook.anchor); App hands such a link to TodoController.openOutlook, which runs ankd outlook-open with it.
The link names no store: AnchorHub looks for the EntryID in all of them.
Covers:
req~outlook-items~1adr~outlook-tag~1
Needs: impl, utest
Completion in Outlook¶
dsn~outlook-complete~1
TodoController.toggle of an item runs ankd outlook-complete with its link and drops the item from the list until it is read again.
Completing a task of the file with the tag ol: does the same after the line is written; reopening it changes nothing in Outlook.
Covers:
req~outlook-items~1
Needs: impl, utest
Notes¶
dsn~notes~1
For a storage with companion files, the edit dialog has a field for the note.
A task without a note gets the tag note: with a new file name of three characters and the extension .md when the user enters a note; clearing the note removes the tag and leaves the file.
The note is Markdown by its file name only: the dialog edits it as text, and a note with another extension, such as the .txt of the add-on, is read and written under its name.
TodoController writes the text to notes/<name> before it writes the task.
A change of the note alone is passed to the storage as a change of its own, so that a storage with a history records it.
Covers:
req~notes~1
Needs: impl, utest
Templates of tasks¶
dsn~templates~1
The templates are kept in task-templates.md next to the todo.txt file, which is edited by hand.
The file is Markdown that passes markdownlint with its default rules, which allow one title #: a heading ## name starts a template, and only a file without such a heading takes # name instead.
A heading of another level, such as the title # Templates, ends the template above it, and the lines up to the next template are ignored, so that the title and the rules below it are no template.
Each further line that does not start with a blank is a task of the template in the notation of todo.txt, as a list item - … or as a plain line, and the indented lines below a task are its note, without the indentation of their first line.
A separator such as --- between two templates is allowed and ignored.
A line that starts with # without a blank, such as a hashtag, is a task.
For a storage with companion files, the button with a plus on a stack of pages stands right of the button + of a new task, on a phone among the floating buttons and in a wide window in the row of the views.
It opens a dialog that lists the templates with the descriptions of their tasks, a single template already chosen, and the due date and time for all tasks, both optional, with the days of the due chips; Add names the number of tasks.
Without task-templates.md, the dialog says where the templates are kept and shows an example.
Add adds all tasks of the template in one change Add template: <name>, each with the chosen due: and dueby: in place of its own, and each note in a file of its own with a new name.
Cancel, Esc, a click beside the dialog and back close it without a change.
In the tasks and their notes, {due} becomes the chosen due date, or today without one, and {today} today; + or - with a number of days d or weeks w, as in {today+1w} or {due-2d}, adds or subtracts them, so that t:{due} due:{due} is a task to be done on the chosen day.
Covers:
req~templates~1
Needs: impl, utest
The file of the templates¶
dsn~templates-file~1
On the desktop, the dialog without task-templates.md has the button Create task-templates.md and edit it: it writes the file with the title, the rules below it, which stand outside of the templates and are therefore ignored, and two templates separated by ---, and opens it in the program that the system has for it.
An existing file is opened as it is.
The dialog closes, as the user goes on in the other program; the templates are read again when it is opened next.
Android has no such program for a file of the folder: there the button is Add example, which writes the same file, and the dialog stays open and lists its templates.
GitStorage commits task-templates.md with every commit, also when no write of the application names it, so that a change made in another program is committed at the next synchronization.
Covers:
req~templates~1
Needs: impl, utest
Checklist in a note¶
dsn~note-checklist~1
The items of a Markdown task list in the note, - [ ] text and - [x] text at any depth and with * or + as well, are shown in the edit dialog directly below the description, with check boxes in rows of at least 48 dp and the count of checked items, as ticking them off is what such a task is opened for.
A click on an item changes only its mark in the field of the note, which is saved with Save as any other change of the note.
Covers:
req~note-checklist~1
Needs: impl, utest
Progress of a checklist on the card¶
dsn~checklist-label~1
A task whose note has a checklist shows the label checklist: with the checked and all items, such as 1/3, in place of the label note: with the name of the file.
It stands first among the labels and has the color of the text, so that it is not read as one more tag.
TodoController reads the checklists of the notes of the tasks with the file and updates one when it writes its note, so that a card reads no file when it is drawn.
Covers:
req~note-checklist~1
Needs: impl, utest
Note on hover¶
dsn~note-preview~1
When the mouse rests 600 ms on a card whose task has a note that is not empty, the note is shown rendered in a popup 12 dp below the mouse, or above it where the window ends. It renders headings in bold, list items with a bullet, links that a click follows, and the items of a checklist with check boxes; other Markdown stays as it is written. The popup stays where it opened, so that the mouse can move into it, and closes 300 ms after the mouse left both the card and the popup. A click on an item of the checklist changes its mark in the file of the note at once, as the dialog would with Save: the popup has no Save, as the change is already done. A touch on the card opens no popup, and neither does a pressed button, which starts a click or the drag of a card.
A card names the note of its task with the label Note instead of the name of its file, or with the progress of its checklist. A click or a tap on that label opens the same popup below it, as following a link of a note is what a phone is used for most and the dialog of the task shows the note only as text to edit. Opened with a finger, its lines stand 14 dp apart instead of 2 dp, so that the finger hits the link or the item it means. This popup stays when the finger is lifted, so that several items can be ticked off, and closes with a click or a tap beside it, with Esc, and with back on Android, which close nothing else. A note that is empty opens no popup.
Covers:
req~note-preview~1
Needs: impl, utest
Links of OneNote in a note¶
dsn~onenote-links~1
OneNote copies the link to a page as two lines: the address of the page on the web and, starting with onenote:, the address that opens the page in the program.
oneNoteLinks turns the two into a Markdown list of the links OneNote Desktop and OneNote Web, on lines of their own; an address with a parenthesis stands in angle brackets.
The field of the note applies it with every change to the text before the cursor, so that a link pasted there is converted and the cursor stays behind it.
Covers:
req~notes~1
Needs: impl, utest
Schedule of ice_recur¶
dsn~ice-recur-schedule~1
IceRecurEntry.parse reads a line of the form [@start] [@@end] timing - task.
The timing is daily, weekly, monthly or yearly with an optional interval, followed by the specifiers day, day_of_month, day_of_week, day_of_year and month_of_year, separated by ;.
IceRecurEntry.occursOn tells whether the schedule includes a date.
Without a start, the start is 2018-01-01, as in the add-on.
An interval of weeks counts weeks from Monday to Sunday (decision 0050).
A line that is not understood is skipped.
Covers:
req~scheduled-tasks~1
Needs: impl, utest
Run of ice_recur¶
dsn~ice-recur-run~1
iceRecurTasks returns, for a range of days, the tasks of the entries that occur on a day and have no open task with the same text, each with its day; a task is returned once.
TodoController adds them once per day and device, for the days after the last run up to today; the day of the last run is kept in the settings.
The day of an added task is its creation date if dates are written.
With a synchronizing storage, the run waits for a running synchronization, and a task that the history shows as added since the last run counts as present even if it is completed.
Covers:
req~scheduled-tasks~1
Needs: impl, utest
Archive¶
dsn~archive~2
archive returns the file without the tasks that were completed more than the given number of days before today, and their lines for done.txt; two devices that look on the same day find the same ones.
The number is that of the key days below the key archive of koppter.yml, ConfigFile.DEFAULT_ARCHIVE_DAYS, 7, if the file does not have it or it is not a number of at least 0.
The day of completion is the completion date of the line, or else the one that the history tells; a line for done.txt gets both dates that are known, as the history of that file does not tell them.
A completed task stays if its day of completion is not known, if it has the tag ol: or tex:, as its line hides the item of Outlook or the TODO of LaTeX, if an open task names its id: with p:, or if it belongs to a shared list, whose file and ranking it stays in.
TodoController looks for such tasks once per day for a storage with files next to the todo.txt file, not while a synchronization runs; it appends the lines that done.txt does not have yet, and writes that file before the todo.txt file, with the change Archive completed tasks.
GitStorage merges done.txt with mergeLines.
Covers:
req~archive~2
Needs: impl, utest
Archive from a menu¶
dsn~archive-menu~1
The menu of a task card, opened by a secondary click or a long press, has the item Archive to done.txt for a completed task.
The heading of a group whose tasks are all completed opens a menu the same way, with the item that archives the tasks of the group.
Both call archive with the chosen lines instead of the dates, so that the exceptions of the daily archive hold; a task that stays is named in the message.
They are missing for a storage without files next to the todo.txt file.
Covers:
req~archive~2
Needs: impl, utest
Expiry¶
dsn~expiry~1
The tag exp: holds the last day of the task as YYYY-MM-DD; Task.expires reads it.
expire returns the file without the open tasks whose last day lies before today, and the removed tasks; a completed task stays, as does a task with the tag ol: or tex:, whose item of Outlook or TODO of LaTeX would show up again without its line.
TodoController looks for such tasks once per day, before it adds the scheduled tasks, and not while a synchronization runs, so that a task completed on another device is not removed; it writes the file with the change Remove expired task: followed by the descriptions.
The line is deleted, not marked: the todo.txt format knows only x for a completed task, and the history of a git repository keeps the line.
Task.due returns the last day for a task without the tags due: and deadline:, so that the planner plans the task before the day and the list order, the groups and the filters need no change.
Task.nextOccurrence moves the last day as far as the due date; a last day that stood in for the due date stays the only date.
lint reads the tag as it reads due:.
Covers:
req~expiry~1adr~expiry-tag~1
Needs: impl, utest
Editor of ice_recur¶
dsn~ice-recur-editor~1
ScheduleDialog, opened from the top bar if the storage keeps files next to the todo.txt file, edits the text of ice_recur.txt.
iceRecurLines returns the lines that are neither blank nor comments; the dialog shows for each the day of IceRecurEntry.next, or that the line is not understood.
Such a line does not prevent saving, as the run skips it.
TodoController.updateSchedule writes the file and adds the tasks that the lines which were not in the file before have for today, as the run of the day does not come back to them.
Covers:
req~scheduled-tasks-editor~1
Needs: impl, utest
Suggested schedule¶
dsn~ice-recur-suggestion~1
While the file ice_recur.txt does not exist, ScheduleDialog shows the entry SUGGESTED_ICE_RECUR in place of an empty text, the weekly review of Getting Things Done on every Friday, and tells that it is a suggestion.
The suggestion is a text of the editor only: the run and the plan read the file, so that nothing is scheduled until the user saves.
A file without entries gets no suggestion.
Covers:
req~scheduled-tasks-editor~1
Needs: impl, utest
Deadline¶
dsn~deadline~1
The tag deadline: holds a date, or a date and a time as 2026-11-30T12:00; Task.parseDeadline reads both, Task.deadline is the date and Task.deadlineTime the time.
After the time, the tag may hold seconds, which are not used, and an offset from UTC as Z, +hh:mm or -hh:mm: Task.parseDeadline then returns the date and the time in the time zone of the device, and the label shows them, as Task.localDeadline writes them, with the value of the tag when the pointer rests on it.
Task.due returns the deadline for a task without the tag due:, and Task.by the time of the deadline, so that the list order, the groups, the filters and the planner need no change.
Task.isOverdue compares today with the deadline, and with the due date only for a task without deadline.
Urgency.state is due for a task whose due date has passed and whose deadline has not, and Urgency.text names the deadline after the due date.
CalendarTxt.state is tight for a plan that ends after the due date and not after the deadline, and late for one that ends after the deadline, or on its day after its time.
The label of each of the two dates is highlighted by its own date: the deadline as overdue once it has passed, the due date as on its day while the deadline lies ahead.
The edit dialog has a date field for the tag, and the menu that moves the due date offers to remove the due date only for a task that has the tag due:.
Task.nextOccurrence moves the day that the tag holds as far as the due date; a deadline that stood in for the due date stays the only date.
lint and the dates of a share action read the tag as they read due:.
Covers:
req~deadline~1adr~deadline-tag~1adr~deadline-time~1adr~deadline-offset~1
Needs: impl, utest
Next actions¶
dsn~next-actions~1
actionable gives the open tasks that can be worked on now: those without the context @waiting or one below it, without the hashtag #someday, whose start date has come, and that wait for no other open task through id: and p:.
With the option Only the next action of each project of the filter panel on, TodoController.visible is cut by nextActions to these tasks, and of each project to the first one in list order among the filtered tasks; a task without project stays.
Clear all in the filter panel turns the option off.
projectsWithoutNextAction gives the projects that have an open task whose start date has come, but none that can be worked on, in the projects below them neither.
overviewStates adds them to the tiles by project from all tasks of the file, whatever the filter shows, and Overview names them on the tile.
Covers:
req~next-actions~1adr~next-actions-derived~1
Needs: impl, utest