feat(journals): pin entries - #91
Merged
Merged
Conversation
An entry can be pinned or unpinned from the top bar of its page. Pinned entries are listed in their own section above the rest, loaded in one request with pinned=true while the paged list asks for pinned=false, the same split the web app uses. With the Journal entries safety category on and a grace period set, unpinning asks for re-auth and queues a journal_unpin action instead. The entry then shows when the unpin will finalize, and the pending action has a label on the System Safety page. A server without pinning ignores the filter and returns everything in both requests, so only entries that actually carry pinned_at go in the pinned section.
The list endpoint reads the cursor from `cursor`, so loading more entries asked for the first page again.
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.
Adds journal entry pinning, matching the backend change that lets entries be pinned.
pinned=true(up to 200) while the paged list usespinned=false, the same split as the web app. Cards and the entry page show a pin marker.journal_unpinaction. The entry shows when the unpin finalizes until then. Otherwise the unpin is immediate.journal_unpinhas a label in pending actions.Against a server without pinning, the
pinnedfilter is ignored and both requests return everything, so only entries withpinned_atset go in the pinned section and the list looks as it did before. The pin button still shows there and errors if tapped, since the app has no server feature detection.Also fixes journal paging: the list endpoint reads
cursor, but the app sentbefore, so loading more fetched the first page again.