summaryrefslogtreecommitdiff
path: root/plugins/code-modernization
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-09-25 11:28:51 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-09-25 11:28:51 -0700
commit28abd83ad92c24a4107803bd03e510387f2014c2 (patch)
treefc6ae7d04d59751bdbe348f320f50e08eef77ff7 /plugins/code-modernization
parentd49ccb3844876e35262a32f145b7b717646da733 (diff)
code-modernization: rename the pane's rule review command to /modernize-review-pane
The pane's bare /modernize-review took the name of the plugin's own review command, so typing the short form in a pane-enabled session opened the pane's cards instead of the pop-up review. The pane's version is now /modernize-review-pane, and /modernize-review always runs the plugin command. Both still write the same review file.
Diffstat (limited to 'plugins/code-modernization')
-rw-r--r--plugins/code-modernization/commands/modernize-review.md2
-rw-r--r--plugins/code-modernization/hooks/README.md4
-rw-r--r--plugins/code-modernization/hooks/register.ts6
-rw-r--r--plugins/code-modernization/hooks/state.ts2
-rw-r--r--plugins/code-modernization/hooks/views/deck.tsx2
-rw-r--r--plugins/code-modernization/tests/mount.test.ts2
-rw-r--r--plugins/code-modernization/tests/register.test.ts14
7 files changed, 16 insertions, 16 deletions
diff --git a/plugins/code-modernization/commands/modernize-review.md b/plugins/code-modernization/commands/modernize-review.md
index fec44883..e3805481 100644
--- a/plugins/code-modernization/commands/modernize-review.md
+++ b/plugins/code-modernization/commands/modernize-review.md
@@ -21,7 +21,7 @@ Use the AskUserQuestion tool, never chat text, up to four rules per call. One qu
## 3 — Record
-Merge the answers into `analysis/$system/RULE_REVIEWS.json`, the same file the live progress pane's review deck writes:
+Merge the answers into `analysis/$system/RULE_REVIEWS.json`, the same file the live progress pane's review deck (`/modernize-review-pane`) writes:
```json
{ "system": "<name>", "version": 1, "reviews": {
diff --git a/plugins/code-modernization/hooks/README.md b/plugins/code-modernization/hooks/README.md
index d31424ae..a44bb432 100644
--- a/plugins/code-modernization/hooks/README.md
+++ b/plugins/code-modernization/hooks/README.md
@@ -107,7 +107,7 @@ the workspace root is told where the file is under the legacy root. The pane lis
*The reviewer's note and the verdicts on this card are samples typed for the picture.*
-`/modernize-review [flagged|p0|all] [filter]` pages through rule cards in the band above the prompt: the rule, its citation,
+`/modernize-review-pane [flagged|p0|all] [filter]` pages through rule cards in the band above the prompt: the rule, its citation,
Given / When / Then, the suspected defect, the question for an SME, and, once a rule has a verdict, the verdict and the
reviewer's note. From an empty prompt: `1` confirms, `2` marks the rule wrong, `3` sends it to discussion, `4` goes back,
`5` skips, `6` shows the cited legacy lines, `7` takes a verdict back and `0` closes the deck.
@@ -161,7 +161,7 @@ seconds while idle.
| | |
|---|---|
| `/modernize-panel [open\|close\|json]` | Show or hide the pane (the same switch as its **hide** and **show pane** buttons); `json` prints the reading it draws from. |
-| `/modernize-review [flagged\|p0\|all] [filter]` | The review deck. `flagged` (default) is the P0 rules with a defect, an SME note or less than High confidence. The filter matches an id, a domain, a title or a cited file. Not the same as `/code-modernization:modernize-review`, the plugin command that asks in pop-ups and works without the pane. |
+| `/modernize-review-pane [flagged\|p0\|all] [filter]` | The review deck. `flagged` (default) is the P0 rules with a defect, an SME note or less than High confidence. The filter matches an id, a domain, a title or a cited file. Not the same as `/code-modernization:modernize-review`, the plugin command that asks in pop-ups and works without the pane. |
| `/modernize-sign [name, role]` | Sign the brief's approval block. |
## Pane options
diff --git a/plugins/code-modernization/hooks/register.ts b/plugins/code-modernization/hooks/register.ts
index 9a1be96f..cbb5cbd3 100644
--- a/plugins/code-modernization/hooks/register.ts
+++ b/plugins/code-modernization/hooks/register.ts
@@ -731,8 +731,8 @@ export function register(on: On, raw: PluginOptions) {
.catch(() => undefined),
host
.registerCommand({
- name: 'modernize-review',
- description: 'Review business rules one card at a time: confirm, wrong, or discuss',
+ name: 'modernize-review-pane',
+ description: 'Review business rules one card at a time in the pane: confirm, wrong, or discuss',
argumentHint: '[flagged|p0|all] [filter]',
})
.catch(() => undefined),
@@ -1023,7 +1023,7 @@ export function register(on: On, raw: PluginOptions) {
return { text: opened.isPlaced ? 'Modernization pane shown' : `The pane could not be shown: ${opened.reason}` }
})
- on('command.run', { command: 'modernize-review' }, async ($, e, next) => {
+ on('command.run', { command: 'modernize-review-pane' }, async ($, e, next) => {
const host = state.host
if (host === null) {
diff --git a/plugins/code-modernization/hooks/state.ts b/plugins/code-modernization/hooks/state.ts
index 5fbf71cc..3162f7a9 100644
--- a/plugins/code-modernization/hooks/state.ts
+++ b/plugins/code-modernization/hooks/state.ts
@@ -10,7 +10,7 @@ import type { Rule } from './reader/rules'
import type { DeckScope } from './review/deck'
export const PANE_ID = 'modernize'
-export const DECK_ID = 'modernize-review'
+export const DECK_ID = 'modernize-review-pane'
export const SIGN_ID = 'modernize-sign'
export const RASTER_KEY = 'estate'
export const PLUGIN_NAME = 'code-modernization'
diff --git a/plugins/code-modernization/hooks/views/deck.tsx b/plugins/code-modernization/hooks/views/deck.tsx
index e25f30aa..53d42cb0 100644
--- a/plugins/code-modernization/hooks/views/deck.tsx
+++ b/plugins/code-modernization/hooks/views/deck.tsx
@@ -101,7 +101,7 @@ export function deckView(
<Box flexDirection="column">
<Text bold color={HEAD}>Rule review</Text>
<Text dimColor wrap="truncate-end">
- {`Nothing to review among ${SCOPE_WORDS[deck.scope]}${deck.filter !== '' ? ` matching "${deck.filter}"` : ''}. Try /modernize-review all.`}
+ {`Nothing to review among ${SCOPE_WORDS[deck.scope]}${deck.filter !== '' ? ` matching "${deck.filter}"` : ''}. Try /modernize-review-pane all.`}
</Text>
<Button key="close" hotkey="0" plain onPress={actions.close}>close</Button>
</Box>
diff --git a/plugins/code-modernization/tests/mount.test.ts b/plugins/code-modernization/tests/mount.test.ts
index de4da75b..4c70f28d 100644
--- a/plugins/code-modernization/tests/mount.test.ts
+++ b/plugins/code-modernization/tests/mount.test.ts
@@ -72,7 +72,7 @@ describe('what the plugin draws is accepted by the terminal', () => {
expect(await accepted($)({ ...BAND, plugin: PLUGIN })).toBe('terminal')
- await $.command.run(command('modernize-review', 'all'))
+ await $.command.run(command('modernize-review-pane', 'all'))
await $.ui.render(BAND)
await $.ui.press({ plugin: PLUGIN, key: 'prev' })
diff --git a/plugins/code-modernization/tests/register.test.ts b/plugins/code-modernization/tests/register.test.ts
index e1dbce63..92403d4f 100644
--- a/plugins/code-modernization/tests/register.test.ts
+++ b/plugins/code-modernization/tests/register.test.ts
@@ -15,7 +15,7 @@ describe('start and pane', () => {
mock.clock(on)
await $.session.start(SESSION)
- expect(world.commands.sort()).toEqual(['modernize-panel', 'modernize-review', 'modernize-sign'])
+ expect(world.commands.sort()).toEqual(['modernize-panel', 'modernize-review-pane', 'modernize-sign'])
expect(world.opened).toEqual([])
})
@@ -196,7 +196,7 @@ describe('start and pane', () => {
await $.tool.call({ tool: 'Bash', command: 'mvn -q test', agentId } as never)
}
- await $.command.run(command('modernize-review', 'all'))
+ await $.command.run(command('modernize-review-pane', 'all'))
const allowed = /^(#[0-9a-f]{6}|suggestion|success|error|warning|claude|inactive|subtle|text)$/
@@ -410,7 +410,7 @@ describe('a busy fleet', () => {
})
describe('review deck', () => {
- test('/modernize-review draws the first flagged card in the band, and a digit decides it', async ($, on) => {
+ test('/modernize-review-pane draws the first flagged card in the band, and a digit decides it', async ($, on) => {
const world = worldOf(on, FULL)
const clock = mock.clock(on)
@@ -418,7 +418,7 @@ describe('review deck', () => {
await $.session.start(SESSION)
expect(textOf(await $.ui.render(BAND)), 'closed: the band holds only the bar that shows the pane').toContain('show pane')
- expect(await $.command.run(command('modernize-review'))).toEqual({ text: 'Reviewing 2 rules.' })
+ expect(await $.command.run(command('modernize-review-pane'))).toEqual({ text: 'Reviewing 2 rules.' })
const card = await $.ui.render(BAND)
const text = textOf(card)
@@ -448,7 +448,7 @@ describe('review deck', () => {
worldOf(on, FULL)
mock.clock(on)
await $.session.start(SESSION)
- await $.command.run(command('modernize-review', 'all'))
+ await $.command.run(command('modernize-review-pane', 'all'))
for (const maxRows of [12, 16, 20, 30]) {
const input = { ...BAND, props: { ...BAND.props, maxRows } }
@@ -470,7 +470,7 @@ describe('review deck', () => {
on('ui.render', () => ({ type: 'Text', children: ['engine'] }))
await $.session.start(SESSION)
- await $.command.run(command('modernize-review', 'all'))
+ await $.command.run(command('modernize-review-pane', 'all'))
await $.ui.render(BAND)
await $.ui.press({ plugin: NAME, key: 'prev' })
@@ -531,7 +531,7 @@ describe('review deck', () => {
mock.clock(on)
on('ui.render', () => ({ type: 'Text', children: ['engine'] }))
await $.session.start(SESSION)
- await $.command.run(command('modernize-review', 'p0'))
+ await $.command.run(command('modernize-review-pane', 'p0'))
await $.ui.render(BAND)
await $.ui.press({ plugin: NAME, key: 'close' })