Fixes from the first round of TEST.md

SEO: a domain property (sc-domain:) covers every subdomain, so the shop,
Gitea and forum were counted as the website. What ranks, the morning
check, the Monday report, keywords, change candidates and the audit's
traffic now read only the website's own host (with or without www).
The report keeps pages worth a proposal apart from "Waiting for your
yes", explains only moves past the thresholds, and says "places up/down".

Also:
- Feed summaries drop the posts' scripts and styles.
- Spend you log can't be negative.
- Test and check buttons can't be clicked twice while they run.
- Previews show the site's web fonts and icon sprites.
- Backups are read without leaving -wal/-shm files; deleting one removes
  them, and leftovers are swept at start.
- The Overview's setup flags a CRM that Hermes can't reach.
- Import now says what came in; adding a prospect that exists says so;
  prospects can be deleted.
- Signal tags and brief addresses keep accented letters (Ü → u).
- Page errors start with a capital; clearer messages for bad uploads,
  CRM retry and cancel, keywords, and the finished audit.
- The module you're in stays unfolded in the sidebar.
- A picked keyword can be unpicked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 06:31:42 -07:00
co-authored by Claude Opus 5.5
parent 3ddf716e71
commit c36f786ae9
52 changed files with 796 additions and 128 deletions
+2 -2
View File
@@ -27,7 +27,7 @@
<span class="help">Supermarket runs in Docker: for a server on this computer use <code>http://host.docker.internal:11434</code>, and use an IP address rather than a <code>.local</code> name.</span></label>
<datalist id="servers">{{range .Servers}}<option value="{{.BaseURL}}">{{.Name}}</option>{{end}}</datalist>
{{if .Servers}}<p class="help">Found by CoreDesktop's <code>configure ai-servers</code>: {{range $i, $s := .Servers}}{{if $i}}, {{end}}{{$s.Name}} ({{$s.BaseURL}}){{end}}.</p>{{end}}
<button type="button" class="secondary" hx-get="/settings/ai/models" hx-include="#base_url" hx-target="#model-list">List its models</button>
<button hx-disabled-elt="this" type="button" class="secondary" hx-get="/settings/ai/models" hx-include="#base_url" hx-target="#model-list" hx-indicator="#listing-models">List its models</button> <span id="listing-models" class="htmx-indicator">Asking the server…</span>
<div id="model-list"></div>
{{range .Keys}}{{if eq .Group "openai"}}{{template "key-field" (dict "F" . "Set" (index $set .Name))}}{{end}}{{end}}
</section>
@@ -55,7 +55,7 @@
<div class="actions">
<button type="submit">Save</button>
<button type="button" class="secondary" hx-post="/settings/ai/test" hx-include="#ai-form" hx-target="#test-result" hx-indicator="#testing">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary" hx-post="/settings/ai/test" hx-include="#ai-form" hx-target="#test-result" hx-indicator="#testing">Test</button>
<span id="testing" class="htmx-indicator">Asking the model…</span>
</div>
<p class="help">Test uses the provider and model in the form, and the keys already saved: save a new key before testing it.</p>
+1 -1
View File
@@ -17,7 +17,7 @@
<h2>Hermes bridge</h2>
<p>Hermes, CoreDesktop's agent, is the only thing that talks to your Core's MCP hub. It reaches Supermarket through the socket <code>{{.MCPSocket}}</code>; other agents, such as Claude Code, use <code>{{.MCPURL}}</code> with the MCP token.</p>
{{with .Last}}
<p class="ok">Hermes last checked in {{ago .At}}{{if .Note}}: “{{.Note}}”{{end}}.</p>
<p class="ok">Hermes last checked in {{ago .At}}.{{if .Note}} It said: “{{.Note}}”{{end}}</p>
{{if .MCPHubTools}}
<details><summary>It can use {{len .MCPHubTools}} tools from the MCP hub</summary>
<ul class="pills">{{range .MCPHubTools}}<li><span class="pill">{{.}}</span></li>{{end}}</ul>
+1 -1
View File
@@ -58,7 +58,7 @@
<h3>Check</h3>
<p class="small">Signs in to both servers and looks up your domain's SPF, DKIM and DMARC records, which decide whether outreach reaches the inbox. Nothing is sent.</p>
<div class="row">
<button type="button" class="secondary small" hx-post="/settings/email/test" hx-target="#email-test" hx-indicator="#testing-email">Check the settings</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/email/test" hx-target="#email-test" hx-indicator="#testing-email">Check the settings</button>
<form method="post" action="/settings/email/send-test" data-busy="Sending…"><button type="submit" class="secondary small">Send a test email to {{or $s.FromAddress "the From address"}}</button></form>
<span id="testing-email" class="htmx-indicator">Checking…</span>
</div>
+2
View File
@@ -58,6 +58,7 @@
{{else}}
<form method="post" action="/prospects/company/{{.ID}}/reconsider"><input type="hidden" name="tab" value="{{$tab}}"><input type="hidden" name="filter" value="{{$d.Signal}}"><button type="submit" class="secondary small">Reconsider</button></form>
{{end}}
<form method="post" action="/prospects/company/{{.ID}}/delete" data-confirm="Delete {{.Name}}{{if .Contacts}} and its people{{end}}? Their steps in the funnel go too, and a CRM action not yet done is taken back. Anything already in EspoCRM stays there."><input type="hidden" name="tab" value="{{$tab}}"><input type="hidden" name="filter" value="{{$d.Signal}}"><button type="submit" class="link small">Delete</button></form>
</div>
{{end}}
</div>
@@ -141,6 +142,7 @@
{{else}}
<form method="post" action="/prospects/contact/{{$p.ID}}/reconsider"><input type="hidden" name="tab" value="{{$tab}}"><input type="hidden" name="filter" value="{{$d.Signal}}"><button type="submit" class="secondary small">Reconsider</button></form>
{{end}}
<form method="post" action="/prospects/contact/{{$p.ID}}/delete" data-confirm="Delete {{$p.Name}}? Their steps in the funnel go too, and a CRM action not yet done is taken back. Anything already in EspoCRM stays there."><input type="hidden" name="tab" value="{{$tab}}"><input type="hidden" name="filter" value="{{$d.Signal}}"><button type="submit" class="link small">Delete</button></form>
</div>
{{end}}
</div>
+1 -1
View File
@@ -46,7 +46,7 @@
<label>Gitea's address <input name="gitea_url" value="{{.GiteaURL}}" placeholder="https://gitea.example.com"></label>
{{template "key-field" (dict "F" .GiteaKey "Set" .GiteaSet)}}
{{if .GiteaSet}}
<button type="button" class="secondary small" hx-post="/settings/search/test/gitea" hx-target="#test-gitea" hx-indicator="#testing-gitea">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/search/test/gitea" hx-target="#test-gitea" hx-indicator="#testing-gitea">Test</button>
<span id="testing-gitea" class="htmx-indicator">Checking…</span>
<div id="test-gitea"></div>
{{end}}
+2 -1
View File
@@ -42,7 +42,8 @@
{{if ne .Status "picked"}}<form method="post" action="/seo/keywords/{{.ID}}/pick"><button type="submit" class="small">Pick this one</button></form>
{{else}}<form method="post" action="/seo/briefs" data-busy="Writing the brief…"><input type="hidden" name="site_url" value="{{.Site}}"><input type="hidden" name="keyword" value="{{.Keyword}}"><button type="submit" class="small">Write the brief</button></form>{{end}}
{{if eq .Status "dismissed"}}<form method="post" action="/seo/keywords/{{.ID}}/restore"><button type="submit" class="secondary small">Bring back</button></form>
{{else}}<form method="post" action="/seo/keywords/{{.ID}}/dismiss"><button type="submit" class="secondary small">Dismiss</button></form>{{end}}
{{else}}{{if eq .Status "picked"}}<form method="post" action="/seo/keywords/{{.ID}}/restore"><button type="submit" class="secondary small">Unpick</button></form>{{end}}
<form method="post" action="/seo/keywords/{{.ID}}/dismiss"><button type="submit" class="secondary small">Dismiss</button></form>{{end}}
</div>
</div>
{{if .Top}}
+7 -2
View File
@@ -33,8 +33,13 @@
<h2>3. Waiting for your yes</h2>
{{range .Waiting}}
<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>
{{else}}<p class="help">Nothing this week.</p>{{end}}
<p class="help">Say yes or no to each on <a href="/seo/changes?site={{$d.Current.Index}}">Changes</a>: a yes opens a pull request.</p>
{{else}}<p class="help">Nothing is waiting: no change has been proposed.</p>{{end}}
{{if .Waiting}}<p class="help">Say yes or no to each on <a href="/seo/changes?site={{$d.Current.Index}}">Changes</a>: a yes opens a pull request.</p>{{end}}
{{with .Candidates}}
<h3>Worth a proposal</h3>
{{range .}}<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>{{end}}
<p class="help"><em>Propose changes</em> on <a href="/seo/changes?site={{$d.Current.Index}}">Changes</a> writes new wording for pages like these.</p>
{{end}}
</section>
{{else}}
<section class="card empty"><p>No report yet. It's written on Monday once there are two weeks of data, or now with <em>Write it now</em>.</p></section>
+2 -2
View File
@@ -12,7 +12,7 @@
<span class="help">If your organization has projects, the ID of the one to read. Leave empty to read the whole organization.</span></label>
{{end}}
{{if .Set}}
<button type="button" class="secondary small" hx-post="/settings/sources/test/{{.ID}}" hx-target="#test-{{.ID}}" hx-indicator="#testing-{{.ID}}">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/sources/test/{{.ID}}" hx-target="#test-{{.ID}}" hx-indicator="#testing-{{.ID}}">Test</button>
<span id="testing-{{.ID}}" class="htmx-indicator">Checking…</span>
<div id="test-{{.ID}}"></div>
{{end}}
@@ -36,7 +36,7 @@
</label>
</fieldset>
{{if .Set}}
<button type="button" class="secondary small" hx-post="/settings/sources/test/hunter" hx-target="#test-hunter" hx-indicator="#testing-hunter">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/sources/test/hunter" hx-target="#test-hunter" hx-indicator="#testing-hunter">Test</button>
<span id="testing-hunter" class="htmx-indicator">Checking…</span>
<div id="test-hunter"></div>
{{end}}
+2 -2
View File
@@ -11,7 +11,7 @@
<p class="help">Sites read: {{if .Sites}}{{range $i, $s := .Sites}}{{if $i}}, {{end}}<code>{{$s}}</code>{{end}}{{else}}none yet: add your websites (and their Plausible site, if it differs from the domain) to the <a href="/settings/profile">profile</a>{{end}}.</p>
{{if .PlausibleSet}}
<div class="row">
<button type="button" class="secondary small" hx-post="/settings/tracking/test/plausible" hx-target="#test-plausible" hx-indicator="#testing-plausible">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/tracking/test/plausible" hx-target="#test-plausible" hx-indicator="#testing-plausible">Test</button>
<button type="submit" class="secondary small" formaction="/settings/tracking/run/plausible" formnovalidate>Import now</button>
<span id="testing-plausible" class="htmx-indicator">Checking…</span>
</div>
@@ -35,7 +35,7 @@ metadata[utm_content] = optional: which message or post</pre>
</details>
{{if .StripeSet}}
<div class="row">
<button type="button" class="secondary small" hx-post="/settings/tracking/test/stripe" hx-target="#test-stripe" hx-indicator="#testing-stripe">Test</button>
<button hx-disabled-elt="this" type="button" class="secondary small" hx-post="/settings/tracking/test/stripe" hx-target="#test-stripe" hx-indicator="#testing-stripe">Test</button>
<button type="submit" class="secondary small" formaction="/settings/tracking/run/stripe" formnovalidate>Sync now</button>
<span id="testing-stripe" class="htmx-indicator">Checking…</span>
</div>