fix(chat): honor new-chat intent from secondary pages
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user