refactor(home): drop the redundant hero note and move the birth-time boundary to the topics

The hero carried three lines saying the same thing: a salutation, a
question, and an Agent greeting that repeated both. Removing the third
line would also have removed the only place where accounts without a
usable birth minute are told that unsupported claims will be disclosed,
so that sentence moves to the topic section subheading, where the reader
is about to pick a question.

The starter loading copy claimed three starting points while the page
renders every domain in the registry, only three of which the Agent
writes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-18 15:44:19 +08:00
co-authored by Cursor
parent 2605f34a6c
commit fc811d2c39
5 changed files with 38 additions and 26 deletions
@@ -59,17 +59,19 @@ test("the starter hero splits one time-aware greeting instead of drawing from a
assert.ok(questions.size >= 12);
});
test("the starter hero shows the Agent greeting rather than discarding it", () => {
test("the starter hero stays at a salutation and a question", () => {
const source = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8");
// Given: the hero heading is the question half of the time-aware greeting.
assert.match(source, /<p className="starter-greeting">\{starterGreeting\.salutation\}<\/p>/);
assert.match(source, /<h1 id="starter-heading">\{starterGreeting\.question\}<\/h1>/);
// Then: the served onboarding greeting reaches the hero note and is never overwritten locally.
assert.match(source, /starter-hero-note">\{onboarding\?\.greeting/);
assert.doesNotMatch(source, /greeting: createStartGreeting\(/);
// Then: no third line repeats the welcome the two lines above already carry.
assert.doesNotMatch(source, /starter-hero-note/);
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
assert.doesNotMatch(styles, /starter-hero-note/);
// And: the separate static heading pool is gone for good.
assert.doesNotMatch(source, /starterPrompt|createStarterPrompt|greetingForHour/);
assert.doesNotMatch(source, /greeting: createStartGreeting\(/);
});
+7 -1
View File
@@ -98,7 +98,13 @@ test("profiles without a usable birth minute receive user-centered starter promp
assert.ok(generalGuidedJyotishTopics.every((topic) => /我/.test(topic.prompt)));
assert.ok(generalGuidedJyotishTopics.every((topic) => !/印度占星|一般如何|通常|哪些因素|证据层/.test(topic.prompt)));
assert.match(pageSource, /const starterThemes = personalChartAvailable \? themes : generalGuidedJyotishTopics/);
assert.match(pageSource, /出生时间不足以支持的部分,我会明确说明,不会补造具体分钟/);
// The birth-time boundary is disclosed next to the topics the reader is about to pick from.
const themeSectionHeading = sourceBetween(
pageSource,
'id="starter-themes-heading"',
"starter-theme-accordion");
assert.match(themeSectionHeading, /personalChartAvailable/);
assert.match(themeSectionHeading, /出生时间不足以支持的部分,我会明确说明,不会补造具体分钟/);
assert.match(pageSource, /请帮我看一下今天的运势,重点告诉我适合推进什么、需要注意什么/);
assert.match(pageSource, /personalChartAvailable \? "daily_starlanguage" : null/);
});