Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

screenshots: blur live share URLs in the share modal, open language-matched demo recordings for the de/zh shots, and show the transcript tab in the main mobile shot

Murtaza Nasir39beb36a8d1f
diff --git a/scripts/screenshots/helpers.mjs b/scripts/screenshots/helpers.mjs
index eb114a4c..e2418135 100644
--- a/scripts/screenshots/helpers.mjs
+++ b/scripts/screenshots/helpers.mjs
@@ -185,3 +185,27 @@ export async function blurEmails(page) {
});
await page.waitForTimeout(200);
}
+
+/**
+ * Blur every visible absolute URL on the page (share links carry the real
+ * deployment domain). Covers text nodes and inputs whose value is a URL.
+ */
+export async function blurUrls(page) {
+ await page.evaluate(() => {
+ const urlRe = /https?:\/\/[^\s"']+/;
+ const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
+ const seen = new Set();
+ let n;
+ while ((n = walker.nextNode())) {
+ if (!urlRe.test(n.nodeValue)) continue;
+ const el = n.parentElement;
+ if (!el || seen.has(el)) continue;
+ seen.add(el);
+ el.style.filter = 'blur(5px)';
+ }
+ document.querySelectorAll('input').forEach((inp) => {
+ if (urlRe.test(inp.value)) inp.style.filter = 'blur(5px)';
+ });
+ });
+ await page.waitForTimeout(200);
+}
diff --git a/scripts/screenshots/shots/mobile.mjs b/scripts/screenshots/shots/mobile.mjs
index ec23a0b2..3b09140a 100644
--- a/scripts/screenshots/shots/mobile.mjs
+++ b/scripts/screenshots/shots/mobile.mjs
@@ -231,9 +231,11 @@ export default [
mobile: true,
run: async (page) => {
await go(page, '/');
- // Open a recording and leave the list drawer CLOSED: the main
- // mobile shot is the detail screen, not the drawer.
+ // The main mobile shot: a recording's transcript view, drawer
+ // closed. (mobile-summary shows the summary tab; the separate
+ // mobile-transcript shot shows BUBBLE view of another recording.)
await openRecording(page, 'Attempting a Michelin Star Dish Challenge');
+ await selectTab(page, 'transcript');
},
},
{
diff --git a/scripts/screenshots/shots/settings-admin.mjs b/scripts/screenshots/shots/settings-admin.mjs
index 24c9136b..a8e63063 100644
--- a/scripts/screenshots/shots/settings-admin.mjs
+++ b/scripts/screenshots/shots/settings-admin.mjs
@@ -209,7 +209,9 @@ export default [
await useLanguage(page, 'de');
await go(page, '/');
await assertLocale(page, 'de');
- await openRecordingByTitle(page, TAGGED_RECORDING);
+ // A German-content demo recording so the title, transcript and
+ // summary match the interface language.
+ await openRecordingByTitle(page, 'Wöchentliches Team-Meeting: Produktplanung');
},
},
{
@@ -220,7 +222,7 @@ export default [
await useLanguage(page, 'zh');
await go(page, '/');
await assertLocale(page, 'zh');
- await openRecordingByTitle(page, TAGGED_RECORDING);
+ await openRecordingByTitle(page, '产品发布计划周会');
},
},
];
diff --git a/scripts/screenshots/shots/speakers-tags.mjs b/scripts/screenshots/shots/speakers-tags.mjs
index a261804f..de1e9d88 100644
--- a/scripts/screenshots/shots/speakers-tags.mjs
+++ b/scripts/screenshots/shots/speakers-tags.mjs
@@ -6,7 +6,7 @@
// (transcription defaults, summary prompt + title template, a real recipe
// prompt, and the group auto-share options).
-import { go, settle, clickVisible, anchorSidebar } from '../helpers.mjs';
+import { go, settle, clickVisible, anchorSidebar, blurEmails, blurUrls } from '../helpers.mjs';
/**
* Recordings are addressed by id via the /recordings/<id> deep link rather
@@ -230,6 +230,9 @@ export default [
}
await page.waitForSelector('.modal-panel:has-text("Share Recording")', { state: 'visible' });
await settle(page, 1200);
+ // Privacy: the modal shows the live share URL and user emails.
+ await blurEmails(page);
+ await blurUrls(page);
},
},
{