Repository navigation
Feed view for non peer remote profiles - #122
Closed
alphatownsman wants to merge 1912 commits into
Closed
alphatownsman wants to merge 1912 commits into
alphatownsman wants to merge 1912 commits into
Conversation
Currently translated at 14.0% (161 of 1144 strings) Added translation using Weblate (Lombard) Added translation using Weblate (Khmer (Central)) Co-authored-by: Chou Chamnan <chou.chamnan.kh@gmail.com> Co-authored-by: Dennis da Silva Nunes <nunesdennis@me.com> Co-authored-by: E C <weblate.delirium794@passmail.net> Co-authored-by: Hosted Weblate <hosted@weblate.org> Translate-URL: https://hosted.weblate.org/projects/neodb/neodb/pt_BR/ Translation: NeoDB/NeoDB
move tests to folders
Django returns X-Accel-Redirect header for /media/ requests when behind nginx, letting nginx serve files directly from disk with proper Range request support for video/audio streaming. No hardcoded media path in nginx config -- the MEDIA_ROOT is only known to Django.
Django's FileResponse already supports Range requests natively. The issue was nginx proxy_cache not passing Range requests to the upstream. Adding proxy_force_ranges lets nginx serve byte ranges from cached full responses, enabling video/audio seeking without hardcoding paths.
Batch-prefetch pieces and items for recent posts on the profile page instead of querying per-post via Post.piece/Post.item cached properties. Reduces ~32 individual APIdentity/Item queries to 2 batched queries. Fixes EGGPLANT-150
- Use list["Post"] and list[Piece] type hints per review feedback - Fix prefetch to use polymorphic manager for correct type resolution - Add tests for prefetch_pieces_for_posts: correctness, zero post-prefetch queries, and empty list handling
Add an `id:` filter syntax to catalog search so users can search by ISBN, IMDB code, and other well-known identifiers with exact matching. e.g. `id:9780618640157` or `id:tt0068646` Also index IMDB codes in Movie's lookup_id field so they are searchable. Closes #1324
…aders Use ScrapDownloader (with JS rendering support) for IMDB pages instead of BasicDownloader, which fails with HTTP 202 when IMDB returns an AWS WAF challenge. Add IMDBDownloader that waits for __NEXT_DATA__ and validates the response contains the expected script tag. Also add `url: str` type hint to BasicDownloader, ScrapDownloader, ImageDownloaderMixin, DoubanDownloader, and IMDBDownloader __init__ methods, with `assert self.url` narrowing in all scrape methods that pass AbstractSite.url to a downloader.
URLs in comments were hyperlinked in the feed but shown as plain text on item pages and in collections. Add URL linkification to render_text() using the same URL regex pattern used by the feed renderer. Fixes #1350
Remove \(* from _URL_REGEX so that parenthesized URLs like (https://example.com) produce correct links instead of including the leading paren in the href.
- Comments page: batch-prefetch PiecePost, Post, and Post.author for all comments instead of querying per comment (fixes NEODB-SOCIAL-4ES) - Collection view: reorder template condition to short-circuit Edition.get_work() evaluation (fixes NEODB-SOCIAL-4AM) - Collection edit_items: batch-fetch items with prefetch_related on external_resources, matching the pattern in get_members_by_page (fixes NEODB-SOCIAL-4A0) - Podcast RSS scraper: pre-fetch existing episode GUIDs to skip redundant get_or_create calls (fixes NEODB-SOCIAL-4BB)
- Add prefetch_latest_posts() utility that batch-fetches PiecePost relations and Post objects for a collection of Piece instances, injecting them via __dict__ to prevent lazy @cached_property loading - Mark.get_marks_by_items(): call prefetch_latest_posts() on all shelfmembers, comments, and reviews after batch-fetching them, fixing N+1 on tag list, shelf list, and collection view pages - user_collection_list / user_liked_collection_list: materialize queryset and prefetch latest_post for all collections before render
Previously, endpoints like /collection/{uuid}, /review/{uuid} used
auth=None which completely skipped token validation, treating
authenticated users as anonymous. The /item/{uuid}/posts/ endpoint
required auth even for public content.
Add OptionalOAuthAccessTokenAuth that authenticates if a Bearer token
is present but allows anonymous access when none is sent. Apply it to
all public-read endpoints with visibility checks. Update
filter_by_viewer to handle anonymous viewers (APIdentity | None).
Fixes #1308
Submodule (neodb-takahe): - GET /api/v1/mutes: list muted accounts - GET /api/v1/instance/rules: dedicated server rules endpoint - POST /api/v1/statuses/:id/mute and unmute: thread mute stubs - GET /api/v1/notifications/unread_count: unread notification count - POST /api/v1/accounts/:id/note: private notes via AccountNote model - Tests for all new endpoints Main repo: - Add Conversation and ConversationMembership pseudo models - Add conversation FK to Post pseudo model - Call Conversation.update_for_post() in Post.create_local() for DMs - Add migration for conversation pseudo models
When a paginated endpoint returns an error tuple like (403, {...}),
PageNumberPagination.paginate_queryset was treating the tuple as a
2-element list to paginate, causing Pydantic validation to fail with
a 500 instead of returning the proper error response.
Add a guard to pass error tuples through unchanged so Django Ninja's
operation handler can process them correctly.
Fixes NEODB-SOCIAL-49E
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Returning error tuples from @paginate-decorated views causes TypeError because the paginator tries result["data"] on the tuple. Raise Http404/HttpError instead. Fixes NEODB-SOCIAL-4F8.
Same pattern as NEODB-SOCIAL-4F8: returning error tuples from @paginate-decorated views breaks the paginator. Raise Http404 instead in list_notes_for_item and get_mark_logs_by_item.
When a remote user's server is not in the neodb peer list, show their posts as the main profile content instead of the empty shelf layout. The feed auto-loads via HTMX infinite scroll (same pattern as timeline), with no 90-day limit on posts. The sidebar omits "Recent Posts" and "Current Targets" sections for this view.
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.
No description provided.