Add pinned and archived flags to Conversation
Why: the approved task-centric sidebar (proposal 2026-09-30, option A) needs server-authoritative pin and archive state on conversations; client-side storage would be fake state against the event-sourced model. Evidence: go test ./... passes; omitempty keeps wire format and golden samples byte-identical for zero values (backward compatible). Impact: additive optional fields; consumers ignoring unknown fields are unaffected (forward-compat principle). Backend consumes via submodule bump. Refs: Agent-System-Documents docs/proposals/2026-09-30-ui-redesign-and-auth.md (P6/P8, R1)
This commit is contained in:
@@ -31,6 +31,8 @@ type Conversation struct {
|
||||
Owner ID `json:"owner,omitempty"` // 冗余自项目,查询过滤用
|
||||
Title string `json:"title"`
|
||||
ProfileID ID `json:"profileId,omitempty"` // 空为默认画像
|
||||
Pinned bool `json:"pinned,omitempty"` // 侧栏置顶(方案 A P6/P8:本端组织偏好,服务端权威)
|
||||
Archived bool `json:"archived,omitempty"` // 归档:列表默认隐藏,数据保留
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface Project {
|
||||
|
||||
export interface Conversation {
|
||||
id: ID; projectId: ID; owner?: ID; title: string; profileId?: ID;
|
||||
pinned?: boolean; archived?: boolean;
|
||||
createdAt: string; updatedAt: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user