feat(tui-go): idea board viewer

OverlayIdeas (opened with I, global/cross-session) lists the idea board in the
artifact-viewer shell: ↑↓ to move, x/d to remove (sends DiscardIdea, optimistic
drop), esc to close. Pull-based via ListIdeas -> idea.list.
This commit is contained in:
2026-06-14 14:36:13 +04:00
parent 04e931c860
commit 02e963d6cc
8 changed files with 250 additions and 1 deletions
@@ -149,6 +149,21 @@ func TestDecodeGoldenServerFrames(t *testing.T) {
}
},
},
{
name: "idea.list carries the cross-session board",
json: `{"type":"idea.list","ideas":[{"ideaId":"i1","text":"cache the repo map","capturedAtMs":1000},` +
`{"ideaId":"i2","text":"add --dry-run","capturedAtMs":2000}]}`,
wantType: TypeIdeaList,
eventBear: false,
check: func(t *testing.T, m ServerMessage) {
if len(m.Ideas) != 2 {
t.Fatalf("idea.list ideas: %+v", m.Ideas)
}
if m.Ideas[0].IdeaID != "i1" || m.Ideas[0].Text != "cache the repo map" || m.Ideas[0].CapturedAtMs != 1000 {
t.Fatalf("idea.list idea[0]: %+v", m.Ideas[0])
}
},
},
{
name: "workflow.proposed carries candidate workflows",
json: `{"type":"workflow.proposed","sessionId":"s1","proposalId":"prop-1","prompt":"Run one?",` +
@@ -233,6 +248,16 @@ func TestEncodeGoldenClientFrames(t *testing.T) {
}
},
},
{
name: "DiscardIdea carries the ideaId",
frame: DiscardIdea("i1"),
wantType: clientPrefix + "DiscardIdea",
check: func(t *testing.T, raw map[string]any) {
if raw["ideaId"] != "i1" {
t.Fatalf("DiscardIdea ideaId: %+v", raw)
}
},
},
{
name: "ClarificationResponse carries ids + answers",
frame: ClarificationResponse("s1", "analyst", "req-1",