Don't use hybrid, if it is not available - #203
Open
msirringhaus wants to merge 9 commits into
Open
Conversation
…onform to the PIN policy
…ng, because of cancel-request intervening)
There was a problem hiding this comment.
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
PinNotSetbackground event + D-Bus method/signal pair to support “set device PIN” flows. - Update USB/NFC credential services to surface
PinNotSetwith 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
SetDevicePinpath 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
SetDevicePinpath 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inget_available_public_key_devices()andstart_discovery()(where it seems to me, we do sort of the same thing twice, but I haven't touched that yet).