feat(terra): Proton Pass picker in the polkit/askpass dialog

A collapsed panel under the dialog lists logins from every vault via
pass-cli, one tab per vault with overflow into a dropdown; picking one
fetches its password into the field. Listing never touches secrets, and
the `darman@<config>` items are `custom`, not `login`, so both types are
listed. Adds a show/hide toggle to the password field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-04 18:49:36 +02:00
co-authored by Claude Opus 5.5
parent 4b366f952e
commit acd08afaad
6 changed files with 962 additions and 163 deletions
@@ -87,9 +87,22 @@ Scope {
// never appears. Leaving it orphaned costs one hung caller; cancelling it
// costs the prompt as well.
onFlowChanged: {
vault.invalidate();
if (root.flow) {
content.clearResponse();
content.focusInput();
// Prefetched so Tab is instant; the list stays from the last
// request while this refreshes.
vault.refresh();
}
}
ProtonPass {
id: vault
onFetched: secret => {
content.response = secret;
content.focusInput();
}
}
@@ -194,7 +207,7 @@ Scope {
// line appears. Floored at the same margin the width leaves, so a
// tall prompt on a short output cannot be pushed off the top.
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(32, Math.round(parent.height / 3 - height / 2))
y: Math.max(32, Math.round(parent.height / 3 - content.dialogHeight / 2))
width: 520
message: root.flow ? root.flow.message : ""
@@ -209,6 +222,17 @@ Scope {
supplementaryIsError: root.flow ? root.flow.supplementaryIsError : false
failed: root.flow ? root.flow.failed : false
credentialsEnabled: true
credentials: vault.entries
credentialsStatus: vault.listStatus
fetchStatus: vault.fetchStatus
onCredentialRequested: entry => vault.fetch(entry)
onPickerOpened: {
if (vault.entries.length === 0)
vault.refresh();
}
onSubmitted: value => {
if (root.flow)
root.flow.submit(value);
@@ -235,8 +259,10 @@ Scope {
enabled: root.flow !== null
function onFailedChanged() {
if (root.flow.failed)
if (root.flow.failed) {
vault.invalidate();
content.clearResponse();
}
}
// Re-focus when the conversation asks for something. This is load