fix(chat): honor new-chat intent from secondary pages
Independent Staging Quality Gate / validate (push) Successful in 13m41s
Independent Staging Quality Gate / publish (push) Successful in 3m30s

Create a fresh local consultation for explicit new-chat navigation and keep reserved recovery from taking over its landing. Add regression tests and record validation gaps for remote review.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
jesse-ux
2026-09-24 00:25:28 +08:00
co-authored by Claude Code
parent 1c95eb3979
commit 8902e48468
17 changed files with 368 additions and 6 deletions
+11
View File
@@ -456,6 +456,17 @@ one skeleton, none of them carrying the sidebar.
`/?c=<uuid>`; the footer is a link to `/`. Renaming, pinning, archiving and
deleting stay on `/`, backed by `Home()`'s optimistic-update and rollback
layer, which is far more than these four routes need.
- **New chat is not a home link.** The read-only 新建对话 action links to
`/?new=1`; Home consumes that intent before activation and opens a fresh local
consultation. It clears `new`, any `c`, and the login-return stub. Before the
first question there is no saved session, no `?c=`, and no new history row.
The first question uses the existing persistence flow. A reserved older
consultation keeps recovering in the background without taking over this
explicit new-chat landing or leaving its startup recovery notice there.
The account footer
still links to `/`, and a bare-home refresh keeps its existing landing rule.
The same action and mobile drawer-close behavior are retained; no extra
button, copy, loading state, or visual treatment is introduced.
- **Leaving the chat is a navigation, not a reload.** 星盘 / 星历 / 我的报告 are
`AppLink` on every page, including `/`, where they used to be a full document
load that threw away the React tree, the session list and the account. Only