data-gap(chat): 人类消息身份行缺项目角色标签的真实数据源(D5 后半,需后端建模)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## 背景
`chat-main-fidelity-rubric.md` D5 要求人类消息气泡带角色(参照图「项目经理 · 14:31 林可」)。调查结论(见 #2271):
- `DurableMessage` 契约(`packages/contracts/src/chat.ts`)人类消息只有 `authorId`,没有任何"发送者在本项目里的角色"字段。
- 现有 `ProjectRole`/`getViewerOptions` 都是与当前查看者视角切换相关的投影,不是"某条历史消息作者当时的项目角色"这件事的数据源。
- 要诚实实现,需要后端新增(任一):
1. `DurableMessage` 增加一个只读投影字段(如 `authorRoleLabel`),服务端按发消息那一刻的项目成员角色落库/推导;或
2. 前端另开一个真实端口按 `authorId` + `projectId` 查项目成员角色,接受"角色可能随时间变化、只能查当前值不是历史值"的近似。
两条路径都是新的契约面,需要人类/coord-architecture 判断走哪条、值不值得为一个 UI 标签做(对照 `chat-main-fidelity-rubric.md` 里 D3/D4 曾有的"不为一个字段做产品设计"先例)。本 issue 只记录数据缺口,不实现、不伪造。
## 关联
总览:#2268;同批调查:#2271
Contributor guide
No contributing guide indexed for this repository
Research direction
Read packages/contracts/src/chat.ts and chat-main-fidelity-rubric.md, then review the findings in #2271 and the overview in #2268. This issue has no implementation entry point yet: it needs an architecture decision on whether to add a historical author-role projection or use a separate lookup, with the chosen contract and scope recorded before coding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100