Phase 7 part 4: SEO → What to write next

One list per website of everything worth writing: new wording for pages
(Push pages and the audit's title and description issues), landing
pages for signals that get replies, pages for apps people name in their
replies (their own words, without quoted mail or signatures), and
keywords or briefs that stalled. Ranked by the sign-ups each is expected
to bring, at most 10 shown, each with its reason in numbers and the
button that starts its flow; Not now hides one for 90 days. The SEO
module still opens on the Morning check; the Monday report links here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 07:17:42 -07:00
co-authored by Claude Opus 5.5
parent 855615ae7f
commit 5705a9b58b
10 changed files with 264 additions and 4 deletions
+24 -3
View File
@@ -87,8 +87,14 @@ func SignalsWithoutPages(d *db.DB, now time.Time) ([]Suggestion, error) {
continue
}
id := strconv.FormatInt(r.Signal.ID, 10)
why := fmt.Sprintf("In 90 days, %s and %s, from outreach on this signal, and no landing page to send them to.",
count(replied, "reply", "replies"), count(interested, "interested person", "interested people"))
got := count(replied, "reply", "replies")
switch {
case replied == 0:
got = count(interested, "interested person", "interested people")
case interested > 0:
got += " and " + count(interested, "interested person", "interested people")
}
why := fmt.Sprintf("In 90 days, %s from outreach on this signal, and no landing page to send them to.", got)
out = append(out, Suggestion{
Key: "signal-page:" + id, Kind: "Landing page", Title: r.Signal.Name, Why: why,
Score: perReply * float64(replied+interested),
@@ -225,11 +231,26 @@ func replyTexts(d *db.DB) ([]string, error) {
if _, after, ok := strings.Cut(t, "”: "); ok {
t = after
}
out = append(out, t)
out = append(out, ownWords(t))
}
return out, rows.Err()
}
// quoteStart marks where a reply stops being the person's own words: the
// message they're answering, quoted below, in the usual languages.
var quoteStart = regexp.MustCompile(`(?im)(^\s*>|^\s*-{2,}\s*(original message|ursprüngliche nachricht|message d'origine|ursprungligt meddelande)|(^|\s)(from|från|fra|de|von|van|da|od)\s*:\s|\bon .{3,80} wrote:|\bam .{3,80} schrieb|\ble .{3,80} a écrit)`)
// signature drops "Sent from…" lines a phone or mail app adds.
var signature = regexp.MustCompile(`(?i)\b(sent|skickat|sendt|envoyé|gesendet|enviado|inviato|verzonden|wysłane)\s+(from|från|fra|de|depuis|von|desde|da|met|z)\s+\S+(\s+\S+){0,4}`)
// ownWords is the part of a reply the person wrote.
func ownWords(t string) string {
if loc := quoteStart.FindStringIndex(t); loc != nil {
t = t[:loc[0]]
}
return signature.ReplaceAllString(t, " ")
}
// wellKnown are apps people often name: the ones a business leaves, and
// open-source ones it might run instead.
var wellKnown = []string{
+11
View File
@@ -77,3 +77,14 @@ func TestAppsInReplies(t *testing.T) {
t.Error("hasPage")
}
}
func TestOwnWords(t *testing.T) {
in := "Hej, vi använder Planning Center. Mvh Roland Skickat från Outlook för Android Från: Janae <j@x> Skickat: tisdag We host Nextcloud for you"
got := ownWords(in)
if strings.Contains(got, "Outlook") || strings.Contains(got, "Nextcloud") || !strings.Contains(got, "Planning Center") {
t.Errorf("own words: %q", got)
}
if got := ownWords("Sounds good.\n\nOn Mon, 3 Nov 2026 at 10:00, David <d@x> wrote:\n> We run FreeScout"); strings.Contains(got, "FreeScout") {
t.Errorf("quoted: %q", got)
}
}