feat(library): who made a studyset, and whether it is public

Each card's foot now says who made the studyset: "By you", or for a copy
of a published studyset its author's handle. Beside the star, a lock or a
globe says whether it is out on Explore, and opens the Publish sheet.

The instance says which of the person's studysets are published and not
withdrawn (`PublishEndpoint.published`, additive: older apps don't call
it), and the app remembers that in the person's folder, so the library
shows it offline too; publishing, withdrawing and looking one up keep it
current.

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-10 05:17:10 +02:00
commit bc3e8d9ac3
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -861,6 +861,24 @@ void main() {
},
);
test("the studysets out on Explore are the person's published ones "
'not withdrawn', () async {
await profile(alice, 'alice');
await profile(bob, 'bob');
final alices = await japanese(alice);
final bobs = await japanese(bob);
expect(await endpoints.publish.published(signedIn(alice)), isEmpty);
await publish(alice, alices.root);
await publish(bob, bobs.root);
await endpoints.publish.withdraw(signedIn(bob), bobs.root);
expect(await endpoints.publish.published(signedIn(alice)), [
alices.root,
]);
expect(await endpoints.publish.published(signedIn(bob)), isEmpty);
});
test('deleting a person deletes their published studysets and their '
'repositories', () async {
useServerAuth();