Skip to content

feat(browser): add upload command and fix producthunt hot#1181

Open
hanzili wants to merge 1 commit intojackwener:mainfrom
hanzili:feat/browser-upload-producthunt-fix
Open

feat(browser): add upload command and fix producthunt hot#1181
hanzili wants to merge 1 commit intojackwener:mainfrom
hanzili:feat/browser-upload-producthunt-fix

Conversation

@hanzili
Copy link
Copy Markdown

@hanzili hanzili commented Apr 25, 2026

Summary

  • Add a generic opencli browser upload <target> <files...> command for setting local files on resolved <input type="file"> elements.
  • Validate file existence, target type, multi-file support, and return structured JSON upload metadata.
  • Fix producthunt hot by removing an unnecessary network-capture wait before DOM scraping.

Why

The extension/page layer already supports file-input uploads, but the CLI did not expose a generic command. This makes media workflows for browser-backed adapters possible without platform-specific upload code.

producthunt hot could fail waiting for network capture even though the command only needs DOM data. A normal page wait is enough and avoids the brittle capture dependency.

Test plan

  • npm run typecheck
  • npm run build
  • OPENCLI_DAEMON_PORT=19999 npm test
  • node dist/src/main.js browser upload 2 /tmp/opencli-linkedin-test/transparent-1x1.png /tmp/opencli-linkedin-test/test-video.mp4
  • node dist/src/main.js producthunt hot --limit 3

Manual validation

  • Verified browser upload on a local file-input fixture.
  • Verified LinkedIn image post flow with the new command using a real JPEG test image in Hanzi's logged-in browser session, after explicit approval for test posts.

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