Add the avatar vocabulary to UINode (UI capability platform)
Why: plugins and the host need one shared avatar primitive for member/ owner displays in cards, messages, and admin surfaces (user decision 2026-09-30: avatars, cards, settings become base capabilities plugins reuse directly). Evidence: go test green with regenerated golden (single avatar with sub/tone plus a stacked group); omitempty keeps existing wire samples byte-stable. Impact: additive optional UINode field + type; unknown-type consumers ignore it (forward compat). Renderers gain 'avatar' via the ui repo. Refs: Agent-System-Documents proposal 2026-09-30-ui-redesign-and-auth.md
This commit is contained in:
@@ -125,6 +125,12 @@ func TestGoldenCardEvents(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGoldenUIVocabularies(t *testing.T) {
|
||||
golden(t, "ui_avatar", []UINode{
|
||||
{Type: UIAvatar, Avatar: &UIAvatarSpec{Name: "weichen", Sub: "OWNER"}},
|
||||
{Type: UIAvatar, Avatar: &UIAvatarSpec{
|
||||
Stack: []UIAvatarSpec{{Name: "甲", Tone: "ok"}, {Name: "乙", Tone: "warn"}, {Name: "丙"}},
|
||||
}},
|
||||
})
|
||||
golden(t, "ui_vocabularies", []UINode{
|
||||
{Type: UIProgress, Progress: &UIProgressSpec{Label: "市场可行性 78%", Value: 0.78, Tone: "ok"}},
|
||||
{Type: UICompare, Compare: &UICompareSpec{
|
||||
|
||||
Reference in New Issue
Block a user