direction card: More options lines and a note on a picked option
Design feedback 1, task 13, step A. An answered More options or More like this card says what it asked for (chat.card.direction_chose_more, chat.card.direction_chose_like), through the chose_* lines the card and the day boxes already pick. The task page's ask line, when each option has its own Build this one and the card offers More options, names both (work.decide.direction_ask_more). work.decide.direction_ask_options and chat.card.direction_note_options are unchanged: the code shows them only for a direction from before rounds were kept, which they still describe. A note given with a picked option goes into the built task's brief as a note on that option (work.explore.option_note), refused without its words; a note-only Build keeps work.explore.build_note. All four strings are pending copy review. Tests: go test ./internal/equipo/ -run TestDirectionAskAndAnswered; go test ./internal/equipo/chat/ -run 'TestBuildEarlierRound|TestBuildOptionNoteNeedsWords|TestBuildNoteOnlyOldClient'. Failure seen first: the ask line was "Build this one, try again with a note, or drop it."; the earlier-round brief ended "Paul said which option to build in their own words: ...". Mutations (each failed its test, then restored): - drop the ask_more assignment: TestDirectionAskAndAnswered fails - drop the d.More condition: the no-More case fails - remove chose_more / chose_like from copy.go: "no answered line" - option note uses build_note: TestBuildEarlierRound and TestBuildOptionNoteNeedsWords fail - no refusal without option_note's words: TestBuildOptionNoteNeedsWords - never / always the option note: TestBuildEarlierRound / TestBuildNoteOnlyOldClient fail
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+86
−7
docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+4 −0internal/equipo/chat/direction_options_test.go+25 −2internal/equipo/chat/explore.go+11 −5internal/equipo/copy.go+9 −0internal/equipo/direction_card_test.go+32 −0internal/equipo/work_views.go+5 −0
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index 235e3195..445ac82f 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -7261,6 +7261,10 @@ records remain unchanged. |
| | `chat.card.taste_other` | Something else | Copy specialist | COPY REVIEW PENDING | |
| | `chat.card.taste_use` | Use these | Copy specialist | COPY REVIEW PENDING | |
| | `chat.card.taste_skip` | Skip | Copy specialist | COPY REVIEW PENDING | |
| +| `chat.card.direction_chose_more` | Asking Design for more options. | Copy specialist | COPY REVIEW PENDING | |
| +| `chat.card.direction_chose_like` | Asking Design for more like this one. | Copy specialist | COPY REVIEW PENDING | |
| +| `work.decide.direction_ask_more` | Build one of the options, ask for more, try again with a note, or drop it. | Copy specialist | COPY REVIEW PENDING | |
| +| `work.explore.option_note` | %s's note on this option, in their own words: %s | Copy specialist | COPY REVIEW PENDING | |
| ## Task 21 |
diff --git a/internal/equipo/chat/direction_options_test.go b/internal/equipo/chat/direction_options_test.go| index 347c67e2..cd2ab351 100644 |
| --- a/internal/equipo/chat/direction_options_test.go |
| +++ b/internal/equipo/chat/direction_options_test.go |
| @@ -100,6 +100,7 @@ func (r *hkRig) buildWords() { |
| "work.explore.build_brief": "Equipo will build the chosen direction from the main branch, using branch %s at commit %s as the design reference. Exploration: %s.", |
| "work.explore.build_note": "%s said which option to build in their own words: %s", |
| "work.explore.build_option": "Build option %d (Design's name for it: %s), from branch %s at commit %s, folder %s.", |
| + "work.explore.option_note": "%s's note on this option, in their own words: %s", |
| } { |
| words, k, w := r.s.authority.Copy, k, w |
| r.s.authority.Copy = func(key string) string { |
| @@ -173,12 +174,34 @@ func TestBuildEarlierRound(t *testing.T) { |
| built := r.load(r.load(task).BuiltAs) |
| line := "Build option 2 (Design's name for it: " + wire.QuotedData("Writing desk") + "), from branch " + r.load(task).Branch + " at commit " + short(candidateSHA) |
| name, _ := DisplayName(paul) |
| - said := name + " said which option to build in their own words: " + wire.QuotedData(note) |
| - if !strings.Contains(built.Brief, line) || strings.Contains(built.Brief, short(secondSHA)) || !strings.HasSuffix(built.Brief, said) || strings.Index(built.Brief, line) > strings.Index(built.Brief, said) { |
| + // With an option named, the note is on that option, not about which |
| + // option to build (work.explore.option_note). |
| + said := name + "'s note on this option, in their own words: " + wire.QuotedData(note) |
| + if !strings.Contains(built.Brief, line) || strings.Contains(built.Brief, short(secondSHA)) || !strings.HasSuffix(built.Brief, said) || strings.Index(built.Brief, line) > strings.Index(built.Brief, said) || strings.Contains(built.Brief, "said which option") { |
| t.Fatalf("brief %q", built.Brief) |
| } |
| } |
| +// TestBuildOptionNoteNeedsWords: a note on a picked option is written |
| +// only in copy.go's words for it; without them the build is refused and |
| +// nothing is built, never the note under the which-option words. |
| +func TestBuildOptionNoteNeedsWords(t *testing.T) { |
| + r, _, task, s, c := roundOfThree(t) |
| + words := r.s.authority.Copy |
| + r.s.authority.Copy = func(key string) string { |
| + if key == "work.explore.option_note" { |
| + return "" |
| + } |
| + return words(key) |
| + } |
| + if err := r.answerCard(c, wire.AnswerCard{Choice: wire.ChoiceBuild, Note: "Warmer.", Option: &wire.OptionRef{Step: s.ID, Index: 0}}); !errors.Is(err, ErrInvalid) { |
| + t.Fatalf("build without the option note's words: %v", err) |
| + } |
| + if k := r.load(task); k.BuiltAs != "" { |
| + t.Fatalf("built %s", k.BuiltAs) |
| + } |
| +} |
| + |
| // TestBuildStaleOption: an option that is not one of this task's kept, |
| // approved options is a card conflict and builds nothing: an index past |
| // the round's options, a step of another task, a round whose candidate |
diff --git a/internal/equipo/chat/explore.go b/internal/equipo/chat/explore.go| index 2ea573a4..32bbb701 100644 |
| --- a/internal/equipo/chat/explore.go |
| +++ b/internal/equipo/chat/explore.go |
| @@ -370,9 +370,9 @@ func (t *txn) answerDirection(person string, c cardRecord, in wire.AnswerCard) ( |
| // exploration follows the new task too, before anything of it is |
| // dispatched or told: as work it made when it made the exploration |
| // (team_cancel stops it), else as work it joined. The person's note, when |
| -// they gave one (which option, with more than one), ends the brief, |
| -// quoted as their own words under their name; the exploration's brief is |
| -// cut to make room, never the note. |
| +// they gave one (which option, with more than one, or on the option |
| +// named), ends the brief, quoted as their own words under their name; |
| +// the exploration's brief is cut to make room, never the note. |
| // |
| // With an option named (chosen), the brief names it from records: its |
| // number, Design's name for it quoted as Design's words, its round's |
| @@ -411,8 +411,14 @@ func (t *txn) buildThisOne(k *taskRecord, p progress, note string, chosen *chose |
| } |
| if note != "" { |
| name, _ := DisplayName(k.Creator) |
| - said := t.words("work.explore.build_note", name, wire.QuotedData(note)) |
| - if said == "" { |
| + said := "" |
| + if chosen != nil { |
| + // A note on the option the person picked, not about which |
| + // one: its words live only in copy.go, as the option's do. |
| + if said = t.words("work.explore.option_note", name, wire.QuotedData(note)); said == "" { |
| + return ErrInvalid |
| + } |
| + } else if said = t.words("work.explore.build_note", name, wire.QuotedData(note)); said == "" { |
| said = name + "'s note on which option to build, in their own words: " + wire.QuotedData(note) |
| } |
| more += "\n\n" + said |
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go| index 94af74c0..88312ae7 100644 |
| --- a/internal/equipo/copy.go |
| +++ b/internal/equipo/copy.go |
| @@ -2096,6 +2096,15 @@ var pageCopy = map[string]string{ |
| "chat.card.like": "More like this", // COPY REVIEW PENDING |
| "chat.card.option_note": "Add a note (optional)", // COPY REVIEW PENDING |
| + // Design feedback 1, task 13: what the direction card says once More |
| + // options or More like this is tapped, the task page's ask line when |
| + // each option has its own Build this one, and the person's note on |
| + // the option they picked, in the built task's brief. |
| + "chat.card.direction_chose_more": "Asking Design for more options.", // COPY REVIEW PENDING |
| + "chat.card.direction_chose_like": "Asking Design for more like this one.", // COPY REVIEW PENDING |
| + "work.decide.direction_ask_more": "Build one of the options, ask for more, try again with a note, or drop it.", // COPY REVIEW PENDING |
| + "work.explore.option_note": "%s's note on this option, in their own words: %s", // COPY REVIEW PENDING |
| + |
| // Design feedback 1, task 12: each option of the deployed round opens |
| // live through the preview wrapper; a preview the host refused for |
| // its headers says why there is none (places spec, section 4). |
diff --git a/internal/equipo/direction_card_test.go b/internal/equipo/direction_card_test.go| index 8c4b5c1e..0cd3d91f 100644 |
| --- a/internal/equipo/direction_card_test.go |
| +++ b/internal/equipo/direction_card_test.go |
| @@ -314,3 +314,35 @@ func TestTaskPageRounds(t *testing.T) { |
| t.Fatalf("task page answers: %s", page) |
| } |
| } |
| + |
| +// TestDirectionAskAndAnswered (Design feedback 1, Task 13): the task |
| +// page's ask line for options built one by one names More options when |
| +// the card offers it, and says what it said before otherwise; an |
| +// answered More options or More like this card says what it asked for, |
| +// in the conversation and the day boxes. |
| +func TestDirectionAskAndAnswered(t *testing.T) { |
| + c := feedbackTask(feedbackRounds()) |
| + d := decisionOf(c.task, taskLine{Task: c.task, Card: c.card}) |
| + if want := copyText("work.decide.direction_ask_more"); d == nil || want == "" || d.Ask != want { |
| + t.Fatalf("ask line with More options: %+v", d) |
| + } |
| + plain := feedbackTask(feedbackRounds()) |
| + plain.card.Options = []string{wire.ChoiceBuild, wire.ChoiceAgain, wire.ChoiceDrop} |
| + if d := decisionOf(plain.task, taskLine{Task: plain.task, Card: plain.card}); d == nil || d.Ask != copyText("work.decide.direction_ask") { |
| + t.Fatalf("ask line without More options: %+v", d) |
| + } |
| + for _, choice := range []string{wire.ChoiceMore, wire.ChoiceLike} { |
| + card := *c.card |
| + card.State, card.Choice = wire.CardAnswered, choice |
| + want := copyText("chat.card.direction_chose_" + choice) |
| + if want == "" { |
| + t.Fatalf("no answered line for %s", choice) |
| + } |
| + if v := cardView(card, nil, map[string]wire.Task{c.task.ID: c.task}); v.Note != want { |
| + t.Fatalf("%s: card says %q, want %q", choice, v.Note, want) |
| + } |
| + if got := decisionNote(card); got != want { |
| + t.Fatalf("%s: day box says %q, want %q", choice, got, want) |
| + } |
| + } |
| +} |
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go| index c46784e5..4e34a188 100644 |
| --- a/internal/equipo/work_views.go |
| +++ b/internal/equipo/work_views.go |
| @@ -837,6 +837,11 @@ func decisionOf(t wire.Task, v taskLine) *decisionView { |
| d.Choices = append(d.Choices, decisionChoice{Value: o, Label: copyText("chat.card." + o), Primary: o == wire.ChoiceBuild}) |
| } |
| } |
| + if d.More && d.Gallery.perOption() { |
| + // Build is each option's own and More options the set's: |
| + // the ask line names both. |
| + d.Ask = copyText("work.decide.direction_ask_more") |
| + } |
| } |
| case wire.NeedsMacRunner: |
| // Not a failure: Mac work waits for a Mac runner rather than run on |