feat(locks): add the Unlocked profile screen (#2005) - #2301
Draft
Taewa wants to merge 5 commits into
Draft
Conversation
- List the content the signed-in reader has unlocked at /profile/unlocked, newest first - Add an Unlocked entry with a count to the profile sidebar and the mobile menu, own profile only - Render each unlocked post the way the feed does: article titles, images, videos, file downloads, link embeds - Read the list once per profile visit and share it between the sidebar count and the screen - Load a post's media only when its card renders, and release it when the card goes away - Skip locks whose replication never finished, and drop a corrupt or missing entry instead of failing the whole list - Order by the homeserver's write time rather than a timestamp the client puts in the file - Expand long posts in place, since an unlocked copy has no post page to open
- Keep the title when locking an article, so the unlocked copy can show it — it was dropped before and could not be recovered - Render an unlocked article with its title and cover image in the feed, instead of plain body text - Same fix reaches the creator viewing their own locked article, which reads through the same path - Articles locked before this still render as body text rather than breaking
…ent the announcement kind rule
Collaborator
Author
|
https://github.com/pubky/pubky-homeserver/blob/1106eb02360b0bce88b0a6136f85f20308caebac/pubky-sdk/bindings/js/pkg/tests/events.ts#L110 <- This should be used instead of |
…d-profile Brings in the 18 reader commits this branch was missing, including the 2026 creator work that the previous two merges added to the reader branch. Three conflicts, all resolved by combining both sides rather than picking one: - HomeserverService.getBytesIfExists — this branch had added the Last-Modified timestamp so the unlocked list can sort by it, and the reader branch had made only a 404 mean "absent". Both are kept: the 404 check and assertOk run first, then the result carries bytes and modifiedAt. - The tests for that method — both sides wrote their own set. Both sets are kept and share one URL constant, and the reader branch's assertion now reads result.bytes instead of the old plain Uint8Array. - locks.test.ts imports — the union of both sides, since all three error codes are used. LockedPostContent.test.tsx still called mockUsePostLock, which f6cc872 had replaced with mockLockData. The two calls added on this branch now use the new helper; the signature is the same. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2005. Part of #1998, stacked on #2003 — base is
feat/2003-locks-reader-integration, review that first. Draft until #2252 merges.What this adds
/profile/unlockedlisting the content the signed-in reader has unlocked, newest first./priv, so another user's profile has none.Behaviour worth knowing
/privtwice.Not in scope
collectionpostsNotes for review
docs/locks.mdhas a new section covering the flow and the decisions above.