Skip to content

feat: capture X posts as snapshots from the Chrome extension - #1236

Closed
ocavue wants to merge 3 commits into
masterfrom
codex/x-capture-snapshots
Closed

ocavue wants to merge 3 commits into
masterfrom
codex/x-capture-snapshots

Conversation

@ocavue

@ocavue ocavue commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

X post captures currently go through generic page metadata, and bookmark/like actions are not captured. This adds manual post snapshots and opt-in automatic capture through the existing extension queue and native inbox.

Manual saves create independent notes with their own annotation, selection and screenshot. Automatic bookmark/like captures keep the first snapshot for each post and capture day. Repeated deliveries finish the original save without rewriting completed notes or merging annotations.

  • Render Markdown in one direction from temporary structured input. Preserve user edits, private/custom frontmatter and local images; remove the input when enrichment completes.
  • Fetch post metadata and up to four image/video previews behind capture/Daily privacy and editor ownership checks. Keep raw snapshots useful offline and distinguish remote-content failures from disk failures.
  • Use a v2 envelope so old hosts cannot silently discard post data. Hold unsupported X captures for an upgrade while ordinary v1 captures continue.
  • Add optional site permissions, a small content script, settings and open-tab injection/cleanup. Automatic capture is off by default and marked experimental.
  • Add Plan 25 at docs/plans/25-x-capture.md, update privacy disclosures, and cover replay, ownership, transport compatibility and DOM behavior.

Validation: pnpm check, desktop Vite build and extension WXT production build passed. Targeted tests passed: 218 core/extension tests, 3 Chromium DOM tests and 23 native-host tests. Four temporary mutations each failed the intended behavior assertion: replacing no-clobber creation, removing ownership/privacy gates, swallowing asset-write errors, and reversing complete-text preference. Source was restored and the targeted suite passed again.

The built X script is 9.39 kB and contains the DOM adapter, capture builder and WXT lifecycle runtime, without Zod or Defuddle. The generated manifest adds optional X/Twitter host permissions and no permanent host permissions. Final CI passed on 744f7e7b: lint/typecheck/build, all six Chromium/WebKit shards, Rust fmt/clippy/tests, Apple desktop/iOS bindings, autofix and the all-green gate. CodeRabbit skips automatic review while the PR is a draft.

Draft acceptance remains: authenticated X mouse/keyboard actions, long-post expansion and multiple views, plus permission removal and extension updates with already-open tabs. Public logged-out article/ARIA markup was inspected, but reduced DOM fixtures do not prove these authenticated browser behaviors. The existing 50-item queue limit and filesystem read/check/write concurrency boundary are documented in Plan 25.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@ocavue

ocavue commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

implemented

@ocavue ocavue closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant