feat(todo): filters in Todoist's language, and a view of each label (ADR 0033, D35)

A filter is a query read on the device, as the server sees no task, kept
sealed in `saved_filter`. Filters & labels is a screen of its own under
Browse; a label opens its tasks, and favourite filters and labels join
Browse's Favourites. D36 records what of Todoist's Pro stays out.

Whats-New: Filters: keep views like "today & p1", and open a label to see its tasks, under Browse in Filters & labels.
Whats-New-De: Filter: Speichere Ansichten wie „heute & p1“ und öffne ein Label, um seine Aufgaben zu sehen, in der Übersicht unter Filter & Labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-06 19:44:46 +01:00
commit b1f2078357
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -53,7 +53,7 @@ void main() {
test(
'deleting a person deletes their space with every key, project, '
"section, task, label and settings in it, and nobody else's",
"section, task, label, filter and settings in it, and nobody else's",
() async {
for (final person in [alice, bob]) {
await _projectOf(session, person);
@ -106,10 +106,11 @@ const _tables = [
'section',
'task',
'label',
'saved_filter',
'todo_settings',
];
/// A key, a project, a section, a task, a label and the settings in
/// A key, a project, a section, a task, a label, a filter and the settings in
/// [person]'s personal space, written as their device
/// would through the sync engine (payloads stand in for sealed ones: the
/// server never reads them).
@ -141,6 +142,11 @@ Future<void> _projectOf(Session session, UuidValue person) =>
Label(keyId: 'todo1.0.key', payload: sealed, nonce: sealed),
transaction: transaction,
);
await SavedFilter.db.insertRow(
session,
SavedFilter(keyId: 'todo1.0.key', payload: sealed, nonce: sealed),
transaction: transaction,
);
await TodoSettings.db.insertRow(
session,
TodoSettings(keyId: 'todo1.0.key', payload: sealed, nonce: sealed),