From 7b8644984d9b3009b28a4e7ae2f3a3a1b6cdc060 Mon Sep 17 00:00:00 2001 From: Mikko Numminen Date: Wed, 29 Jul 2026 01:41:23 +0300 Subject: [PATCH] fix(web): brand the page titles and give shared links a preview The tab said "Feedback situation". It is the name in a browser tab and in a shared link preview, and it named neither the product nor whose it is. A recruiter with five tabs open has no way to tell which one this was. Titles now lead with the product: index Feedback situation -> Feedback Intelligence - Mikko Numminen desk Feedback - desk entry -> Desk entry - Feedback Intelligence snapshot Feedback situation ... -> Saved snapshot - Feedback Intelligence Both locales, and both the static and the runtime pageTitle the page sets on load. The h1 keeps its functional wording: inside the app, "Palautetilanne" is what the heading is describing, and that is a different job from identifying the tab. The larger gap was that there was no link preview at all. Neither page carried og:title, og:description, twitter:card or even a description meta; the head was charset, viewport and title. A crawler never runs the script that sets document.title, so the static markup was all it ever saw. Both pages now carry description, canonical, Open Graph and Twitter card tags. Saved snapshots get the same treatment and needed it most, being the artefact most likely to be pasted into a chat or an email. Canonicals point at mikkonumminen.dev/feedback and /feedback/desk rather than the azurestaticapps.net host, so the shared identity is the owned domain. The /feedback/desk route is added in the mikkonumminen.dev repo and both should land together. No og:image anywhere: there is no asset to point at, and a broken image previews worse than none. twitter:card is summary rather than summary_large_image for the same reason. dotnet build clean, 274 tests pass. --- .../Analysis/ReportText.cs | 4 ++-- .../Analysis/SnapshotHtml.cs | 10 ++++++++++ src/FeedbackIntelligence.Api/wwwroot/desk.html | 17 ++++++++++++++--- src/FeedbackIntelligence.Api/wwwroot/index.html | 17 ++++++++++++++--- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/FeedbackIntelligence.Api/Analysis/ReportText.cs b/src/FeedbackIntelligence.Api/Analysis/ReportText.cs index 757370d..38c47ec 100644 --- a/src/FeedbackIntelligence.Api/Analysis/ReportText.cs +++ b/src/FeedbackIntelligence.Api/Analysis/ReportText.cs @@ -83,7 +83,7 @@ public sealed record SnapshotLabels( string ModerationHeading); private static readonly SnapshotLabels SnapFi = new( - "fi", "Palautetilanne — tallennettu tilannekuva", "Tallennettu tilannekuva", "Palautetilanne", + "fi", "Tallennettu tilannekuva — Feedback Intelligence", "Tallennettu tilannekuva", "Palautetilanne", "Aikaväli", "palautetta", "koostettu", "Hälytykset", "Ei hälytyksiä aikavälillä.", "sanahaku", "kielimalli", "Teemat ja trendit", "palautetta", "suunta", @@ -91,7 +91,7 @@ public sealed record SnapshotLabels( "Moderoitava sisältö"); private static readonly SnapshotLabels SnapEn = new( - "en", "Feedback situation — saved snapshot", "Saved snapshot", "Feedback situation", + "en", "Saved snapshot — Feedback Intelligence", "Saved snapshot", "Feedback situation", "Window", "items", "generated", "Alerts", "No alerts in the window.", "keyword", "model", "Themes & trends", "items", "trend", diff --git a/src/FeedbackIntelligence.Api/Analysis/SnapshotHtml.cs b/src/FeedbackIntelligence.Api/Analysis/SnapshotHtml.cs index 1a29a60..ba435ac 100644 --- a/src/FeedbackIntelligence.Api/Analysis/SnapshotHtml.cs +++ b/src/FeedbackIntelligence.Api/Analysis/SnapshotHtml.cs @@ -21,6 +21,16 @@ public static string Render( sb.AppendLine($"<!DOCTYPE html><html lang=\"{t.HtmlLang}\"><head><meta charset=\"utf-8\">"); sb.AppendLine("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"); sb.AppendLine($"<title>{E(t.PageTitle)}"); + // A saved snapshot is the artefact most likely to be pasted into a chat + // or an email, so it needs the same link preview the live pages have. + // No og:image: there is no asset to point at, and a broken one previews + // worse than none. + sb.AppendLine($""); + sb.AppendLine(""); + sb.AppendLine(""); + sb.AppendLine($""); + sb.AppendLine($""); + sb.AppendLine(""); sb.AppendLine("