feat(todo): the Inbox's Calendar as an Agenda or 3-day

As Todoist's Display in the Inbox: once its layout is Calendar, a row
"Layout: Agenda" opens a small choice of Agenda or 3-day; 3-day shows the
Inbox's tasks in Upcoming's HourGrid, whatever the window's width, where a
tap on an hour adds to the Inbox. Kept as the project's other Display
choices, in its sealed view (`calendarLayout`, written only when it isn't
the Agenda; a value this version doesn't know reads as the Agenda).
Another project's Calendar stays the agenda (or the month), as Todoist
offers the choice in the Inbox alone.

Whats-New: The Inbox's Calendar can show three days of hours: Display, Layout, 3-day.
Whats-New-De: Der Kalender des Eingangs kann drei Tage mit ihren Stunden zeigen: Anzeige, Layout, 3 Tage.
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-07 22:59:46 +01:00
commit 71b5337d21
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -61,6 +61,30 @@ void main() {
});
});
test(
"the Inbox's Calendar keeps its layout, Agenda or 3-day, written "
"only where it isn't the Agenda (the developer's review, 7 Nov 2026)",
() {
const threeDay = ProjectView(
layout: ProjectLayout.calendar,
calendarLayout: CalendarLayout.threeDay,
);
expect(encodeView(threeDay), {
'layout': 'calendar',
'calendarLayout': 'threeDay',
});
expect(decodeView(encodeView(threeDay)), threeDay);
expect(encodeView(const ProjectView(layout: ProjectLayout.calendar)), {
'layout': 'calendar',
});
expect(
decodeView({'layout': 'calendar', 'calendarLayout': 'week'}),
const ProjectView(layout: ProjectLayout.calendar),
reason: 'a layout this version does not know: the Agenda',
);
},
);
test('a Display value this version does not know reads as at first', () {
final read = decodeProject(
json({