Skip to content

Commit 03e3a1b

Browse files
authored
chore(tui): remove plan-label comments and session-work identifiers (#130)
Rename wave-numbered test files to descriptive names, strip C/F/P/E label prefixes and divider rules from comments, and drop internal review-audit references (judge-N, .ux-review/, Round-4 wave-1).
1 parent 4ada397 commit 03e3a1b

10 files changed

Lines changed: 38 additions & 59 deletions
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import (
99
"github.com/BackendStack21/bodek/internal/client"
1010
)
1111

12-
// W3 — clipboard & export. Regression tests for the judge-2 audit
13-
// (see .ux-review/judge2_copy_export.md).
12+
// Clipboard & export.
1413

15-
// F3/P1: raw cards (help/stats) carry styled ANSI — ^Y after /help must
14+
// raw cards (help/stats) carry styled ANSI — ^Y after /help must
1615
// copy the last real reply, never the card.
1716
func TestLastReplySkipsRawCards(t *testing.T) {
1817
m := newTestModel()
@@ -30,7 +29,7 @@ func TestLastReplySkipsRawCards(t *testing.T) {
3029
}
3130
}
3231

33-
// F1/F8: exports never silently overwrite — same base gets -1, -2… suffixes.
32+
// Exports never silently overwrite — same base gets -1, -2… suffixes.
3433
func TestWriteExportNeverOverwrites(t *testing.T) {
3534
dir := t.TempDir()
3635
p1, err := writeExport(dir, "sess-abc123", "md", []byte("one"))
@@ -56,7 +55,7 @@ func TestWriteExportNeverOverwrites(t *testing.T) {
5655
}
5756
}
5857

59-
// F1/P0: /export exists in the registry with an honest format guard.
58+
// /export exists in the registry with an honest format guard.
6059
func TestExportCommandRegistered(t *testing.T) {
6160
found := false
6261
for _, c := range slashCommands() {
@@ -77,7 +76,7 @@ func TestExportCommandRegistered(t *testing.T) {
7776
}
7877
}
7978

80-
// F2/P0: remote sessions skip exec helpers — the clipboard that matters is
79+
// remote sessions skip exec helpers — the clipboard that matters is
8180
// on the machine running the terminal.
8281
func TestClipboardToolRemotePrefersOSC52(t *testing.T) {
8382
t.Setenv("SSH_TTY", "/dev/ttys004")

‎internal/tui/cosmetics_test.go‎

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import (
1010
"github.com/muesli/termenv"
1111
)
1212

13-
// ── C2: the first-run home signposts the core interactions ────────────────
14-
13+
// the first-run home signposts the core interactions ───────────────
1514
// TestWelcomeTipSignpostsCoreInteractions: the welcome tip must name the
1615
// core composer interactions and command discovery.
1716
func TestWelcomeTipSignpostsCoreInteractions(t *testing.T) {
@@ -21,7 +20,7 @@ func TestWelcomeTipSignpostsCoreInteractions(t *testing.T) {
2120
t.Errorf("welcome tip missing %q:\n%s", want, out)
2221
}
2322
}
24-
// C11: the ^K microcopy reads as a verb, not jargon.
23+
// the ^K microcopy reads as a verb, not jargon.
2524
if !strings.Contains(out, "^K commands") {
2625
t.Errorf("welcome tip should identify the command palette:\n%s", out)
2726
}
@@ -30,8 +29,7 @@ func TestWelcomeTipSignpostsCoreInteractions(t *testing.T) {
3029
}
3130
}
3231

33-
// ── C4: one failure glyph ──────────────────────────────────────────────────
34-
32+
// one failure glyph ─────────────────────────────────────────────────
3533
// TestFailureGlyphStandardized: ✗ is the single failure glyph; the lamp
3634
// set must not carry the stray ✕.
3735
func TestFailureGlyphStandardized(t *testing.T) {
@@ -40,8 +38,7 @@ func TestFailureGlyphStandardized(t *testing.T) {
4038
}
4139
}
4240

43-
// ── C5: lamp glyphs belong to the connection state alone ──────────────────
44-
41+
// lamp glyphs belong to the connection state alone ─────────────────
4542
// TestLampGlyphsReserved: no other surface may reuse ● ◉ ◌ ○ — those four
4643
// cells are the connection lamp's vocabulary.
4744
func TestLampGlyphsReserved(t *testing.T) {
@@ -61,8 +58,7 @@ func TestLampGlyphsReserved(t *testing.T) {
6158
}
6259
}
6360

64-
// ── C3: header instruments get a first-turn decoder ───────────────────────
65-
61+
// header instruments get a first-turn decoder ──────────────────────
6662
// TestCtxHintOnFirstPrompt: the first real prompt teaches what the ctx
6763
// gauge and the connection lamp mean.
6864
func TestCtxHintOnFirstPrompt(t *testing.T) {
@@ -88,8 +84,7 @@ func TestCtxHintOnFirstPrompt(t *testing.T) {
8884
}
8985
}
9086

91-
// ── C11: microcopy ────────────────────────────────────────────────────────
92-
87+
// microcopy ───────────────────────────────────────────────────────
9388
// TestSwarmHintMicrocopy: the swarm tip speaks in plain verbs.
9489
func TestSwarmHintMicrocopy(t *testing.T) {
9590
if strings.Contains(hintSwarmText, "registry") || strings.Contains(hintSwarmText, "chips") {
@@ -113,8 +108,7 @@ func TestElapsedCarriesLabel(t *testing.T) {
113108
}
114109
}
115110

116-
// ── C1: the faint contract — body text never renders in faint ────────────
117-
111+
// the faint contract — body text never renders in faint ───────────
118112
// TestStepArgNotFaint: step arguments are machine-voice secondary text and
119113
// must take muted, not the chrome-only faint token.
120114
func TestStepArgNotFaint(t *testing.T) {
@@ -127,8 +121,7 @@ func TestStepArgNotFaint(t *testing.T) {
127121
}
128122
}
129123

130-
// ── C9: the queued count lives in the footer alone ────────────────────────
131-
124+
// the queued count lives in the footer alone ───────────────────────
132125
// TestApprovalHeadDropsQueuedChip: with a queue behind the head approval,
133126
// the card head no longer repeats the count the footer already carries.
134127
func TestApprovalHeadDropsQueuedChip(t *testing.T) {
@@ -138,7 +131,7 @@ func TestApprovalHeadDropsQueuedChip(t *testing.T) {
138131
if strings.Contains(body, "queued") {
139132
t.Errorf("approval card head still carries the queued count:\n%s", body)
140133
}
141-
// F1: the shelf chip is the single owner of the PROMPT-queue count — the
134+
// the shelf chip is the single owner of the PROMPT-queue count — the
142135
// footer must not repeat it (the approval head's own queue hint stays).
143136
foot := plain(m.footer())
144137
if strings.Contains(foot, "▸") && strings.Contains(foot, "queued") {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import (
88
"github.com/charmbracelet/lipgloss"
99
)
1010

11-
// W1 hardening — sanitize coverage, width-discipline, and wire-field hygiene.
12-
// Regression tests for the judge-5 robustness audit (see .ux-review/).
11+
// Hardening — sanitize coverage, width-discipline, and wire-field hygiene.
1312

1413
func TestSanitizeStripsInvisibleClasses(t *testing.T) {
1514
cases := []struct{ name, in, want string }{
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
"github.com/charmbracelet/lipgloss"
88
)
99

10-
// W6 — hostile terminals (contained items). Regression tests for the
11-
// judge-5 audit E1 and the statusLine clamp.
10+
// Hostile terminals (contained items), plus the statusLine clamp.
1211

13-
// E1: below the old 3-row viewport floor the View was taller than the
12+
// below the old 3-row viewport floor the View was taller than the
1413
// terminal — permanent scroll jitter in alt-screen. The View must fit at
1514
// any height ≥ the minimum layout.
1615
func TestViewFitsShortTerminals(t *testing.T) {

‎internal/tui/model.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ func (m *Model) relayout() {
13891389
vpH := m.height - headerHeight - footerHeight - m.inputAreaHeight() - sheet
13901390
// Degradation ladder, step 1: when the layout doesn't fit, give the
13911391
// transcript rows back by shrinking the composer first — a one-visible-
1392-
// row terminal beats a View that never fits (judge-5 E1).
1392+
// row terminal beats a View that never fits.
13931393
if vpH < 1 && m.ta.Height() > 1 {
13941394
over := 1 - vpH
13951395
m.ta.SetHeight(max(1, m.ta.Height()-over))

‎internal/tui/quit_confirm_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func TestQuitGateOtherKeyDisarms(t *testing.T) {
8888
}
8989
// The gate eats exactly one decision key: the disarming printable rune
9090
// falls through to the composer, so "esc/^C, keep typing" never loses a
91-
// character (judge-3 F2).
91+
// character.
9292
if got := m.ta.Value(); got != "n" {
9393
t.Errorf("disarm keypress did not reach the input: %q", got)
9494
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/BackendStack21/bodek/internal/client"
77
)
88

9-
// Round-4 wave-1 regressions: runCtxCum reset on error, usage straggler
9+
// Telemetry event regressions: runCtxCum reset on error, usage straggler
1010
// must not open an orphan turn, stale wakeArmed must not mislabel.
1111

1212
func TestErrorResetsRunCtxCum(t *testing.T) {

‎internal/tui/transcript_fixes_test.go‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import (
88
"github.com/BackendStack21/bodek/internal/client"
99
)
1010

11-
// ── F1: the queue count has a single owner — the shelf chip ────────────────
12-
11+
// the queue count has a single owner — the shelf chip ───────────────
1312
// TestQueueCountSingleOwner: with prompts queued mid-turn, the shelf chip is
1413
// the ONLY surface carrying the count — the status line and the footer must
1514
// not repeat it.
@@ -31,8 +30,7 @@ func TestQueueCountSingleOwner(t *testing.T) {
3130
}
3231
}
3332

34-
// ── F2: the status line never hides on disconnect ──────────────────────────
35-
33+
// the status line never hides on disconnect ─────────────────────────
3634
// TestStatusLineReconnectState: while disconnected the status line renders
3735
// the reconnect state in-place instead of vanishing — and never shows the
3836
// normal busy spinner label.
@@ -67,8 +65,7 @@ func TestStatusLineReconnectState(t *testing.T) {
6765
}
6866
}
6967

70-
// ── F3: one steady new-output row — no insert/remove reflow ────────────────
71-
68+
// one steady new-output row — no insert/remove reflow ───────────────
7269
// TestNewOutputRowSteady: the new-output indicator lives on ONE footer row
7370
// that never inserts or removes a line — the layout height must not change
7471
// when the busy state toggles while scrolled up.
@@ -101,8 +98,7 @@ func TestNewOutputRowSteady(t *testing.T) {
10198
}
10299
}
103100

104-
// ── F4: a failed turn marks its head ───────────────────────────────────────
105-
101+
// a failed turn marks its head ──────────────────────────────────────
106102
// TestFailedTurnHeadMarked: an error event on the streaming turn sets a
107103
// sanitized failed flag that paints ✗ on the turn head and survives
108104
// finalization within this session. (Replay does not restore it: the
@@ -143,8 +139,7 @@ func TestFailedTurnHeadMarked(t *testing.T) {
143139
}
144140
}
145141

146-
// ── F5: visible notices are capped to one line ─────────────────────────────
147-
142+
// visible notices are capped to one line ────────────────────────────
148143
// TestNoticeCapOneLine: only the latest unexpired notice renders, folded into
149144
// a single line; older ones collapse into a count instead of stacking.
150145
func TestNoticeCapOneLine(t *testing.T) {

‎internal/tui/view.go‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func (m *Model) plainView() string {
5959
return strings.Join(parts, "\n")
6060
}
6161

62-
// ── header ─────────────────────────────────────────────────────────────────
63-
62+
// ── header ────────────────────────────────────────────────────────────────
6463
func (m *Model) header() string {
6564
th := m.th
6665
// The logo gradient is width-independent, so render it once and cache it
@@ -334,7 +333,7 @@ func (m *Model) statusLine() string {
334333
return ""
335334
}
336335
th := m.th
337-
// F2: a dropped socket is exactly when the reader needs this row —
336+
// a dropped socket is exactly when the reader needs this row —
338337
// instead of hiding, the status line owns the reconnect state in-place.
339338
if m.disconn {
340339
label := "◌ disconnected · ⏎ retry"
@@ -390,8 +389,7 @@ func (m *Model) statusLineVisible() bool {
390389
return (m.busy || m.disconn) && m.curApproval() == nil
391390
}
392391

393-
// ── transcript ───────────────────────────────────────────────────────────
394-
392+
// ── transcript ──────────────────────────────────────────────────────────
395393
// streamRenderInterval is the coalescing window for high-frequency streaming
396394
// events (tokens, thinking): instead of rebuilding the viewport — which
397395
// re-runs glamour on the streaming tail — per event, they share one rebuild.
@@ -1486,8 +1484,7 @@ func (m *Model) renderNotices() string {
14861484
return line
14871485
}
14881486

1489-
// ── input / approval area ──────────────────────────────────────────────────
1490-
1487+
// ── input / approval area ─────────────────────────────────────────────────
14911488
func (m *Model) inputArea() string {
14921489
box := m.th.inputBox.Width(m.cardWidth()).Render(m.ta.View())
14931490
var above []string
@@ -1643,8 +1640,7 @@ func (m *Model) approvalBody() string {
16431640
return strings.Join(lines, "\n")
16441641
}
16451642

1646-
// ── footer ─────────────────────────────────────────────────────────────────
1647-
1643+
// ── footer ────────────────────────────────────────────────────────────────
16481644
func (m *Model) footer() string {
16491645
return ansi.Truncate(m.footerContent(), max(1, m.width), "")
16501646
}
@@ -2025,8 +2021,7 @@ func (m *Model) panelFooter(hints ...string) string {
20252021
return ansi.Truncate(out+last, max(1, m.width), "")
20262022
}
20272023

2028-
// ── small helpers ──────────────────────────────────────────────────────────
2029-
2024+
// ── small helpers ─────────────────────────────────────────────────────────
20302025
// plural renders a count with its noun inflected: plural(1, "match",
20312026
// "matches"), plural(3, "approval", "approvals"). Every "%d <noun>" surface
20322027
// goes through this so a single hit can never read as "1 matches" again.
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
"github.com/BackendStack21/bodek/internal/client"
88
)
99

10-
// W2 — visible state & the escape stack. Regression tests for the
11-
// judge-3 interaction audit (see .ux-review/judge3_interaction.md).
10+
// Visible state & the escape stack.
1211

13-
// F1/P0: an armed stop-agent gate must be visible when armed from the
12+
// an armed stop-agent gate must be visible when armed from the
1413
// composer (panel == none) — footer carries the headline and the y confirm.
1514
func TestStopAgentGateVisibleFromComposer(t *testing.T) {
1615
m := newTestModel()
@@ -22,7 +21,7 @@ func TestStopAgentGateVisibleFromComposer(t *testing.T) {
2221
}
2322
}
2423

25-
// F2/P1: a disarmed printable rune falls through to the composer — the gate
24+
// a disarmed printable rune falls through to the composer — the gate
2625
// eats exactly one decision key, never the user's first keystroke.
2726
func TestDisarmedRuneFallsThroughToComposer(t *testing.T) {
2827
m := newTestModel()
@@ -41,7 +40,7 @@ func TestDisarmedRuneFallsThroughToComposer(t *testing.T) {
4140
}
4241
}
4342

44-
// F4/P1: lowercase n is next (vim/less reflex), never query corruption.
43+
// lowercase n is next (vim/less reflex), never query corruption.
4544
func TestFindNextBinding(t *testing.T) {
4645
m := newTestModel()
4746
m.msgs = append(m.msgs,
@@ -65,7 +64,7 @@ func TestFindNextBinding(t *testing.T) {
6564
}
6665
}
6766

68-
// F10/P2: queue deletes are two-step — first d arms, second d deletes.
67+
// queue deletes are two-step — first d arms, second d deletes.
6968
func TestQueueDeleteTwoStep(t *testing.T) {
7069
m := newTestModel()
7170
m.queue = []string{"alpha", "beta"}
@@ -108,7 +107,7 @@ func TestEventsSelectionRendered(t *testing.T) {
108107
}
109108
}
110109

111-
// F3/P1: /help teaches only real keys — no phantom r, and the marquee
110+
// /help teaches only real keys — no phantom r, and the marquee
112111
// features (^S stop sub-agent, alt+f find, ^K palette) are listed.
113112
func TestHelpTeachesRealKeys(t *testing.T) {
114113
m := newTestModel()
@@ -124,7 +123,7 @@ func TestHelpTeachesRealKeys(t *testing.T) {
124123
}
125124
}
126125

127-
// F7/P2: turn jumps name their landing spot — the copy target (alt+y) is
126+
// turn jumps name their landing spot — the copy target (alt+y) is
128127
// verifiable on screen.
129128
func TestJumpTurnReportsLanding(t *testing.T) {
130129
m := newTestModel()

0 commit comments

Comments
 (0)