Skip to content

feat: add --cli mode to p2pp for headless/CI processing - #108

Merged
markballew merged 10 commits into
masterfrom
feat/issue-107
Aug 28, 2026
Merged

markballew merged 10 commits into
masterfrom
feat/issue-107

Conversation

@markballew

Copy link
Copy Markdown

Closes #107. Adds --cli flag to run p2pp without GUI dependencies. In CLI mode, PyQt and image_rc are not imported, processing runs headless, and results are printed to stdout. Exits with code 0 on success, 1 on failure.

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

- p2pp/headless.py: Qt-free shim with same API as p2pp/gui.py
- P2PP.py: installs shim via sys.modules before any p2pp imports
- All modules that do 'import p2pp.gui as gui' get the shim automatically
- No QApplication, no event loop, no image_rc dependency
- Reverts try/except changes in other files (shim handles it cleanly)
- p2pp_process_file_cli sets cli_mode for mcf.py's helper functions
cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

p3_upload.py imports PyQt5 directly and creates QWidget objects at module
level (uic.loadUiType → Window()). In headless mode these crash because no
QApplication exists. Fix: check P2PP_HEADLESS env var and skip all PyQt5
widget creation. Tested locally — import succeeds without Qt.

Also: P2PP.py sets P2PP_HEADLESS=1 before installing the sys.modules shim.
cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

cursor[bot]
cursor Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Cursor Bugbot and Cursor Security Agent were not running after the first check poll, so those signals were skipped; no approval policies or existing reviews require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@markballew
markballew merged commit db97c8d into master Aug 28, 2026
6 of 7 checks passed
@markballew
markballew deleted the feat/issue-107 branch August 28, 2026 00:09
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.

feat: add --cli mode to p2pp for headless/CI processing

1 participant