feat(hub,web): requirement UX — result on top, progress, change targets

- requirement cards keep the conclusion (result) and task progress visible while
  collapsed, show the original ask when expanded, and offer a 补充说明 shortcut
  that threads the next message under the requirement
- composer gains a requirement selector (auto-file / new / a specific one) and
  the human message API accepts requirementId + newRequirement
- closing a requirement (or writing its conclusion) now notifies the human
  out-of-band via a team-attention event
- AI messages inside a thread lose their heavy card styling (left rule only);
  decisions keep the emphasised card
This commit is contained in:
2026-09-17 01:15:36 +08:00
parent 281ff0e9e8
commit 3e68e8d923
9 changed files with 190 additions and 28 deletions
+5 -1
View File
@@ -576,7 +576,11 @@ export const TeamHumanMessageRequestSchema = z.object({
to: z.string().min(1).max(200).optional(),
kind: z.enum(['chat', 'status', 'question', 'task-update', 'decision']).optional(),
/** Team message seq this human message answers (clears the decision inbox item). */
inReplyTo: z.number().int().positive().optional()
inReplyTo: z.number().int().positive().optional(),
/** File this message under an existing requirement. */
requirementId: z.string().min(1).optional(),
/** Force a new requirement even when a parent message could be inherited. */
newRequirement: z.boolean().optional()
})
export type TeamHumanMessageRequest = z.infer<typeof TeamHumanMessageRequestSchema>