Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
screenshots: add agentic Inquire shots (activity timeline, privacy settings), blur emails on admin shots via a reusable helper, keep the mobile-main drawer closed, and fix the tag language fill for the new dropdown
Murtaza Nasir26849877ad8d
diff --git a/scripts/screenshots/helpers.mjs b/scripts/screenshots/helpers.mjsindex f396305c..eb114a4c 100644--- a/scripts/screenshots/helpers.mjs+++ b/scripts/screenshots/helpers.mjs@@ -159,3 +159,29 @@ export async function clickVisible(page, selector) {}return false;}++/**+ * Blur every visible email address on the page (privacy: documentation+ * screenshots must not leak real addresses/domains). Applies a CSS blur to+ * the deepest elements whose own text contains an email; idempotent.+ */+export async function blurEmails(page) {+ await page.evaluate(() => {+ const emailRe = /[\w.+-]+@[\w-]+\.[\w.]+/;+ const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);+ const seen = new Set();+ let n;+ while ((n = walker.nextNode())) {+ if (!emailRe.test(n.nodeValue)) continue;+ const el = n.parentElement;+ if (!el || seen.has(el)) continue;+ seen.add(el);+ el.style.filter = 'blur(5px)';+ }+ // inputs whose VALUE is an email (account forms)+ document.querySelectorAll('input').forEach((inp) => {+ if (emailRe.test(inp.value)) inp.style.filter = 'blur(5px)';+ });+ });+ await page.waitForTimeout(200);+}diff --git a/scripts/screenshots/shots/inquire.mjs b/scripts/screenshots/shots/inquire.mjsindex 883b70ca..7d4ef417 100644--- a/scripts/screenshots/shots/inquire.mjs+++ b/scripts/screenshots/shots/inquire.mjs@@ -115,6 +115,40 @@ export default [await frameLatestAnswer(page);},},+ {+ name: 'inquire-agent-activity',+ description: 'Agentic Inquire (beta): the agent searches, lists, and reads iteratively - every step is recorded and expandable on the answer',+ theme: { dark: true, scheme: 'teal' },+ run: async (page) => {+ await go(page, '/inquire');+ await askInquire(page, 'Which recordings mention the incognito feature, and what was decided about it?');+ await settle(page, 600);+ // Expand the activity timeline on the latest answer.+ await page.evaluate(() => {+ const lines = [...document.querySelectorAll('.chat-message')]+ .flatMap((m) => [...m.querySelectorAll('span')])+ .filter((el) => /steps? ·/.test(el.textContent));+ const last = lines[lines.length - 1];+ last?.closest('[class]')?.click();+ });+ await page.waitForTimeout(600);+ await frameLatestAnswer(page);+ },+ },+ {+ name: 'inquire-privacy-settings',+ description: 'Per-user Inquire privacy: you decide whether the AI may read your summaries and private notes - transcripts only, if you prefer',+ theme: { dark: false, scheme: 'blue' },+ run: async (page) => {+ await go(page, '/account#prompts');+ await settle(page, 800);+ await page.evaluate(() => {+ const el = [...document.querySelectorAll('span')].find((x) => x.textContent.trim() === 'Inquire Privacy');+ el?.scrollIntoView({ block: 'center' });+ });+ await page.waitForTimeout(400);+ },+ },{name: 'upload-modal',description: 'Uploading a file',diff --git a/scripts/screenshots/shots/mobile.mjs b/scripts/screenshots/shots/mobile.mjsindex 17e62c00..ec23a0b2 100644--- a/scripts/screenshots/shots/mobile.mjs+++ b/scripts/screenshots/shots/mobile.mjs@@ -231,14 +231,9 @@ export default [mobile: true,run: async (page) => {await go(page, '/');- // The list is a drawer over the detail screen, so open a- // recording first: the sliver of screen beside the drawer then- // shows a real note instead of the empty-state placeholder.+ // Open a recording and leave the list drawer CLOSED: the main+ // mobile shot is the detail screen, not the drawer.await openRecording(page, 'Attempting a Michelin Star Dish Challenge');- await openListDrawer(page);- // Park the list on a stretch of real, tagged recordings rather- // than on whatever happens to be newest.- await anchorList(page, 'Manager Introductions at Sihai Meeting');},},{diff --git a/scripts/screenshots/shots/settings-admin.mjs b/scripts/screenshots/shots/settings-admin.mjsindex f540dd9e..24c9136b 100644--- a/scripts/screenshots/shots/settings-admin.mjs+++ b/scripts/screenshots/shots/settings-admin.mjs@@ -4,7 +4,7 @@// each tab a `#content-*` panel with its own `.tab-scroll` scroller) and// /admin (a small Vue app whose tabs are driven by `activeTab`).-import { go, settle, clickVisible, openRecordingByTitle } from '../helpers.mjs';+import { go, settle, clickVisible, openRecordingByTitle, blurEmails } from '../helpers.mjs';/** A recording carrying tags, used for the localized interface shots. */const TAGGED_RECORDING = 'SEC/Data Science Team Updates and Announcements';@@ -147,6 +147,7 @@ export default [theme: { dark: true, scheme: 'blue' },run: async (page) => {await go(page, '/admin', 1500);+ await blurEmails(page);},},{@@ -156,6 +157,7 @@ export default [run: async (page) => {await go(page, '/admin', 1500);await adminTab(page, 'Groups');+ await blurEmails(page);},},{@@ -187,6 +189,7 @@ export default [// margin parks the section heading just above the frame so the// whole per-user budget panel fits.await scrollTabTo(page, 'h4', -60, 'Token Usage Statistics');+ await blurEmails(page);},},{diff --git a/scripts/screenshots/shots/speakers-tags.mjs b/scripts/screenshots/shots/speakers-tags.mjsindex 36be2a9c..a261804f 100644--- a/scripts/screenshots/shots/speakers-tags.mjs+++ b/scripts/screenshots/shots/speakers-tags.mjs@@ -239,7 +239,7 @@ export default [run: async (page) => {await openTagEditor(page, 'Interview', 'tagTabTranscription');// Example values only — the form is never submitted.- await page.fill('#tagLanguage', 'en');+ await page.selectOption('#tagLanguage', 'en'); // language is a dropdown now (#362 round)await page.fill('#tagMinSpeakers', '2');await page.fill('#tagMaxSpeakers', '4');await page.fill('#tagHotwords', 'Speakr, WhisperX, PyAnnote, diarization');