feat(learn): confirm the notes and files a release takes

ADR 0044, D8 and D9, its first step: before publishing to Explore, the
person confirms the notes, PDFs and other files that go. Cards and
learning paths always go.

Publish's Continue leads to a step listing them by kind, none ticked at
first but those the latest release held. Each kind is ticked whole, and
an item's menu ticks everything but it or nothing but it. What isn't
ticked goes to the server as publish's leftOut. So does whatever the
sync before publishing brings that the person never saw.

The server leaves those out of the release and its counts, and leaves
out the files only they name. leftOut is optional: released apps send
none and publish everything, as before. publish.releasedMaterial names
the notes and files of the latest release, and none for a studyset not
the caller's, as for one never published.

Whats-New: Before publishing to Explore, you choose which notes and files go with the cards and learning paths.
Whats-New-De: Vor dem Veröffentlichen auf Explore wählst du, welche Notizen und Dateien mit den Karteikarten und Lernpfaden mitgehen.

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-11 01:54:16 +01:00
commit d664115c46
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
2 changed files with 1202 additions and 38 deletions

View file

@ -830,6 +830,18 @@ class EndpointPublish extends _isc.EndpointRef {
{'studysetId': studysetId},
);
/// The notes, PDFs and other files your studyset [studysetId]'s latest
/// release holds, by id, which the next release's confirmation ticks
/// from the start (ADR 0044, D9); none while it was never published, as
/// for a studyset that isn't yours.
_ida.Future<List<_isc.UuidValue>> releasedMaterial(
_isc.UuidValue studysetId,
) => caller.callServerEndpoint<List<_isc.UuidValue>>(
'publish',
'releasedMaterial',
{'studysetId': studysetId},
);
/// Your studysets out on Explore: published and not withdrawn, which the
/// library marks as public.
_ida.Future<List<_isc.UuidValue>> published() =>
@ -848,7 +860,10 @@ class EndpointPublish extends _isc.EndpointRef {
/// own description. One that isn't rich text, or is larger than
/// [maxExploreDescription], counts as not given. [tagNames] names the
/// tags its items carry (tag id to name), as the device reads them: the
/// person's tags are encrypted (ADR 0019, D2).
/// person's tags are encrypted (ADR 0019, D2). The notes, PDFs and
/// other files in [leftOut] stay out of it (ADR 0044, D9), as the person
/// confirmed before; null, as from apps before that step, leaves nothing
/// out.
///
/// Throws [PublishRefusedException] when it can't be published (see
/// [PublishRefusal]), and [NotFoundException] for a studyset that isn't
@ -859,6 +874,7 @@ class EndpointPublish extends _isc.EndpointRef {
String notes, {
String? description,
Map<String, String>? tagNames,
List<_isc.UuidValue>? leftOut,
}) => caller.callServerEndpoint<_ij0cqo11.Publication>(
'publish',
'publish',
@ -868,6 +884,7 @@ class EndpointPublish extends _isc.EndpointRef {
'notes': notes,
'description': description,
'tagNames': tagNames,
'leftOut': leftOut,
},
);

View file

@ -3106,6 +3106,14 @@ class Protocol extends _isd.DatabaseSerializationManager {
: null)
as T;
}
if (t == _isc.getType<List<_isc.UuidValue>?>()) {
return (data != null
? (data as List)
.map((e) => deserialize<_isc.UuidValue>(e))
.toList()
: null)
as T;
}
try {
return _ihk4p5t7.Protocol().deserialize<T>(data, t);
} on _isc.DeserializationTypeNotFoundException catch (_) {}