Phase 10, part 6: Settings → Connections, with who connected each

Admins see every service Supermarket uses, whether it's connected,
failing or not set up, when it was last tested (every Test button now
records its result), and who connected or removed it and when. Keys and
sign-ins saved from the settings pages record the person; refreshed
tokens don't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:15:43 -07:00
co-authored by Claude Opus 5.5
parent 2b9d04297f
commit a4dd36f5a4
12 changed files with 364 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
{{define "content"}}{{template "settings-start" .}}
<h2>Connections</h2>
<p class="lede">Every service Supermarket uses: whether it's connected, when it was last tested, and who connected it. Each one is set up, and tested, on its own page.</p>
<section class="card">
<table class="list">
<thead><tr><th>Service</th><th>State</th><th>Last tested</th><th>Connected by</th><th></th></tr></thead>
<tbody>
{{range .Data}}<tr>
<td><strong>{{.Name}}</strong><br><span class="muted small">{{.For}}</span></td>
<td>{{if eq .State "connected"}}<span class="pill ok">Connected</span>{{else if eq .State "failing"}}<span class="pill warn">Failing</span>{{else}}<span class="pill">Not set up</span>{{end}}
{{with .Detail}}<br><span class="muted small">{{truncate 120 .}}</span>{{end}}</td>
<td>{{with .Checked}}{{ago .At}}{{if .Error}} <span class="error-text small">failed</span>{{else}} <span class="muted small">worked</span>{{end}}{{else}}<span class="muted">never</span>{{end}}</td>
<td>{{with .Change}}{{if .Removed}}Removed by {{.By}}{{else}}{{.By}}{{end}}, {{ago .At}}{{else}}<span class="muted">·</span>{{end}}</td>
<td><a href="{{.Link}}">{{if eq .State "missing"}}Set up{{else}}Open{{end}}</a></td>
</tr>{{end}}
</tbody>
</table>
<p class="help">A service is tested with the <em>Test</em> button on its page; its result shows here. A sign-in that has run out shows as failing.</p>
</section>
{{template "settings-end"}}{{end}}
+1
View File
@@ -145,6 +145,7 @@
<div class="nav-label">Company</div>
<a href="/settings/profile" {{if eq .Nav "settings/profile"}}aria-current="page"{{end}}>{{template "icon" "profile"}}Profile</a>
<div class="nav-label">Connections</div>
<a href="/settings/connections" {{if eq .Nav "settings/connections"}}aria-current="page"{{end}}>{{template "icon" "core"}}All connections</a>
<a href="/settings/accounts" {{if eq .Nav "settings/accounts"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Social accounts</a>
<a href="/settings/core" {{if eq .Nav "settings/core"}}aria-current="page"{{end}}>{{template "icon" "core"}}Core &amp; Hermes</a>
<a href="/settings/sources" {{if eq .Nav "settings/sources"}}aria-current="page"{{end}}>{{template "icon" "prospects"}}Lead sources</a>