-
Notifications
You must be signed in to change notification settings - Fork 0
fix(public): replace residual editorial and submission-prep copy on the four app pages #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a0dcf4f
3f32219
f27567f
94628be
245e197
8504728
69bce84
0d85016
13a651e
a7eb673
84f3d53
b940e00
9c5bb0a
4980660
c9d06f0
ef7735e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| import { readFileSync } from "node:fs" | ||
| import { fileURLToPath } from "node:url" | ||
| import { dirname, join } from "node:path" | ||
|
|
||
| const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..") | ||
| const read = (p) => readFileSync(join(ROOT, p), "utf8") | ||
|
|
||
| let failures = 0 | ||
| let checks = 0 | ||
| const ok = (cond, msg) => { | ||
| checks++ | ||
| if (cond) console.log(` ok ${msg}`) | ||
| else { | ||
| failures++ | ||
| console.error(` FAIL ${msg}`) | ||
| } | ||
| } | ||
|
|
||
| // The four public app pages (Promptly and Drishti product + privacy pages). | ||
| // PR #28 cleaned the product and support pages and this change cleans the | ||
| // residual product-page eyebrows and the app privacy pages; kept as an | ||
| // explicit list so a new app page with the old editorial voice fails CI | ||
| // instead of being silently missed. | ||
| const APP_PAGES = [ | ||
| "public/drishti/index.html", | ||
| "public/drishti/privacy/index.html", | ||
| "public/promptly/index.html", | ||
| "public/promptly/privacy/index.html" | ||
|
Comment on lines
+24
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When another app product or privacy page is added, this hard-coded array never discovers it, so that page can contain every forbidden editorial fragment while both Useful? React with 👍 / 👎. |
||
| ] | ||
|
|
||
| // The old copy spoke to Tiny Studio's own team or Apple's reviewer instead of | ||
| // visitors: H1s on the launch calendar ("already in place before launch", | ||
| // "already public ahead of release"), leads about the "current planned launch | ||
| // scope" and "final App Store privacy disclosures", a "Current release scope" | ||
| // aside ("not publicly released yet"), "At launch" cards, editor-facing | ||
| // "Where to go next" eyebrows, and notes that the page and App Store privacy | ||
| // answers should be updated before the next submission. Any of these | ||
| // fragments anywhere on an app page means the visitor-facing rewrite has | ||
| // regressed. | ||
| const EDITORIAL_FRAGMENTS = [ | ||
| "Where to go next", | ||
| "already", | ||
| "launch", | ||
| "planned", | ||
|
Comment on lines
+42
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because the test applies Useful? React with 👍 / 👎. |
||
| "not publicly released", | ||
| "App Store", | ||
| "submission", | ||
| "in the meantime", | ||
| "current build", | ||
| "should stay aligned", | ||
| "should be updated before", | ||
| "before that version is submitted", | ||
| "Current release scope" | ||
| ] | ||
|
|
||
| // The replacement copy names the actual app and keeps the public support | ||
| // route. Each page must keep both so an over-aggressive rewrite that deletes | ||
| // product identity or the support path fails CI. | ||
| const PAGE_REQUIREMENTS = { | ||
| "public/drishti/index.html": ["Drishti", "support@tinystudio.in"], | ||
| "public/drishti/privacy/index.html": ["Drishti", "support@tinystudio.in"], | ||
| "public/promptly/index.html": ["Promptly", "support@tinystudio.in"], | ||
| "public/promptly/privacy/index.html": ["Promptly", "support@tinystudio.in"] | ||
| } | ||
|
Comment on lines
+59
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Validate the app-specific support routes.
🤖 Prompt for AI Agents |
||
|
|
||
| console.log("test-public-app-copy-voice: the four public app pages carry only visitor-facing copy") | ||
|
|
||
| console.log("A. every app page keeps visitor-facing product and support copy") | ||
| for (const page of APP_PAGES) { | ||
| const html = read(page) | ||
| for (const fragment of PAGE_REQUIREMENTS[page]) { | ||
| ok(html.includes(fragment), `${page} names ${fragment}`) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because this searches the entire HTML document, the shared metadata and footer already contain each expected app name; even deleting all Drishti- or Promptly-specific visitor-facing content from Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
|
|
||
| console.log("B. no app page carries editorial or submission-prep phrasing") | ||
| for (const page of APP_PAGES) { | ||
| const html = read(page) | ||
| for (const fragment of EDITORIAL_FRAGMENTS) { | ||
| ok(!html.includes(fragment), `${page} avoids "${fragment}"`) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because Useful? React with 👍 / 👎.
Comment on lines
+78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because this applies Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
|
|
||
| console.log("C. npm test/ci wiring") | ||
| const pkg = JSON.parse(read("package.json")) | ||
| ok( | ||
| pkg.scripts.test.includes("test-public-app-copy-voice.mjs"), | ||
| "npm test runs the public app copy voice test" | ||
| ) | ||
| ok( | ||
| pkg.scripts.ci.includes("test-public-app-copy-voice.mjs"), | ||
| "npm run ci runs the public app copy voice test" | ||
| ) | ||
|
|
||
| console.log(`\n${checks} checks, ${failures} failures`) | ||
| process.exit(failures === 0 ? 0 : 1) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes an intended safeguard (
should not receive) into a categorical statement about current data handling, while the page still says the policy became effective on March 14, 2026; the Drishti page likewise gains new current-state claims without changing its date. When this August revision is published, users cannot tell when these materially different disclosures took effect, so update the displayed effective date (or add a revision date) on both privacy pages.Useful? React with 👍 / 👎.