2026-10-19 20:08:27 +02:00
|
|
|
/* AUTOMATICALLY GENERATED CODE DO NOT MODIFY */
|
|
|
|
|
/* To generate run: "serverpod generate" */
|
|
|
|
|
|
|
|
|
|
// ignore_for_file: implementation_imports
|
|
|
|
|
// ignore_for_file: library_private_types_in_public_api
|
|
|
|
|
// ignore_for_file: non_constant_identifier_names
|
|
|
|
|
// ignore_for_file: public_member_api_docs
|
|
|
|
|
// ignore_for_file: type_literal_in_constant_pattern
|
|
|
|
|
// ignore_for_file: use_super_parameters
|
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member
|
|
|
|
|
// ignore_for_file: dead_code, unnecessary_type_check
|
|
|
|
|
|
|
|
|
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
import 'package:halkyon_base_client/halkyon_base_client.dart' as _ihk4p5t7;
|
2026-10-23 20:28:37 +02:00
|
|
|
import 'package:halkyon_oidc_client/halkyon_oidc_client.dart' as _ibkpwzgl;
|
2026-11-05 14:58:38 +01:00
|
|
|
import 'package:halkyon_todo_client/src/protocol/search/place.dart'
|
|
|
|
|
as _i15767wh;
|
2026-10-19 20:08:27 +02:00
|
|
|
import 'package:serverpod_auth_core_client/serverpod_auth_core_client.dart'
|
|
|
|
|
as _iacc;
|
|
|
|
|
import 'package:serverpod_auth_idp_client/serverpod_auth_idp_client.dart'
|
|
|
|
|
as _iaic;
|
|
|
|
|
import 'package:serverpod_client/serverpod_client.dart' as _isc;
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
import 'package:serverpod_database/serverpod_database.dart' as _isd;
|
|
|
|
|
import 'package:serverpod_offline_sync_client/serverpod_offline_sync_client.dart'
|
|
|
|
|
as _ipulbpi2;
|
2026-11-06 19:44:46 +01:00
|
|
|
import 'filter/saved_filter.dart' as _i9q9fhid;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
import 'label/label.dart' as _ivak08z4;
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
import 'privacy/content_key.dart' as _imed3x5d;
|
|
|
|
|
import 'project/project.dart' as _i9c44spp;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
import 'project/section.dart' as _imadkvi9;
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
import 'search/nearby.dart' as _ispk4ita;
|
2026-11-05 14:58:38 +01:00
|
|
|
import 'search/place.dart' as _iadh29yw;
|
|
|
|
|
import 'search/place_point.dart' as _itf0ur2u;
|
|
|
|
|
import 'search/search_refused.dart' as _ihbxkwke;
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
import 'settings/todo_settings.dart' as _icak60vd;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
import 'task/task.dart' as _ib4f8uyw;
|
2026-11-06 19:44:46 +01:00
|
|
|
export 'filter/saved_filter.dart';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
export 'label/label.dart';
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
export 'privacy/content_key.dart';
|
|
|
|
|
export 'project/project.dart';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
export 'project/section.dart';
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
export 'search/nearby.dart';
|
2026-11-05 14:58:38 +01:00
|
|
|
export 'search/place.dart';
|
|
|
|
|
export 'search/place_point.dart';
|
|
|
|
|
export 'search/search_refused.dart';
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
export 'settings/todo_settings.dart';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
export 'task/task.dart';
|
2026-10-19 20:08:27 +02:00
|
|
|
export 'client.dart';
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
export 'sync_tables.dart';
|
2026-10-19 20:08:27 +02:00
|
|
|
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
class Protocol extends _isd.DatabaseSerializationManager {
|
2026-10-19 20:08:27 +02:00
|
|
|
Protocol._();
|
|
|
|
|
|
|
|
|
|
factory Protocol() => _instance;
|
|
|
|
|
|
|
|
|
|
static final Protocol _instance = Protocol._().._registerHostProtocols();
|
|
|
|
|
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
static List<_isd.TableDefinition> get targetTableDefinitions => [
|
|
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'content_key',
|
|
|
|
|
dartName: 'ContentKey',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'dataKeyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'String',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'sealedKey',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'content_key_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'content_key_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'label',
|
|
|
|
|
dartName: 'Label',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'label_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'label_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'project',
|
|
|
|
|
dartName: 'Project',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'project_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'project_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
2026-11-06 19:44:46 +01:00
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'saved_filter',
|
|
|
|
|
dartName: 'SavedFilter',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'saved_filter_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'saved_filter_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'section',
|
|
|
|
|
dartName: 'Section',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'section_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'section_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
|
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'task',
|
|
|
|
|
dartName: 'Task',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'task_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'task_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
_isd.TableDefinition(
|
|
|
|
|
name: 'todo_settings',
|
|
|
|
|
dartName: 'TodoSettings',
|
|
|
|
|
schema: 'public',
|
|
|
|
|
module: 'halkyon_todo',
|
|
|
|
|
columns: [
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'id',
|
|
|
|
|
columnType: _isd.ColumnType.uuid,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'UuidValue?',
|
|
|
|
|
columnDefault: 'random_v7',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'spaceId',
|
|
|
|
|
columnType: _isd.ColumnType.bigint,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'int?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'keyId',
|
|
|
|
|
columnType: _isd.ColumnType.text,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'String?',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'payload',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: false,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData',
|
|
|
|
|
),
|
|
|
|
|
_isd.ColumnDefinition(
|
|
|
|
|
name: 'nonce',
|
|
|
|
|
columnType: _isd.ColumnType.bytea,
|
|
|
|
|
isNullable: true,
|
|
|
|
|
dartType: 'dart:typed_data:ByteData?',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
foreignKeys: [
|
|
|
|
|
_isd.ForeignKeyDefinition(
|
|
|
|
|
constraintName: 'todo_settings_fk_0',
|
|
|
|
|
columns: ['spaceId'],
|
|
|
|
|
referenceTable: 'offline_sync_spaces',
|
|
|
|
|
referenceTableSchema: 'public',
|
|
|
|
|
referenceColumns: ['id'],
|
|
|
|
|
onUpdate: _isd.ForeignKeyAction.noAction,
|
|
|
|
|
onDelete: _isd.ForeignKeyAction.cascade,
|
|
|
|
|
matchType: null,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
indexes: [
|
|
|
|
|
_isd.IndexDefinition(
|
|
|
|
|
indexName: 'todo_settings_space_idx',
|
|
|
|
|
tableSpace: null,
|
|
|
|
|
elements: [
|
|
|
|
|
_isd.IndexElementDefinition(
|
|
|
|
|
type: _isd.IndexElementDefinitionType.column,
|
|
|
|
|
definition: 'spaceId',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
type: 'btree',
|
|
|
|
|
isUnique: false,
|
|
|
|
|
isPrimary: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
managed: true,
|
|
|
|
|
),
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
..._ihk4p5t7.Protocol() is _isd.DatabaseSerializationManager
|
|
|
|
|
? (_ihk4p5t7.Protocol() as _isd.DatabaseSerializationManager)
|
|
|
|
|
.getTargetTableDefinitions()
|
|
|
|
|
: [],
|
|
|
|
|
..._iaic.Protocol() is _isd.DatabaseSerializationManager
|
|
|
|
|
? (_iaic.Protocol() as _isd.DatabaseSerializationManager)
|
|
|
|
|
.getTargetTableDefinitions()
|
|
|
|
|
: [],
|
|
|
|
|
..._ipulbpi2.Protocol() is _isd.DatabaseSerializationManager
|
|
|
|
|
? (_ipulbpi2.Protocol() as _isd.DatabaseSerializationManager)
|
|
|
|
|
.getTargetTableDefinitions()
|
|
|
|
|
: [],
|
|
|
|
|
..._ibkpwzgl.Protocol() is _isd.DatabaseSerializationManager
|
|
|
|
|
? (_ibkpwzgl.Protocol() as _isd.DatabaseSerializationManager)
|
|
|
|
|
.getTargetTableDefinitions()
|
|
|
|
|
: [],
|
|
|
|
|
..._iacc.Protocol() is _isd.DatabaseSerializationManager
|
|
|
|
|
? (_iacc.Protocol() as _isd.DatabaseSerializationManager)
|
|
|
|
|
.getTargetTableDefinitions()
|
|
|
|
|
: [],
|
|
|
|
|
];
|
|
|
|
|
|
2026-10-19 20:08:27 +02:00
|
|
|
static String? getClassNameFromObjectJson(dynamic data) {
|
|
|
|
|
if (data is! Map) return null;
|
|
|
|
|
final className = data['__className__'] as String?;
|
|
|
|
|
return className;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
T deserialize<T>(
|
|
|
|
|
dynamic data, [
|
|
|
|
|
Type? t,
|
|
|
|
|
]) {
|
|
|
|
|
t ??= T;
|
|
|
|
|
|
|
|
|
|
final dataClassName = getClassNameFromObjectJson(data);
|
|
|
|
|
if (dataClassName != null && dataClassName != getClassNameForType(t)) {
|
|
|
|
|
try {
|
|
|
|
|
return deserializeByClassName({
|
|
|
|
|
'className': dataClassName,
|
|
|
|
|
'data': data,
|
|
|
|
|
});
|
|
|
|
|
} on _isc.DeserializationClassNameNotFoundException catch (_) {
|
|
|
|
|
// If the className is not recognized (e.g., older client receiving
|
|
|
|
|
// data with a new subtype), fall back to deserializing without the
|
|
|
|
|
// className, using the expected type T.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-06 19:44:46 +01:00
|
|
|
if (t == _i9q9fhid.SavedFilter) {
|
|
|
|
|
return _i9q9fhid.SavedFilter.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _ivak08z4.Label) {
|
|
|
|
|
return _ivak08z4.Label.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
if (t == _imed3x5d.ContentKey) {
|
|
|
|
|
return _imed3x5d.ContentKey.fromJson(data) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _i9c44spp.Project) {
|
|
|
|
|
return _i9c44spp.Project.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _imadkvi9.Section) {
|
|
|
|
|
return _imadkvi9.Section.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
if (t == _ispk4ita.Nearby) {
|
|
|
|
|
return _ispk4ita.Nearby.fromJson(data) as T;
|
|
|
|
|
}
|
2026-11-05 14:58:38 +01:00
|
|
|
if (t == _iadh29yw.Place) {
|
|
|
|
|
return _iadh29yw.Place.fromJson(data) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _itf0ur2u.PlacePoint) {
|
|
|
|
|
return _itf0ur2u.PlacePoint.fromJson(data) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _ihbxkwke.SearchRefused) {
|
|
|
|
|
return _ihbxkwke.SearchRefused.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
if (t == _icak60vd.TodoSettings) {
|
|
|
|
|
return _icak60vd.TodoSettings.fromJson(data) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _ib4f8uyw.Task) {
|
|
|
|
|
return _ib4f8uyw.Task.fromJson(data) as T;
|
|
|
|
|
}
|
2026-11-06 19:44:46 +01:00
|
|
|
if (t == _isc.getType<_i9q9fhid.SavedFilter?>()) {
|
|
|
|
|
return (data != null ? _i9q9fhid.SavedFilter.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _isc.getType<_ivak08z4.Label?>()) {
|
|
|
|
|
return (data != null ? _ivak08z4.Label.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
if (t == _isc.getType<_imed3x5d.ContentKey?>()) {
|
|
|
|
|
return (data != null ? _imed3x5d.ContentKey.fromJson(data) : null) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _isc.getType<_i9c44spp.Project?>()) {
|
|
|
|
|
return (data != null ? _i9c44spp.Project.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _isc.getType<_imadkvi9.Section?>()) {
|
|
|
|
|
return (data != null ? _imadkvi9.Section.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
if (t == _isc.getType<_ispk4ita.Nearby?>()) {
|
|
|
|
|
return (data != null ? _ispk4ita.Nearby.fromJson(data) : null) as T;
|
|
|
|
|
}
|
2026-11-05 14:58:38 +01:00
|
|
|
if (t == _isc.getType<_iadh29yw.Place?>()) {
|
|
|
|
|
return (data != null ? _iadh29yw.Place.fromJson(data) : null) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _isc.getType<_itf0ur2u.PlacePoint?>()) {
|
|
|
|
|
return (data != null ? _itf0ur2u.PlacePoint.fromJson(data) : null) as T;
|
|
|
|
|
}
|
|
|
|
|
if (t == _isc.getType<_ihbxkwke.SearchRefused?>()) {
|
|
|
|
|
return (data != null ? _ihbxkwke.SearchRefused.fromJson(data) : null)
|
|
|
|
|
as T;
|
|
|
|
|
}
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
if (t == _isc.getType<_icak60vd.TodoSettings?>()) {
|
|
|
|
|
return (data != null ? _icak60vd.TodoSettings.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (t == _isc.getType<_ib4f8uyw.Task?>()) {
|
|
|
|
|
return (data != null ? _ib4f8uyw.Task.fromJson(data) : null) as T;
|
|
|
|
|
}
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
if (t == List<_iadh29yw.Place>) {
|
|
|
|
|
return (data as List).map((e) => deserialize<_iadh29yw.Place>(e)).toList()
|
|
|
|
|
as T;
|
|
|
|
|
}
|
2026-11-05 14:58:38 +01:00
|
|
|
if (t == List<_i15767wh.Place>) {
|
|
|
|
|
return (data as List).map((e) => deserialize<_i15767wh.Place>(e)).toList()
|
|
|
|
|
as T;
|
|
|
|
|
}
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
try {
|
|
|
|
|
return _ihk4p5t7.Protocol().deserialize<T>(data, t);
|
|
|
|
|
} on _isc.DeserializationTypeNotFoundException catch (_) {}
|
2026-10-19 20:08:27 +02:00
|
|
|
try {
|
|
|
|
|
return _iaic.Protocol().deserialize<T>(data, t);
|
|
|
|
|
} on _isc.DeserializationTypeNotFoundException catch (_) {}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
try {
|
|
|
|
|
return _ipulbpi2.Protocol().deserialize<T>(data, t);
|
|
|
|
|
} on _isc.DeserializationTypeNotFoundException catch (_) {}
|
2026-10-23 20:28:37 +02:00
|
|
|
try {
|
|
|
|
|
return _ibkpwzgl.Protocol().deserialize<T>(data, t);
|
|
|
|
|
} on _isc.DeserializationTypeNotFoundException catch (_) {}
|
2026-10-19 20:08:27 +02:00
|
|
|
try {
|
|
|
|
|
return _iacc.Protocol().deserialize<T>(data, t);
|
|
|
|
|
} on _isc.DeserializationTypeNotFoundException catch (_) {}
|
|
|
|
|
return super.deserialize<T>(data, t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static String? getClassNameForType(Type type) {
|
|
|
|
|
return switch (type) {
|
2026-11-06 19:44:46 +01:00
|
|
|
_i9q9fhid.SavedFilter => 'SavedFilter',
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
_ivak08z4.Label => 'Label',
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
_imed3x5d.ContentKey => 'ContentKey',
|
|
|
|
|
_i9c44spp.Project => 'Project',
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
_imadkvi9.Section => 'Section',
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
_ispk4ita.Nearby => 'Nearby',
|
2026-11-05 14:58:38 +01:00
|
|
|
_iadh29yw.Place => 'Place',
|
|
|
|
|
_itf0ur2u.PlacePoint => 'PlacePoint',
|
|
|
|
|
_ihbxkwke.SearchRefused => 'SearchRefused',
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
_icak60vd.TodoSettings => 'TodoSettings',
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
_ib4f8uyw.Task => 'Task',
|
2026-10-19 20:08:27 +02:00
|
|
|
_ => null,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String? getClassNameForObject(Object? data) {
|
|
|
|
|
String? className = super.getClassNameForObject(data);
|
|
|
|
|
if (className != null) return className;
|
|
|
|
|
|
|
|
|
|
if (data is Map<String, dynamic> && data['__className__'] is String) {
|
|
|
|
|
return (data['__className__'] as String).replaceFirst(
|
|
|
|
|
'halkyon_todo.',
|
|
|
|
|
'',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
switch (data) {
|
2026-11-06 19:44:46 +01:00
|
|
|
case _i9q9fhid.SavedFilter():
|
|
|
|
|
return 'SavedFilter';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _ivak08z4.Label():
|
|
|
|
|
return 'Label';
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
case _imed3x5d.ContentKey():
|
|
|
|
|
return 'ContentKey';
|
|
|
|
|
case _i9c44spp.Project():
|
|
|
|
|
return 'Project';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _imadkvi9.Section():
|
|
|
|
|
return 'Section';
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
case _ispk4ita.Nearby():
|
|
|
|
|
return 'Nearby';
|
2026-11-05 14:58:38 +01:00
|
|
|
case _iadh29yw.Place():
|
|
|
|
|
return 'Place';
|
|
|
|
|
case _itf0ur2u.PlacePoint():
|
|
|
|
|
return 'PlacePoint';
|
|
|
|
|
case _ihbxkwke.SearchRefused():
|
|
|
|
|
return 'SearchRefused';
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
case _icak60vd.TodoSettings():
|
|
|
|
|
return 'TodoSettings';
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _ib4f8uyw.Task():
|
|
|
|
|
return 'Task';
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
}
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
className = _ihk4p5t7.Protocol().getClassNameForObject(data);
|
|
|
|
|
if (className != null) {
|
|
|
|
|
return className.contains('.') ? className : 'halkyon_base.$className';
|
2026-10-19 20:08:27 +02:00
|
|
|
}
|
|
|
|
|
className = _iaic.Protocol().getClassNameForObject(data);
|
|
|
|
|
if (className != null) {
|
|
|
|
|
return className.contains('.')
|
|
|
|
|
? className
|
|
|
|
|
: 'serverpod_auth_idp.$className';
|
|
|
|
|
}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
className = _ipulbpi2.Protocol().getClassNameForObject(data);
|
|
|
|
|
if (className != null) {
|
|
|
|
|
return className.contains('.')
|
|
|
|
|
? className
|
|
|
|
|
: 'serverpod_offline_sync.$className';
|
|
|
|
|
}
|
2026-10-23 20:28:37 +02:00
|
|
|
className = _ibkpwzgl.Protocol().getClassNameForObject(data);
|
|
|
|
|
if (className != null) {
|
|
|
|
|
return className.contains('.') ? className : 'halkyon_oidc.$className';
|
|
|
|
|
}
|
2026-10-19 20:08:27 +02:00
|
|
|
className = _iacc.Protocol().getClassNameForObject(data);
|
|
|
|
|
if (className != null) {
|
|
|
|
|
return className.contains('.')
|
|
|
|
|
? className
|
|
|
|
|
: 'serverpod_auth_core.$className';
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
dynamic deserializeByClassName(Map<String, dynamic> data) {
|
|
|
|
|
var dataClassName = data['className'];
|
|
|
|
|
if (dataClassName is! String) {
|
|
|
|
|
return super.deserializeByClassName(data);
|
|
|
|
|
}
|
2026-11-06 19:44:46 +01:00
|
|
|
if (dataClassName == 'SavedFilter') {
|
|
|
|
|
return deserialize<_i9q9fhid.SavedFilter>(data['data']);
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (dataClassName == 'Label') {
|
|
|
|
|
return deserialize<_ivak08z4.Label>(data['data']);
|
|
|
|
|
}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
if (dataClassName == 'ContentKey') {
|
|
|
|
|
return deserialize<_imed3x5d.ContentKey>(data['data']);
|
|
|
|
|
}
|
|
|
|
|
if (dataClassName == 'Project') {
|
|
|
|
|
return deserialize<_i9c44spp.Project>(data['data']);
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (dataClassName == 'Section') {
|
|
|
|
|
return deserialize<_imadkvi9.Section>(data['data']);
|
|
|
|
|
}
|
feat(todo): a pin in the map's middle, and what is around it (ADR 0033, D32)
The location picker fills the screen with its map, the search floating
over it. A pin stays in the middle, lifting while the map moves, as
Molly's; where it lands the instance names the address and lists the
places around, as Threema's. That is `nearby` on the search endpoint,
for those signed in, the point neither kept nor logged, counted among
the searches: two lookups, as a plain one finds house numbers alone.
Fixes the map's credit, which overflowed a phone and was pale on white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-05 23:42:06 +01:00
|
|
|
if (dataClassName == 'Nearby') {
|
|
|
|
|
return deserialize<_ispk4ita.Nearby>(data['data']);
|
|
|
|
|
}
|
2026-11-05 14:58:38 +01:00
|
|
|
if (dataClassName == 'Place') {
|
|
|
|
|
return deserialize<_iadh29yw.Place>(data['data']);
|
|
|
|
|
}
|
|
|
|
|
if (dataClassName == 'PlacePoint') {
|
|
|
|
|
return deserialize<_itf0ur2u.PlacePoint>(data['data']);
|
|
|
|
|
}
|
|
|
|
|
if (dataClassName == 'SearchRefused') {
|
|
|
|
|
return deserialize<_ihbxkwke.SearchRefused>(data['data']);
|
|
|
|
|
}
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
if (dataClassName == 'TodoSettings') {
|
|
|
|
|
return deserialize<_icak60vd.TodoSettings>(data['data']);
|
|
|
|
|
}
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
if (dataClassName == 'Task') {
|
|
|
|
|
return deserialize<_ib4f8uyw.Task>(data['data']);
|
|
|
|
|
}
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
if (dataClassName.startsWith('halkyon_base.')) {
|
|
|
|
|
data['className'] = dataClassName.substring(13);
|
|
|
|
|
return _ihk4p5t7.Protocol().deserializeByClassName(data);
|
2026-10-19 20:08:27 +02:00
|
|
|
}
|
|
|
|
|
if (dataClassName.startsWith('serverpod_auth_idp.')) {
|
|
|
|
|
data['className'] = dataClassName.substring(19);
|
|
|
|
|
return _iaic.Protocol().deserializeByClassName(data);
|
|
|
|
|
}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
if (dataClassName.startsWith('serverpod_offline_sync.')) {
|
|
|
|
|
data['className'] = dataClassName.substring(23);
|
|
|
|
|
return _ipulbpi2.Protocol().deserializeByClassName(data);
|
|
|
|
|
}
|
2026-10-23 20:28:37 +02:00
|
|
|
if (dataClassName.startsWith('halkyon_oidc.')) {
|
|
|
|
|
data['className'] = dataClassName.substring(13);
|
|
|
|
|
return _ibkpwzgl.Protocol().deserializeByClassName(data);
|
|
|
|
|
}
|
2026-10-19 20:08:27 +02:00
|
|
|
if (dataClassName.startsWith('serverpod_auth_core.')) {
|
|
|
|
|
data['className'] = dataClassName.substring(20);
|
|
|
|
|
return _iacc.Protocol().deserializeByClassName(data);
|
|
|
|
|
}
|
|
|
|
|
return super.deserializeByClassName(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _registerHostProtocols() {
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
_ihk4p5t7.Protocol().registerHostProtocol('halkyon_todo', this);
|
2026-10-19 20:08:27 +02:00
|
|
|
_iaic.Protocol().registerHostProtocol('halkyon_todo', this);
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
_ipulbpi2.Protocol().registerHostProtocol('halkyon_todo', this);
|
2026-10-23 20:28:37 +02:00
|
|
|
_ibkpwzgl.Protocol().registerHostProtocol('halkyon_todo', this);
|
2026-10-19 20:08:27 +02:00
|
|
|
_iacc.Protocol().registerHostProtocol('halkyon_todo', this);
|
|
|
|
|
}
|
|
|
|
|
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
@override
|
|
|
|
|
_isd.Table? getTableForType(Type t) {
|
|
|
|
|
{
|
|
|
|
|
var protocol = _ihk4p5t7.Protocol();
|
|
|
|
|
var table = protocol is _isd.DatabaseSerializationManager
|
|
|
|
|
? (protocol as _isd.DatabaseSerializationManager).getTableForType(t)
|
|
|
|
|
: null;
|
|
|
|
|
if (table != null) {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
var protocol = _iaic.Protocol();
|
|
|
|
|
var table = protocol is _isd.DatabaseSerializationManager
|
|
|
|
|
? (protocol as _isd.DatabaseSerializationManager).getTableForType(t)
|
|
|
|
|
: null;
|
|
|
|
|
if (table != null) {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
var protocol = _ipulbpi2.Protocol();
|
|
|
|
|
var table = protocol is _isd.DatabaseSerializationManager
|
|
|
|
|
? (protocol as _isd.DatabaseSerializationManager).getTableForType(t)
|
|
|
|
|
: null;
|
|
|
|
|
if (table != null) {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
var protocol = _ibkpwzgl.Protocol();
|
|
|
|
|
var table = protocol is _isd.DatabaseSerializationManager
|
|
|
|
|
? (protocol as _isd.DatabaseSerializationManager).getTableForType(t)
|
|
|
|
|
: null;
|
|
|
|
|
if (table != null) {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
var protocol = _iacc.Protocol();
|
|
|
|
|
var table = protocol is _isd.DatabaseSerializationManager
|
|
|
|
|
? (protocol as _isd.DatabaseSerializationManager).getTableForType(t)
|
|
|
|
|
: null;
|
|
|
|
|
if (table != null) {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
switch (t) {
|
2026-11-06 19:44:46 +01:00
|
|
|
case _i9q9fhid.SavedFilter:
|
|
|
|
|
return _i9q9fhid.SavedFilter.t;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _ivak08z4.Label:
|
|
|
|
|
return _ivak08z4.Label.t;
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
case _imed3x5d.ContentKey:
|
|
|
|
|
return _imed3x5d.ContentKey.t;
|
|
|
|
|
case _i9c44spp.Project:
|
|
|
|
|
return _i9c44spp.Project.t;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _imadkvi9.Section:
|
|
|
|
|
return _imadkvi9.Section.t;
|
feat(todo): a project's Calendar, Upcoming's Display and its 3-day grid (ADR 0033, D17)
A project's Display gains the Calendar layout: Upcoming's week strip
and agenda, now shared as DayAgenda, over the project's tasks it keeps,
with No date beside the month and Future occurrences, each repeating
task also on the days it will come back (calendarOf on Repeat.next),
muted, neither ticked off nor dragged.
Upcoming gets a Display of its own, the same sheet over another target
(DisplayTarget): Agenda or 3-day, done tasks, future occurrences,
sorting, the filters by deadline, priority and label, and in the grid
Colouring by priority, label or project. It is kept in the person's
settings, one sealed row under an ID keyed by the account in the new
synced table todo_settings (migration settings: the table, its index
on spaceId and its foreign key to the space, cascading on delete).
The 3-day grid shows today and the two days after, stepped or swiped
three at a time: tasks without a time all day, timed ones as blocks as
long as they last, overlapping ones side by side (layOutDay). A long
press on a half hour adds a task there for half an hour; Overdue opens
the overdue tasks with Reschedule.
The board's separator builder names its BuildContext, as the root's
analyzer plugin asks (never_discard_build_context).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 20:01:00 +01:00
|
|
|
case _icak60vd.TodoSettings:
|
|
|
|
|
return _icak60vd.TodoSettings.t;
|
feat(todo): sections, tasks and labels on the server (ADR 0033, D6)
Three more synced tables, each a sealed payload alone, as project's:
section, task and label; deleted with the person's space.
The migration only adds: the three tables (id uuid defaulting to
gen_random_uuid_v7(), spaceId, keyId, payload, nonce), each indexed on
spaceId and cascading with its space (ON DELETE CASCADE to
offline_sync_spaces), and the modules' version rows. Nothing is dropped
or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:06:24 +01:00
|
|
|
case _ib4f8uyw.Task:
|
|
|
|
|
return _ib4f8uyw.Task.t;
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<_isd.TableDefinition> getTargetTableDefinitions() =>
|
|
|
|
|
targetTableDefinitions;
|
|
|
|
|
|
2026-10-19 20:08:27 +02:00
|
|
|
@override
|
|
|
|
|
String getModuleName() => 'halkyon_todo';
|
|
|
|
|
|
|
|
|
|
/// Maps any `Record`s known to this [Protocol] to their JSON representation
|
|
|
|
|
///
|
|
|
|
|
/// Throws in case the record type is not known.
|
|
|
|
|
///
|
|
|
|
|
/// This method will return `null` (only) for `null` inputs.
|
|
|
|
|
Map<String, dynamic>? mapRecordToJson(Record? record) {
|
|
|
|
|
if (record == null) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
try {
|
|
|
|
|
return _ihk4p5t7.Protocol().mapRecordToJson(record);
|
|
|
|
|
} catch (_) {}
|
2026-10-19 20:08:27 +02:00
|
|
|
try {
|
|
|
|
|
return _iaic.Protocol().mapRecordToJson(record);
|
|
|
|
|
} catch (_) {}
|
feat(todo): the sync engine and Todo's first models (ADR 0033, D5, D6)
Todo's server syncs with serverpod_offline_sync as Learn's and Train's
do, and holds two synced tables, every payload sealed on the devices:
content_key (the person's data key, sealed to the account) and project
(the Inbox or one of the person's own, changed when edited). A person's
space goes with them, with everything in it.
The migration only adds: the two tables, each indexed on spaceId and
cascading with its space (ON DELETE CASCADE to offline_sync_spaces), the
sync engine's own tables (crdt_*, offline_sync_*) with their foreign
keys, the gen_random_uuid_v7() function their ids default to, and the
modules' version rows. Nothing is dropped or changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-01 01:00:53 +01:00
|
|
|
try {
|
|
|
|
|
return _ipulbpi2.Protocol().mapRecordToJson(record);
|
|
|
|
|
} catch (_) {}
|
2026-10-23 20:28:37 +02:00
|
|
|
try {
|
|
|
|
|
return _ibkpwzgl.Protocol().mapRecordToJson(record);
|
|
|
|
|
} catch (_) {}
|
2026-10-19 20:08:27 +02:00
|
|
|
try {
|
|
|
|
|
return _iacc.Protocol().mapRecordToJson(record);
|
|
|
|
|
} catch (_) {}
|
|
|
|
|
throw Exception('Unsupported record type ${record.runtimeType}');
|
|
|
|
|
}
|
|
|
|
|
}
|