Repository navigation
fix(app): select the manager conversation view from the operations tile - #5406
Conversation
#5399 replaced the manager chat open/close state with the typed workspace view (`selectedGoalTab`) but left the ManagerHomeBoard's "view all operations" handler calling the removed `setManagerChatOpen`. The dashboard therefore no longer type-checks (`tsc --noEmit`, TS2552) and the button throws when clicked. Route the handler through the same typed view owner as the rest of the surface, so the operations tile opens the manager conversation instead of referencing a removed setter. No other #5399 leftover is present. Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed exact head 4fda0e3e267c21d8da11d252290c40df4451b170.
动机
#5399 把管家 Chat 的开关状态换成了类型化工作区视图(selectedGoalTab,由
controlledView ?? localView 派生并通过 callbacks.onSelectView 发布),但漏改了
ManagerHomeBoard 的"查看全部操作"回调,它仍在调用已被删除的 setManagerChatOpen。
后果有两条,都可以直接观测:当前 main 的 dashboard 不能通过类型检查
(personal-workspace-page.tsx(1989,44): error TS2552),因此 npm run build
(tsc + vite + build:chat)这条打包 lane 是红的;点击该按钮会抛 ReferenceError。
这既挡住本仓库其他 PR 的必需检查,也让一个真实入口失效,所以值得立刻修,而且只需一行。
改动思路
不重建被 #5399 删掉的管家专用 setter(那正是它去除的重复 owner),而是让该回调走同一个
类型化视图 owner:onViewAllOperations={() => setSelectedGoalTab("chat")}。这与页面里
其他"打开会话"入口完全一致(1551/1564/1878/2032 行都这么调用)。
具体改动
apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-page.tsx(+1/−1):
操作卡的"查看全部"回调由setManagerChatOpen(true)改为setSelectedGoalTab("chat")。
改动后npx tsc --noEmit不再报告任何未解析标识符,说明这是 #5399 唯一遗留的引用;
npm run build(tsc + vite + chat bundle)也恢复通过,管家板渲染结果不变,只是那个按钮
重新指向同一个类型化视图 owner。
对主干的风险
- 只把失效引用接回既有 owner,没有新增状态、协议或权限;风险面是"是否真的恢复了原意"。
证据:setSelectedGoalTab是页面内既有的会话入口调用方式,且它会把选择发布给路由 owner,
所以点击行为与其它入口一致。 - 已验证:干净 worktree 上
main@3a35ec195的npx tsc --noEmit复现 TS2552,本 head 干净;
npm run build通过;开发态浏览器场景confirmed-operations(管家板与操作卡)、
steward-journey、navigation-sorting全部通过。 - 未验证:点击本身没有被现有场景覆盖——该按钮只在操作卡超过 3 行时才渲染,当前 fixture 不构造
这种数据;因此这类回归的持久守卫是打包 lane 里的类型检查(本次正是它抓到的问题)。
要在浏览器里钉住点击路径,需要新增操作 fixture,可以作为独立的小改动,我不把它塞进这个修复。
PR 正文已把这一点写成覆盖说明,而不是声称已验证。 - 非阻塞建议:无。已确认没有其他 #5399 遗留引用。
我的整体评价
这是最小且正确的修复:把一行失效引用接回同一个类型化视图 owner,既恢复打包构建,也让
操作卡入口重新可用,没有为"过绿"而回退 #5399 的收敛。没有阻塞性发现,APPROVE。
English verdict: APPROVE. Exact head 4fda0e3e267c21d8da11d252290c40df4451b170 restores the
manager operations tile's "view all" handler on the typed workspace view owner that #5399
introduced. main@3a35ec195 fails npx tsc --noEmit with TS2552 on the removed setter and the
head is clean; npm run build and the confirmed-operations, steward-journey and
navigation-sorting development scenarios pass. No blocking findings; the click path itself is
not covered by the current fixtures, so the durable guard is the packaged type check.
Goal And Delivered Outcome
mainafter fix(app): keep chosen work views across reload and browser history #5399 (no issue).ManagerHomeBoard's "view all operations" handler calling the removedsetManagerChatOpen(true). Currentmaintherefore does not type-check (npx tsc --noEmitinapps/presentation/dashboard:personal-workspace-page.tsx(1989,44): error TS2552: Cannot find name 'setManagerChatOpen'), and the button would raise aReferenceErrorwhen clicked.tsc --noEmitand the packagednpm run build(tsc + vite +build:chat) fail onmain; after, both pass and the operations tile's "view all" opens the manager conversation through the same typed view owner the rest of the surface uses.main(3a35ec195).Scope And Continuation
setSelectedGoalTab("chat"), the setter fix(app): keep chosen work views across reload and browser history #5399 introduced forselectedGoalTab(controlledView ?? localView, published throughcallbacks.onSelectView). No other fix(app): keep chosen work views across reload and browser history #5399 leftover exists —tscreports this as the only unresolved identifier.briefRowLimit(3) rows, and no browser scenario currently seeds that many, so the durable guard for this regression class is the dashboard type check that the packaged lane runs; pinning the click path would need new operation fixtures and can be its own change if wanted.Validation
4fda0e3e2finishedsyntheticregression_paritypassedmain@3a35ec195:npx tsc --noEmitfails with TS2552 atpersonal-workspace-page.tsx(1989,44); the same command on this head is clean.staticpassednpx tsc --noEmitandnpm run build(tsc, vite build,scripts/chat_bundle_launcher.mjs build) inapps/presentation/dashboard.integrationpassedconfirmed-operations(manager board, operations tile),steward-journeyandnavigation-sortingpass in the development smoke.Frontend / Visual Evidence
changed(behavior only)confirmed-operationsrenders the manager board at 1512px and 390px in both locales and passes.syntheticType of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).Future-facing refactor pass: not needed. The related cleanup the merge should keep is the one this PR restores — a single typed view owner for the whole workspace surface; adding a manager-only setter back would re-create the duplicate #5399 removed.