Repository navigation
Save social posts one at a time from X, Bluesky and Mastodon - #68
Merged
Merged
Conversation
social_post stored every thread part's text and media next to the readable body that already holds them. It now keeps platform, id, url, author, published, thread root, partial flag and each part's id/url (with its quoted post). Highlights already record their post id from both the extension and Reader, so an unmarked quote resolves only on a single-post source instead of by matching text across thread parts.
- X markup has no reply edges, so threads only unrolled for the fixture's invented attribute. On a conversation page the thread is now the author's contiguous run around the focal post; feeds still never join posts. - Adapters expose entries(), pairing each post with its element in one pass. Feed highlight redraw ran element() per post on every mutation (quadratic) and now makes a single pass with quotes grouped by post. - Images are still embedded (the renderer allows only data: images) but are scaled to 1600px and re-encoded as WebP first, within 1.5 MiB each and 6 MiB per post, down from 5 and 20 MiB. Animated GIFs are kept as is. - The archive now links every original video/audio URL, which previously lived only in frontmatter.
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.
Feeds are never saved as sources. On a timeline, profile or search page, Save opens a picker of the loaded posts, and a selection inside a post saves a highlight against that post. A post saved from a feed, a profile or its permalink is one record.
What changes
packages/web-capture/src/social/) for X, Bluesky and Mastodon run before article extraction. Each decides whether a page is one post or a feed (Zotero's single/multiple pattern) and lists the posts loaded on it. Mastodon is detected by page markers, so any instance works.at://URI with the handle resolved to a DID, Mastodon status URI. URL variants (twitter.com,mobile.,?s=, handles) normalise to one permalink.[data-post-id]), and saved highlights and the page badge are redrawn per post as a feed loads and scrolls.post.social_postfrontmatter keeps identity and thread shape only (platform, id, url, author, published, thread root, partial flag, each part's id/url). Text and media live in the reading copy. Images are embedded (the renderer allows onlydata:images) after scaling to 1600px and re-encoding as WebP: at most 1.5 MiB each and 6 MiB per post; animated GIFs are kept as they are. The archive keeps every original media URL. No type-pack change is needed.Verification
pnpm checkpasses; extension and Reader build.Not yet verified live: the connected save → open in Reader → highlight → reload round trip. LAB's daemon (0.1.0-beta.123) reports
incompatible_versionagainst LAB Connect, so no LAB collection is available. X has only been tested against fixtures; there was no logged-in X browser.