feat(todo): comments in boxes of their own, with reactions (ADR 0033, D36)

As Todoist's, after the developer's test: a task's sheet shows how many
comments it has, the latest on one line and Show all, with Add a comment
docked at its foot; comments open on a sheet of their own, each in its
box, the latest in view and the field staying at the foot. Reactions are
kept in the comment's sealed payload, each emoji once, picked from
emoji_picker_flutter, whose recents stay on the device.

Whats-New: Comments have a sheet of their own, each in its box, and take reactions; a task shows only the latest.
Whats-New-De: Kommentare haben ein eigenes Blatt, jeder in seinem Kasten, und nehmen Reaktionen an; eine Aufgabe zeigt nur den neuesten.

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:12:36 +01:00
commit 4875b26174
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -24,6 +24,31 @@ void main() {
expect(decodeComment(encodeComment(edited)), edited);
});
test('keeps its reactions, and an edit leaves them', () {
final reacted = CommentContent(
taskId: 't1',
text: 'Ask the vet',
writtenAt: written,
).reactedWith('❤️').reactedWith('👍');
expect(reacted.reactions, ['❤️', '👍']);
expect(decodeComment(encodeComment(reacted)), reacted);
expect(
reacted.edited('Ask again', written).reactions,
reacted.reactions,
);
});
test('the same reaction again takes it off', () {
final reacted = CommentContent(
taskId: 't1',
text: 'Ask the vet',
writtenAt: written,
).reactedWith('❤️').reactedWith('❤️');
expect(reacted.reactions, isEmpty);
});
test('of a later schema is not read', () {
expect(
decodeComment(encodeJson(commentSchemaVersion + 1, {'taskId': 't'})),