fix(home): one new-chat intent and a scoped login-return stash (BUG-1038)
Coming back to / from /people could show the previous rectification session
as a locked page: its title in the header, the composer stuck on
"正在打开生时校正…", and the new-chat greeting in the middle.
The state that survived between pages is the sessionStorage login-return
stash that secondary-page sidebar links write from the current ?c=:
- /people「和 TA 对话」used a second intent (?newChat=1) parsed by a
component mounted inside Home after bootstrap, so the bootstrap new-chat
branch never ran and the stash won.
- A stash id not in the current person's loaded list was looked up and
landed with urlAction "keep", which assumes ?c= is already in the address
bar. It was not, so the rectification auto-open never fired. The stash
also ignored which person was current.
- An in-page new chat left the stash in place.
Fix: delete NewChatDeepLink / ?newChat and route「和 TA 对话」through
newChatHref(); a looked-up stash writes ?c= back (replace-selected) and is
dropped when it belongs to another person; startNewChat and
openChatBoundToProfile clear the stash. ?c= deep links, BUG-989 and BUG-705
are unchanged.
Tests: new real-lifecycle suite mounting the real Home, sidebar and people
page (10 cases: four secondary pages + mobile drawer, 和 TA 对话 for self and
another person, out-of-scope stash, same-person stash beyond the first page,
in-page new chat), plus two contract/unit tests. Six fail on origin/staging,
all pass here. Full suite 3928 / 61 failing, failure names identical to the
0ab061b9 baseline (3916 / 61).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f4b8f26e15
commit
0a8350cc01
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -28,3 +28,20 @@
|
||||
- 刚注册、没有历史的受控账号进入新建入口仍只有一个可见空会话,首问前不写数据库、不显示空列表行。启动内部已有的空列表兜底与本单新建分支可能分别产生本地空对象;两者都必须隐藏且不持久化。
|
||||
- 普通刷新 `/` 不承诺“始终空白”,本单不更改默认落点规则。
|
||||
- 需要模型凭据才能完成步骤 2 的真实回复;若不可用,只记录创建链的实际证据,将回复部分标环境缺口,不伪写通过。
|
||||
|
||||
## 追加:先开一条生时校正再从档案页回首页(BUG-1038,2026-09-26)
|
||||
|
||||
关联:`TASK-new-chat-from-people-20260926.md`、`PROGRESS-new-chat-from-people-20260926.md`。本节尚未执行;本机只用虚构数据在本地 `next start` 上验过,截图见 `new-chat-from-people-20260926-before.png`(修复前)、`-after.png`、`-after-talk.png`(修复后)。
|
||||
|
||||
前置:受控测试账号至少有一条生时校正会话、一条普通咨询,星盘档案里至少有一个他人。每步先从侧栏打开那条生时校正会话,确认校正界面已打开(地址带 `?c=`),再点侧栏「星盘档案」进入 `/people`。
|
||||
|
||||
| 步骤 | 操作 | 预期 |
|
||||
| --- | --- | --- |
|
||||
| A1 | 在 `/people` 点侧栏「新建对话」(桌面,和 iPhone 抽屉各一次) | 首页标题「新对话」,输入框占位「想聊什么都可以」且可输入,发送可用;不出现「正在打开生时校正…」;地址为 `/`;侧栏那条校正会话不显示「正在打开」 |
|
||||
| A2 | 在 `/people` 选中本人,点「和 TA 对话」 | 同 A1;等 5 秒,页面不从新对话翻回校正界面,地址里没有 `c=` |
|
||||
| A3 | 在 `/people` 选中一个他人,点「和 TA 对话」 | 同 A1;标题「新对话」旁边是这个人的名字 |
|
||||
| A4 | 在 `/people` 选中一个他人,点「看星盘」,到 `/chart` 后点左下角账户(回首页) | 落在这个人的新对话:标题「新对话」旁是这个人的名字,输入框可用;不出现旧校正标题和「正在打开生时校正…」(修复前就是这个画面) |
|
||||
| A5 | 从校正会话点侧栏「星盘」,直接点左下角账户回首页(当前人物仍是本人) | 按原规则回到那条校正会话并打开校正界面,地址带 `?c=`;不停在锁住的输入框 |
|
||||
| A6 | 首页点自己的「新建对话」,再进 `/chart`,点左下角账户回首页 | 不回到更早的校正会话 |
|
||||
|
||||
记录:每步通过 / 未通过、设备与浏览器、日期、脱敏现象;不记录账号、会话 ID、出生资料。
|
||||
|
||||
Reference in New Issue
Block a user