feat(todo): comments and descriptions in the editor (ADR 0033, D38)

Comments and the descriptions of tasks, projects, sections and filters
become the editor's document on halkyon_editor; names and titles stay
text. Rows written as text read as notes and become documents when next
saved, the server seeing only sealed bytes, so there is no migration.

Sections' descriptions can now be written, and a project's shows above
its tasks. Android answers whether a link can open only for what is
declared, so Todo declares http and https.

Whats-New: Comments and descriptions take rich text: headings, lists, checklists, links and more.
Whats-New-De: Kommentare und Beschreibungen können jetzt formatiert werden: Überschriften, Listen, Checklisten, Links und mehr.

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

View file

@ -1,4 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:halkyon_todo_flutter/src/core/note/note.dart';
import 'package:halkyon_todo_flutter/src/core/sealed/json_payload.dart';
import 'package:halkyon_todo_flutter/src/feature/comment/data/comment_payload.dart';
import 'package:halkyon_todo_flutter/src/feature/comment/model/comment.dart';
@ -10,12 +11,12 @@ void main() {
test('comes back as it went, edited or not', () {
final plain = CommentContent(
taskId: 't1',
text: 'Ask the vet',
text: noteOf('Ask the vet'),
writtenAt: written,
);
final edited = CommentContent(
taskId: 't1',
text: 'Ask the vet again',
text: noteOf('Ask the vet again'),
writtenAt: written,
editedAt: written.add(const Duration(hours: 1)),
);
@ -27,14 +28,14 @@ void main() {
test('keeps its reactions, and an edit leaves them', () {
final reacted = CommentContent(
taskId: 't1',
text: 'Ask the vet',
text: noteOf('Ask the vet'),
writtenAt: written,
).reactedWith('❤️').reactedWith('👍');
expect(reacted.reactions, ['❤️', '👍']);
expect(decodeComment(encodeComment(reacted)), reacted);
expect(
reacted.edited('Ask again', written).reactions,
reacted.edited(noteOf('Ask again'), written).reactions,
reacted.reactions,
);
});
@ -42,7 +43,7 @@ void main() {
test('the same reaction again takes it off', () {
final reacted = CommentContent(
taskId: 't1',
text: 'Ask the vet',
text: noteOf('Ask the vet'),
writtenAt: written,
).reactedWith('❤️').reactedWith('❤️');