feat: improve feature-video skill with GitHub native video upload#344
feat: improve feature-video skill with GitHub native video upload#344
feature-video skill with GitHub native video upload#344Conversation
…eo upload Drop the rclone/R2 external storage dependency and GitHub Release asset fallback in favor of uploading videos directly through GitHub's native attachment system via agent-browser. This produces user-attachments/assets/ URLs that render as inline video players in PR descriptions -- the same result as pasting a video interactively in the GitHub editor. Key changes: - Use agent-browser upload command with Chrome engine to set video files on GitHub's hidden comment form file input - Add session-based auth flow (--engine chrome --session-name github) with one-time headed login for 2FA/SSO/OAuth compatibility - Reorder auth check before auth setup for correct execution flow - Move scratch files to .context/compound-engineering/feature-video/ - Expand description for better auto-triggering - Add cross-platform question tool references - Add troubleshooting table for common failure modes - Add solution docs for native upload pattern and browser auth patterns - Remove all R2, rclone, GIF preview, and release asset logic
feature-video skill with GitHub native video upload
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18161e744b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r record-only mode The skill name is "feature-video" not "PR-video" -- it should be able to record a video of a feature regardless of whether a PR exists yet. Step 1 now detects the missing PR and offers to create a draft PR automatically or proceed in record-only mode (save locally, upload later).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8df8631673
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- P1: Add URL validation guard -- verify extracted URL contains user-attachments/assets/ before editing PR body, with retry logic - P1: Record-only mode now works end-to-end -- Step 2 falls back to git diff/log when no PR exists instead of failing on gh pr view - P2: Respect explicit PR numbers -- only check current branch when no PR number argument was provided - P2: Preserve existing textarea content -- save/restore any draft text in the comment box around the upload operation - P2: Per-run screenshot directories ($RUN_ID) prevent stale frames from prior runs being spliced into new videos
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 721be6339e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- P1: Use double quotes for ffmpeg -i glob so $RUN_ID expands correctly - P2: Move textarea save before upload to capture the user's actual draft, not the post-upload mutated content - P2: Detect default branch via gh repo view instead of hardcoding main, so record-only mode works in repos using master/develop/etc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4ac227cc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- P2: Replace shell $RUN_ID variable with [RUN_ID] placeholder that the agent substitutes with the concrete timestamp value, since shell variables don't persist across separate code blocks - P2: JSON-encode saved textarea content before restoring to handle apostrophes, newlines, and special characters in draft text - P2: Cleanup only removes the current run's directory, not the whole feature-video tree, preserving other in-progress or record-only runs
Verify ffmpeg, agent-browser, and gh are installed in Step 1b before proceeding to recording. Prevents wasting time capturing screenshots only to fail at the encoding step.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 607886e813
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Add upload-only resume mode: pass an .mp4 path as first argument to skip recording and go directly to upload (fixes "no resume path" gap) - Inline DEFAULT_BRANCH into a single shell block so it persists for both git diff and git log in record-only mode - Add plain-chat fallback for the GitHub login prompt per cross-platform compliance checklist
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 199e64905d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Use caller-provided .mp4 path during upload in resume mode instead of hardcoding the RUN_ID path - Fix textarea restore: assign JS string literal directly instead of JSON.parse(), which breaks on multiline content
Only delete screenshots (not the video) when in record-only mode or after upload failure, so the user can still upload the MP4 later.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a347555e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
The feature-video skill previously required external storage (Cloudflare R2 via rclone) to host video files, or fell back to GitHub Release assets. Both approaches had significant problems:
gh release uploadrender as plain download links in PR descriptions, not inline video players. Clickable GIF previews trigger downloads on mobile -- unacceptable UX.Only
user-attachments/assets/URLs (produced by GitHub's native paste/drag-drop upload) render as inline<video>players with controls. There is no public API for this -- GitHub keeps the upload endpoint private (cli/cli#1895, #4228, #4465 all closed "not planned").Solution
Use
agent-browserwith Playwright to programmatically upload videos through GitHub's comment form file input, producing native inline video URLs without any external storage dependency.Changes
agent-browser uploadto set video files on#fc-new_comment_field, extract theuser-attachments/assets/URL from the textarea, clear without submitting--engine chrome --session-name githubwith one-time headed login handles 2FA/SSO/OAuth; cookies persist for weekstmp/to.context/compound-engineering/feature-video/per repo conventiondocs/solutions/integrations/documenting the upload mechanism and browser auth patternsTest plan
user-attachments/assets/URL againsttmchow/test-video-embed