feat(explore): take a later release into a copy, at a tap

A copy's top studyset says when a newer release of what it came from is
out, and what it would bring: changed, new and withdrawn items, counted
against the release the copy last took. Update takes it, never by
itself (ADR 0005, rule 4): cards, notes and steps take the release as a
revision on the one where they last took a release and merge per side,
as a dictionary's corrections do, so what the learner changed stays and
a side both changed is a conflict to settle; studysets, paths and PDFs
take each field the learner left as it was. New items come in where
they belong, unless the learner deleted that part; what the author
withdrew stays, marked, and the card browser filters for it; what the
learner deleted stays deleted; progress is never touched.

The instance gives out any release by its version, for the app to
compare the two. UpdateTaken moves into the shared revision merge, now
that notes and steps take updates too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-09 23:47:41 +02:00
commit 5613530f82
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -366,15 +366,21 @@ class EndpointExplore extends _isc.EndpointRef {
{'publicIds': publicIds},
);
/// The latest release of the published studyset [publicId], to make a
/// copy of or take into one. Throws [NotFoundException] for a studyset
/// withdrawn or never published.
_ida.Future<_icu7niot.ReleaseContent> release(_isc.UuidValue publicId) =>
caller.callServerEndpoint<_icu7niot.ReleaseContent>(
'explore',
'release',
{'publicId': publicId},
);
/// Release [version] of the published studyset [publicId], else its
/// latest: to make a copy of, or to take into one from the release it
/// last took. Throws [NotFoundException] for a release that doesn't
/// exist, or a studyset withdrawn or never published.
_ida.Future<_icu7niot.ReleaseContent> release(
_isc.UuidValue publicId, {
int? version,
}) => caller.callServerEndpoint<_icu7niot.ReleaseContent>(
'explore',
'release',
{
'publicId': publicId,
'version': version,
},
);
/// The file [sha256] of release [version] of the published studyset
/// [publicId]. Throws [NotFoundException] for a file the release doesn't