From 6f6af0cf2c8a7c15110f5ef3d8ee58db214f5f8f Mon Sep 17 00:00:00 2001 From: xarmian Date: Sat, 10 Oct 2026 09:15:51 -0400 Subject: [PATCH] fix(oauth): the consent screen names Pad, the instance, the user's workspaces and the return host (TASK-1071) (#2017) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(oauth): the consent screen names Pad, the instance, the user's workspaces and the return host (TASK-1071) The consent screen is the trust anchor the RFC 8707 relaxation leans on. It had lost its 'your Pad workspaces' identification, the default 'All my workspaces' choice showed no workspace names, and the app's self-chosen name was unbounded and unlabelled. - 'Pad · ' above the heading; the card reads ' is requesting access to your Pad workspaces on '. - The app's name is labelled unverified, with the redirect host the browser returns to. - The first five workspace names (and N more) under 'All my workspaces'. - Client names capped at 80 runes, whitespace collapsed, long tokens wrap. - Tests pin the identification, the membership-only list, and the four name/logo edge cases. * fix(oauth): name a custom-scheme return with its scheme (TASK-1071, codex) --- internal/server/handlers_oauth.go | 132 ++++++++- .../server/task1071_consent_identity_test.go | 252 ++++++++++++++++++ 2 files changed, 375 insertions(+), 9 deletions(-) create mode 100644 internal/server/task1071_consent_identity_test.go diff --git a/internal/server/handlers_oauth.go b/internal/server/handlers_oauth.go index 2e4e2d14e..80f9e959f 100644 --- a/internal/server/handlers_oauth.go +++ b/internal/server/handlers_oauth.go @@ -1602,7 +1602,17 @@ body { background: #2a2a2a; color: #e8e8e8; border-color: #555; } } -h1 { font-size: 1.5em; margin: 0 0 .25em; } +h1 { font-size: 1.5em; margin: 0 0 .25em; overflow-wrap: anywhere; } +.resource-brand { + margin: 0 0 .75em; font-size: 1.05em; color: #444; + overflow-wrap: anywhere; +} +.resource-brand strong { font-size: 1.15em; color: #1a1a1a; } +@media (prefers-color-scheme: dark) { + .resource-brand { color: #bbb; } + .resource-brand strong { color: #fff; } +} +.client-card .meta { min-width: 0; overflow-wrap: anywhere; } .client-card { display: flex; align-items: center; gap: 1em; margin: 1.5em 0; padding: 1em; border: 1px solid #ddd; border-radius: 10px; background: #fafafa; @@ -1656,6 +1666,11 @@ input[type=text], input[type=search] { .picker { background: #1c1c1c; } } .hint { color: #555; font-size: .9em; margin: .75em 0; } +.ws-summary { + margin: .1em 0 .5em 1.9em; color: #555; font-size: .9em; + overflow-wrap: anywhere; +} +@media (prefers-color-scheme: dark) { .ws-summary { color: #aaa; } } .footer-disclosure { margin: 1.5em 0; padding: .85em 1em; background: #f5f5f5; border-radius: 8px; color: #555; font-size: .9em; @@ -1690,6 +1705,7 @@ button.primary:hover:not(:disabled) { background: #1e54d4; } +

Pad · {{.ResourceHost}}

Authorize {{.ClientName}}

{{if .Surface}}

Connecting Pad's {{.Surface}} tools.

{{end}}

Signed in as {{.Username}}{{if .UserEmail}} ({{.UserEmail}}){{end}}.

@@ -1698,7 +1714,8 @@ button.primary:hover:not(:disabled) { background: #1e54d4; } {{if .ClientLogoURL}}{{end}}
{{.ClientName}} - wants to access your Pad on your behalf. + is requesting access to your Pad workspaces on {{.ResourceHost}}. + The app chose this name; Pad has not verified it.{{if .RedirectHost}} After you decide, you return to {{.RedirectHost}}.{{end}}
@@ -1748,6 +1765,9 @@ button.primary:hover:not(:disabled) { background: #1e54d4; } All my workspaces— includes workspaces you join or create later. + {{if .WorkspaceSummary}} +

Your Pad workspaces now: {{range $i, $n := .WorkspaceSummary}}{{if $i}}, {{end}}{{$n}}{{end}}{{if .WorkspaceMore}} and {{.WorkspaceMore}} more{{end}}.

+ {{end}} {{if .Workspaces}}