Skip to content

Fall back to InputCapture v1 CreateSession when version reports 0, fi… - #1

Merged
ctrondlp merged 1 commit into
mainfrom
P2-inputcapture-version-zero
Sep 8, 2026
Merged

ctrondlp merged 1 commit into
mainfrom
P2-inputcapture-version-zero

Conversation

@ctrondlp

@ctrondlp ctrondlp commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

…xing negotiation against xdg-desktop-portal-gnome 50 -- release 0.5.1

Summary by CodeRabbit

  • New Features
    • Added support for input capture sessions on legacy portals using the v1 protocol.
    • Legacy portals now provide a working input event stream when consent is granted.
  • Bug Fixes
    • Fixed compatibility with portals that report InputCapture version 0.
    • Persistence options now clearly report an unsupported-version error on legacy portals.
    • Declined session requests now return an appropriate permission error.
  • Documentation
    • Updated verification records and package references for version 0.5.1.

…xing negotiation against xdg-desktop-portal-gnome 50 -- release 0.5.1
@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b0fa1a75-e0b4-4aa3-8083-a12104f3f7ed

📥 Commits

Reviewing files that changed from the base of the PR and between 77774a3 and 09e9fde.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • docs/developers/verification.md
  • pyproject.toml
  • src/libei/__init__.py
  • src/libei/portal.py
  • tests/test_inputcapture.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The release adds pre-v2 portal support to InputCaptureSession.negotiate() through v1 CreateSession. Persistence options now raise PortalVersionError on legacy portals. Tests, verification records, changelog text, and version references were updated for version 0.5.1.

Changes

Input Capture Compatibility

Layer / File(s) Summary
Legacy portal negotiation and validation
src/libei/portal.py, tests/test_inputcapture.py, CHANGELOG.md
Pre-v2 portals use v1 CreateSession with capabilities. Persistence options are rejected, denied sessions raise PortalDeniedError, and tests cover version 0 and version 1 portals.
Release metadata and verification
pyproject.toml, src/libei/__init__.py, README.md, docs/developers/verification.md
Package references move to version 0.5.1. Verification documentation records live v1 portal testing and the remaining unverified paths.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 09e9f

The legacy portal fallback and release metadata changes are ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant InputCaptureSession
  participant Portal
  participant EIS
  InputCaptureSession->>Portal: Get portal version
  InputCaptureSession->>Portal: CreateSession with capabilities
  Portal-->>InputCaptureSession: Return session handle
  InputCaptureSession->>EIS: ConnectToEIS
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: falling back to InputCapture v1 CreateSession when the reported version is 0. It is specific and directly matches the pull request objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch P2-inputcapture-version-zero

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ctrondlp
ctrondlp merged commit 378f253 into main Sep 8, 2026
8 checks passed
@ctrondlp
ctrondlp deleted the P2-inputcapture-version-zero branch September 10, 2026 17:08

This branch was previously deployed

1 inactive deployment
pypi — 09e9fde0 Deployed Sep 8, 2026 by ctrondlp via publish #24
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