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
-13
View File
@@ -1057,15 +1057,6 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
text-wrap: balance;
}
.starter-hero-note {
max-width: 590px;
margin: var(--space-4) 0 0;
color: var(--color-ink-secondary);
font-size: var(--type-body-sm);
line-height: 1.65;
text-wrap: pretty;
}
.product-entrypoints {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -1431,10 +1422,6 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
padding: var(--space-6) var(--space-5);
}
.starter-hero-note {
margin-top: var(--space-4);
}
.product-entrypoint-footer {
display: grid;
gap: var(--space-4);
+4 -6
View File
@@ -3384,7 +3384,7 @@ export default function Home() {
{profileComplete && presetMessageFinished && !rectificationSurfaceOpen && (onboardingPending ? (
<div className="starter-loading" role="status">
<AppLoadingIndicator title="正在准备问题" detail="根据你的资料整理三个起点。" />
<AppLoadingIndicator title="正在准备问题" detail="根据你的资料整理今天的起点。" />
</div>
) : (
<div className="starter-list starter-workbench" aria-label="Jyotisha 推荐的初始问题">
@@ -3392,10 +3392,6 @@ export default function Home() {
<div className="starter-hero-copy">
<p className="starter-greeting">{starterGreeting.salutation}</p>
<h1 id="starter-heading">{starterGreeting.question}</h1>
<p className="starter-hero-note">{onboarding?.greeting
|| (personalChartAvailable
? "从此刻最在意的事开始,我会结合你的星盘证据,帮你把问题拆得更清楚。"
: "从你现在最关心的事开始;出生时间不足以支持的部分,我会明确说明,不会补造具体分钟。")}</p>
</div>
</section>
@@ -3447,7 +3443,9 @@ export default function Home() {
<section className="starter-themes" aria-labelledby="starter-themes-heading">
<div className="starter-section-heading">
<h2 id="starter-themes-heading"></h2>
<p></p>
<p>{personalChartAvailable
? "选择一个你现在想解决的问题。"
: "选择一个你现在想解决的问题;出生时间不足以支持的部分,我会明确说明,不会补造具体分钟。"}</p>
</div>
<div className="starter-theme-accordion">
{starterSuggestions.map((item) => {
@@ -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/);
});