From 1203e5e56e2fdf5a8d1f08f73445a53670877f3a Mon Sep 17 00:00:00 2001 From: John Fawcett Date: Fri, 10 Apr 2026 15:20:55 +0000 Subject: [PATCH 1/2] feat(gastown): add town ID copy badge and Debug settings section --- .../[townId]/TownOverviewPageClient.tsx | 12 +++ .../settings/TownSettingsPageClient.tsx | 99 ++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/(app)/gastown/[townId]/TownOverviewPageClient.tsx b/apps/web/src/app/(app)/gastown/[townId]/TownOverviewPageClient.tsx index c52983951e..67a2b76882 100644 --- a/apps/web/src/app/(app)/gastown/[townId]/TownOverviewPageClient.tsx +++ b/apps/web/src/app/(app)/gastown/[townId]/TownOverviewPageClient.tsx @@ -29,6 +29,7 @@ import { ChevronDown, Layers, MessageSquare, + Copy, } from 'lucide-react'; import { toast } from 'sonner'; import { formatDistanceToNow } from 'date-fns'; @@ -228,6 +229,17 @@ export function TownOverviewPageClient({ Live + + + + {/* ── Danger Zone ──────────────────────────────────────── */}
From 3c1e347950eaddb3fded5e465f94de7b78688259 Mon Sep 17 00:00:00 2001 From: John Fawcett Date: Fri, 10 Apr 2026 15:27:21 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(gastown):=20sanitize=20debug=20payload?= =?UTF-8?q?=20=E2=80=94=20strip=20git=5Furl=20credentials=20and=20replace?= =?UTF-8?q?=20git=5Fauthor=5Fname=20with=20presence=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/TownSettingsPageClient.tsx | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/web/src/app/(app)/gastown/[townId]/settings/TownSettingsPageClient.tsx b/apps/web/src/app/(app)/gastown/[townId]/settings/TownSettingsPageClient.tsx index 144b3fd0c3..c8edb8b53c 100644 --- a/apps/web/src/app/(app)/gastown/[townId]/settings/TownSettingsPageClient.tsx +++ b/apps/web/src/app/(app)/gastown/[townId]/settings/TownSettingsPageClient.tsx @@ -399,12 +399,25 @@ export function TownSettingsPageClient({ townId, readOnly = false, organizationI user_id: currentUser?.id ?? null, organization_id: organizationId ?? cfg?.organization_id ?? null, - rigs: (rigsQuery.data ?? []).map(r => ({ - id: r.id, - name: r.name, - git_url: r.git_url, - default_branch: r.default_branch, - })), + rigs: (rigsQuery.data ?? []).map(r => { + let git_url_sanitized: string | null = null; + if (r.git_url) { + try { + const u = new URL(r.git_url); + u.username = ''; + u.password = ''; + git_url_sanitized = u.toString(); + } catch { + // not a parseable URL — omit entirely to avoid leaking anything + } + } + return { + id: r.id, + name: r.name, + git_url: git_url_sanitized, + default_branch: r.default_branch, + }; + }), settings: cfg ? { @@ -422,8 +435,8 @@ export function TownSettingsPageClient({ townId, readOnly = false, organizationI gitlab_token_set: !!(cfg.git_auth?.gitlab_token), gitlab_instance_url: cfg.git_auth?.gitlab_instance_url || null, github_cli_pat_set: !!(cfg.github_cli_pat), - git_author_name: cfg.git_author_name || null, - // git_author_email intentionally omitted (PII) + git_author_name_set: !!(cfg.git_author_name), + // git_author_name and git_author_email intentionally omitted (PII) disable_ai_coauthor: cfg.disable_ai_coauthor ?? false, env_var_keys: Object.keys(cfg.env_vars ?? {}),