Skip to content

Don't use hybrid, if it is not available - #203

Open
msirringhaus wants to merge 9 commits into
linux-credentials:mainfrom
msirringhaus:filter_available_transports
Open

Don't use hybrid, if it is not available#203
msirringhaus wants to merge 9 commits into
linux-credentials:mainfrom
msirringhaus:filter_available_transports

Conversation

@msirringhaus

Copy link
Copy Markdown
Collaborator

Based on #135, because there I extended the blp-file quite a bit, and here I wanted to reformat it again, as there were some issues with closing brackets and wrong/misleading indentations.
Only the last commit right now is relevant. Will be rebased, once the other PR lands.

Using update_devices() to filter out hybrid from the UI, if it is not available, and also filter it out in get_available_public_key_devices() and start_discovery() (where it seems to me, we do sort of the same thing twice, but I haven't touched that yet).

Copilot AI 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.

Pull request overview

This PR extends the credentialsd ↔ UI D-Bus protocol to support “PIN not set” remediation (setting a new device PIN), and updates the GTK UI to hide Hybrid transport when it isn’t available, along with a substantial Blueprint UI reformat.

Changes:

  • Add a new PinNotSet background event + D-Bus method/signal pair to support “set device PIN” flows.
  • Update USB/NFC credential services to surface PinNotSet with a structured reason, and accept a newly provided PIN.
  • Update GTK UI + Blueprint to conditionally show Hybrid transport, and add a “Set PIN on device” UI flow.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
credentialsd/src/dbus/ui_control.rs Adds D-Bus surface for notify_pin_not_set and set_device_pin event wiring.
credentialsd/src/dbus/flow_control.rs Routes SetDevicePin UI events to the device state channels.
credentialsd/src/credential_service/usb.rs Adds USB PinNotSet state/reason propagation and PIN setup handling.
credentialsd/src/credential_service/nfc.rs Adds NFC PinNotSet state/reason propagation and PIN setup handling.
credentialsd/src/credential_service/mod.rs Filters transports for discovery and hides Hybrid when unavailable.
credentialsd-ui/src/gui/view_model/mod.rs Adds view event + update handling for setting a new device PIN.
credentialsd-ui/src/gui/view_model/gtk/window.rs Adds callbacks and stack navigation for the new PIN-setting UI.
credentialsd-ui/src/gui/view_model/gtk/mod.rs Adds view-model properties to drive Hybrid visibility and PIN-setting UI states.
credentialsd-ui/src/gui/mod.rs Introduces ViewUpdate::PinNotSet.
credentialsd-ui/src/dbus.rs Adds UI-side D-Bus handler for notify_pin_not_set and emits set_device_pin.
credentialsd-ui/src/client.rs Adds FlowControlClient::set_device_pin with length guarding and memfd transport.
credentialsd-ui/po/de_DE.po Minor translation file formatting change.
credentialsd-ui/data/resources/ui/window.blp Reformat + adds Hybrid-visibility gating and new “set PIN” pages/buttons.
credentialsd-common/src/model.rs Adds shared PinNotSetError, NotifyPinNotSetOptions, and SetDevicePin event types.
Suppressed comments (2)

credentialsd/src/dbus/flow_control.rs:243

  • This log message is in the SetDevicePin path but still says “client PIN”, which is misleading (this is the new device PIN being set).
                            tracing::error!("Failed to send client PIN to device");

credentialsd/src/dbus/flow_control.rs:248

  • The “Invalid state” message in the SetDevicePin path still refers to “client PIN”, which makes diagnosing the set-PIN flow harder.
                        tracing::error!(
                            "Invalid state: received a client PIN with no pending request."
                        );

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread credentialsd/src/credential_service/mod.rs Outdated
Comment thread credentialsd-ui/src/gui/view_model/gtk/window.rs
Comment thread credentialsd-ui/src/gui/view_model/gtk/mod.rs
Comment thread credentialsd/src/dbus/flow_control.rs
Comment thread credentialsd/src/credential_service/usb.rs
@msirringhaus
msirringhaus requested a review from iinuwa August 11, 2026 09:11
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.

2 participants