From 1d7b90f324613ce908fcd24b2dbef8abe9552069 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 14 Nov 2026 02:35:05 +0100 Subject: [PATCH 1/2] Focus the approve code and show new secrets in a popup Approving a proposal (in the panel and on the mail's link page) now focuses the two-factor code, or the password without 2FA, so the admin can type right away. Tokens, agent keys, runner commands and the backup repository password that are shown only once open in their own window with a Copy button instead of a block below the list. A click beside it doesn't close it, only OK or Escape, and closing it forgets the secret. Co-Authored-By: Claude Opus 5.5 --- webui/src/components/CiTokens.svelte | 6 +- webui/src/components/OneTimeSecret.svelte | 55 +++++++++++++++++-- .../components/dialogs/AgentsDialog.svelte | 13 +++-- .../components/dialogs/ApproveDialog.svelte | 2 +- .../components/dialogs/BackupSettings.svelte | 14 ++--- .../components/dialogs/RunnerSettings.svelte | 2 + .../components/dialogs/TokensDialog.svelte | 6 +- webui/src/pages/ProposalLink.svelte | 4 ++ 8 files changed, 83 insertions(+), 19 deletions(-) diff --git a/webui/src/components/CiTokens.svelte b/webui/src/components/CiTokens.svelte index 863eb78..610d6ce 100644 --- a/webui/src/components/CiTokens.svelte +++ b/webui/src/components/CiTokens.svelte @@ -125,7 +125,11 @@ {#if error}

{error}

{/if} {#if newToken} - + (newToken = null)} + /> {/if}
diff --git a/webui/src/components/OneTimeSecret.svelte b/webui/src/components/OneTimeSecret.svelte index 661420d..bcb68bd 100644 --- a/webui/src/components/OneTimeSecret.svelte +++ b/webui/src/components/OneTimeSecret.svelte @@ -1,10 +1,57 @@ -

{label}

-
{value}
+ true} width={520}> +

{label}

+
{value}
+ {#if error}

{error}

{/if} + {@render children?.()} +
+ + +
+
+ + diff --git a/webui/src/components/dialogs/AgentsDialog.svelte b/webui/src/components/dialogs/AgentsDialog.svelte index 4ee863b..e599513 100644 --- a/webui/src/components/dialogs/AgentsDialog.svelte +++ b/webui/src/components/dialogs/AgentsDialog.svelte @@ -224,13 +224,16 @@ {#if testResult}

{testResult}

{/if} {#if key} - {#each examples as e (e.text)} -

{e.text}

-
{e.code}
- {/each} + onclose={() => (key = null)} + > + {#each examples as e (e.text)} +

{e.text}

+
{e.code}
+ {/each} +
{/if}
diff --git a/webui/src/components/dialogs/ApproveDialog.svelte b/webui/src/components/dialogs/ApproveDialog.svelte index a86f073..5a06c29 100644 --- a/webui/src/components/dialogs/ApproveDialog.svelte +++ b/webui/src/components/dialogs/ApproveDialog.svelte @@ -47,7 +47,7 @@ : ''}. Its answer goes to {proposal.from}.

- + diff --git a/webui/src/components/dialogs/BackupSettings.svelte b/webui/src/components/dialogs/BackupSettings.svelte index 4d12f39..9ac2ae6 100644 --- a/webui/src/components/dialogs/BackupSettings.svelte +++ b/webui/src/components/dialogs/BackupSettings.svelte @@ -244,18 +244,18 @@ {/if} {#if generated} -
- Repository Password - + (generated = null)} + >

Keep it outside this server, e.g. in your password manager, with the bucket's key. Without it the remote copy can't be read when the server is lost.

-
+ {/if} {#if saved} diff --git a/webui/src/components/dialogs/RunnerSettings.svelte b/webui/src/components/dialogs/RunnerSettings.svelte index 8a95df1..f14eb10 100644 --- a/webui/src/components/dialogs/RunnerSettings.svelte +++ b/webui/src/components/dialogs/RunnerSettings.svelte @@ -157,8 +157,10 @@ {/if} {#if created} (created = null)} /> {/if} {#if target} diff --git a/webui/src/components/dialogs/TokensDialog.svelte b/webui/src/components/dialogs/TokensDialog.svelte index 31c654d..656612b 100644 --- a/webui/src/components/dialogs/TokensDialog.svelte +++ b/webui/src/components/dialogs/TokensDialog.svelte @@ -113,7 +113,11 @@ {#if error}

{error}

{/if} {#if created} - + (created = null)} + /> {/if}

Download a database:

{example}
diff --git a/webui/src/pages/ProposalLink.svelte b/webui/src/pages/ProposalLink.svelte index 8af9b74..d6de37e 100644 --- a/webui/src/pages/ProposalLink.svelte +++ b/webui/src/pages/ProposalLink.svelte @@ -187,18 +187,22 @@
{#if link.totp} + {:else} + {/if} From eb2d404da4f0c12b513c201091bf1b55c542785f Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 14 Nov 2026 02:38:18 +0100 Subject: [PATCH 2/2] Show the filled-in token example in the token popup The API token popup now holds the curl example with the new token; behind the modal popup it couldn't be copied, and after OK it was gone. Copying goes through a shared copyText helper that gives a readable error where the browser has no clipboard, the popup clears an old error and restarts the Copied flash on every click, and the pre's extra margin before the buttons is gone. Co-Authored-By: Claude Opus 5.5 --- webui/src/components/OneTimeSecret.svelte | 13 +++++++------ .../components/dialogs/PasswordsDialog.svelte | 3 ++- webui/src/components/dialogs/TokensDialog.svelte | 16 ++++++++-------- webui/src/lib/clipboard.ts | 8 ++++++++ 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 webui/src/lib/clipboard.ts diff --git a/webui/src/components/OneTimeSecret.svelte b/webui/src/components/OneTimeSecret.svelte index bcb68bd..f10781c 100644 --- a/webui/src/components/OneTimeSecret.svelte +++ b/webui/src/components/OneTimeSecret.svelte @@ -1,5 +1,6 @@ @@ -117,10 +114,13 @@ title="API Token" value={created} onclose={() => (created = null)} - /> + > +

Download a database:

+
{example(created)}
+ {/if}

Download a database:

-
{example}
+
{example('')}

Deploy tokens are made in a group's Deploy tab, the keys of AI agents in Start → AI Agents. diff --git a/webui/src/lib/clipboard.ts b/webui/src/lib/clipboard.ts new file mode 100644 index 0000000..c75bf4a --- /dev/null +++ b/webui/src/lib/clipboard.ts @@ -0,0 +1,8 @@ +/** copies text, with a readable error where the browser has no clipboard + * (plain http) */ +export async function copyText(text: string): Promise { + if (!navigator.clipboard) + throw new Error('This page may not copy, select it and copy by hand.'); + + await navigator.clipboard.writeText(text); +}