diff options
| author | Morgan Lunt <morganl@anthropic.com> | 2026-09-24 21:07:24 -0700 |
|---|---|---|
| committer | Morgan Lunt <morganl@anthropic.com> | 2026-09-24 21:07:24 -0700 |
| commit | caac6735d95bddeb8c8bbe3ddc9d6c01787fc8e1 (patch) | |
| tree | 132ff3f8b1404f56f5dd2051ff1c2761064b746c /plugins/code-modernization/tests/stacks.test.ts | |
| parent | d6af0c04d89ad7b0c75e21b8ae7f15585e805b08 (diff) | |
code-modernization: pane wording, attention items and docs that match the code
The pane's button reads "put in prompt" (it never runs the command), the
refresh button is gone (the pane already refreshes after writes, at turn end
and every 20 seconds while idle), the summary line fits a 120-column bar, and
the next-step reasons are short enough to read. A P0 rule under discussion is
listed under Attention ("the build waits"), and a module that is not proven
shows its first reason there. In an uplift, finished modules list before
merely edited ones.
hooks/README.md now names every button and label as the code does, documents
the plugin's /code-modernization:modernize-review command (which writes the
same ledger for people without the pane) and how it differs from the pane's
own /modernize-review, and says which pictures use sample text. 141 engine
tests pass and the type check is clean.
Diffstat (limited to 'plugins/code-modernization/tests/stacks.test.ts')
| -rw-r--r-- | plugins/code-modernization/tests/stacks.test.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/code-modernization/tests/stacks.test.ts b/plugins/code-modernization/tests/stacks.test.ts index b71e2503..873f23a0 100644 --- a/plugins/code-modernization/tests/stacks.test.ts +++ b/plugins/code-modernization/tests/stacks.test.ts @@ -69,9 +69,9 @@ describe('uplift, whatever the stack', () => { // The uplift command takes the two versions from what the person said at the start, and asks when it has none: no placeholder. expect(snapshot.next?.isByHand).toBe(false) expect(snapshot.next?.text).toBe(`${PREFIX}uplift shop`) - expect(snapshot.next?.reason).toContain('compares every result with the baseline') + expect(snapshot.next?.reason).toContain('each compared with the baseline') - expect(oneLineOf(snapshot)).toContain('shop: uplift 5/7 steps done') + expect(oneLineOf(snapshot)).toContain('shop: uplift 5/7 · ') expect(snapshot.percent).not.toBe(null) }) @@ -391,6 +391,11 @@ describe('the pane in another stack', () => { expect(text).toContain('Java 100%') expect(text).toContain('matches baseline') expect(text).toContain('worse than baseline') + // Two rows of modules fit: problems first, then what is finished; what is only edited so far waits behind them. + expect(text).toContain('shop-web worse than baseline') + expect(text).toContain('shop-core matches baseline') + expect(text).not.toContain('shop-batch changed') + expect(text).toContain('… 1 more') expect(text).toContain('/code-modernization:modernize-uplift shop') expect(text).not.toContain('<from>') expect(text).not.toContain('(by hand)') |
