modscode / Gallery / review-pane
review-pane
Side pane showing the files changed in this conversation as diffs; mark lines, comment, and send the comments back to Claude
What it does
- Draws a pane, toasts
- Adds /changes
- Watches tool calls
- Hooks prompt.submit, session.end, session.start, turn.complete and 3 more
Good points
- No network calls
- Starts no processes
- Written in TypeScript
- Has a desktop-specific branch
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like review-pane by Rudra Secure (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/rudrasecure-review-pane/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Changes" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const length = '…'
const label = '…'
const target = '…'
const name = '…'
return (
<Box flexDirection="column">
<Box flexDirection="column">
<Text bold>
{`${length} file changed`}
{" · Claude is working (comments will steer)"}
</Text>
<Button plain label={`…${label}`} />
<Button plain label={`…${label}`} />
<Button plain label={`…${label}`} />
</Box>
<Text dimColor>
────────
</Text>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Button hotkey="s" variant="primary" label={`➤ Send ${length}`} />
<Button hotkey="x" plain dimColor label="discard all" />
<Button hotkey="c" plain label={`✎ Comment on ${target}`} />
<Button hotkey="p" plain dimColor label="◂ file" />
<Button hotkey="n" plain dimColor label="file ▸" />
<Button hotkey="r" plain dimColor label="refresh" />
<Button hotkey="t" plain dimColor label="plain" />
<Button hotkey="k" plain dimColor label="↑" />
<Button hotkey="j" plain dimColor label="↓" />
<Button hotkey="v" plain dimColor label="unmark" />
<Button hotkey="w" plain dimColor label={`word: ${name}`} />
<Button hotkey="h" plain dimColor label="def" />
<Button hotkey="g" plain dimColor label="go" />
<Button hotkey="f" plain dimColor label="refs" />
</Box>
<Text dimColor wrap="truncate">
click a name for its definition · drag to select · right-click for actions
</Text>
<Text dimColor>
No textual changes (file identical to its original).
</Text>
<Text dimColor>
{`… ${length} more diff rows not shown`}
</Text>
<Text dimColor>
────────
</Text>
</Box>
)
})
on('session.start', async ($, e, next) => {
const length = '…'
await $.ui.toast(`review-pane: no comments to send`)
await $.ui.toast(`Steered ${length} comment(s) into the running turn`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
review-pane/hooks/register.tsx lines 670–829 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const elements = $.ui.resolve(e)
const { Box, Text, Button } = elements
const Input = 'Input' in elements ? elements.Input : undefined
const Code = 'Code' in elements ? elements.Code : undefined
const Markdown = 'Markdown' in elements ? elements.Markdown : undefined
const Client = 'Client' in elements ? elements.Client : undefined
const highlight = (await read($, isHighlighted)) && Code !== undefined
const stored = await read($, lsp)
// A card kept from an older version of the pane has another shape.
const card = stored && typeof stored.symbol === 'object' ? stored : null
const contextMenu = await read($, menu)
const box = await read($, composer)
const list = await read($, files)
const drafts = await read($, comments)
const root = await read($, cwd)
const running = await read($, isTurnRunning)
const width = Math.max(20, e.props.bodyColumns ?? e.viewport?.columns ?? 80)
if (list.length === 0) {
return (
<Box flexDirection="column">
<Text dimColor>No file changes in this conversation yet.</Text>
<Text dimColor>Edits Claude makes with Edit/Write show up here.</Text>
</Box>
)
}
const c = clampCursor(await read($, cursor), list)
const file = list[c.file]!
const allRows = rowsOf(file)
const rows = allRows.slice(0, MAX_ROWS)
const [lo, hi] = selectedRange(c)
const isRange = c.anchor !== null
const fileDrafts = drafts.filter(d => d.path === file.path)
const gutter = String(Math.max(1, ...rows.map(r => (r.kind === 'hunk' ? 0 : (r.newNo ?? r.oldNo ?? 0))))).length
const target = describeLines(rows.slice(lo, hi + 1))
const keySymbol = await cursorSymbol($)
const fileList: FileListProps = {
selected: c.file,
isRunning: running,
files: list.map((f): FileEntry => {
const { added, removed } = countChanges(rowsOf(f))
const shown = relative(f.path, root)
const cut = shown.lastIndexOf('/') + 1
return {
status: f.before === null ? 'A' : f.after === null ? 'D' : 'M',
dir: shown.slice(0, cut),
name: shown.slice(cut),
added,
removed,
comments: drafts.filter(d => d.path === f.path).length,
}
}),
}
const fileButtons = list.map((f, i) => {
const { added, removed } = countChanges(rowsOf(f))
const status = f.before === null ? 'A' : f.after === null ? 'D' : 'M'
const count = drafts.filter(d => d.path === f.path).length
const label = `${i === c.file ? '▸' : ' '} ${status} ${relative(f.path, root)} +${added} -${removed}${count ? ` ✎${count}` : ''}`
return (
<Button
key={`file-${i}`}
plain
dimColor={i !== c.file}
label={label.length > width ? `…${label.slice(label.length - width + 1)}` : label}
onPress={() => selectFile($, i)}
/>
)
})
// ── What sits under a row: its comments, the comment box, a card, a menu.
const inline = new Map<number, RenderElement[]>()
const place = (row: number, element: RenderElement) => inline.set(row, [...(inline.get(row) ?? []), element])
const unplaced: ReviewComment[] = []
const sendLabel =
drafts.length === 1 ? '➤ Send comment to Claude' : `➤ Send all ${drafts.length} comments to Claude`
const editingId = await read($, editing)
const draftCard = (d: ReviewComment): RenderElement =>
editingId === d.id && Input ? (
<Box key={`draft-${d.id}`} flexDirection="column" borderStyle="round" borderColor="blue" paddingX={1}>
<Text color="blue" bold>{`✎ Editing the comment on ${d.lines}`}</Text>
<Input
key={`edit-${d.id}`}
autoFocus
submitLabel="save"
value={editText}
onInput={(text: string) => {
editText = text
}}
onSubmit={(text: string) => saveEdit($, d.id, text)}
/>
<Box flexDirection="row" gap={1}>
<Button key={`save-${d.id}`} variant="primary" label="Save" onPress={() => saveEdit($, d.id, editText)} />
<Button key={`cancel-${d.id}`} label="Cancel" onPress={() => stopEdit($, d.id)} />
</Box>
</Box>
) : (
<Box key={`draft-${d.id}`} flexDirection="column" borderStyle="round" borderColor="yellow" paddingX={1}>
<Text wrap="wrap">
<Text color="yellow" bold>{`✎ ${d.lines} `}</Text>
{d.text}
</Text>
<Box flexDirection="row" gap={2}>
{/* Sends every draft, on every file, as one message. */}
<Button key={`send-${d.id}`} plain label={sendLabel} onPress={() => sendComments($)} />
<Button key={`edit-btn-${d.id}`} plain dimColor label="Edit" onPress={() => startEdit($, d.id)} />
<Button key={`drop-${d.id}`} plain dimColor label="Delete" onPress={() => deleteComment($, d.id)} />
</Box>
</Box>
)
for (const d of fileDrafts) {
const at = commentRow(d, rows)
if (at === undefined) unplaced.push(d)
else place(at, draftCard(d))
}
if (box && Input && rows[box.hi]) {
place(
box.hi,
<Box key="composer" flexDirection="column" borderStyle="round" borderColor="blue" paddingX={1}>
<Text color="blue" bold>{`✎ Comment on ${describeLines(rows.slice(box.lo, box.hi + 1))}`}</Text>
<Input
key="comment"
autoFocus
placeholder="Write a comment for Claude, Enter to add"
submitLabel="add"
value={composerText}
onInput={(text: string) => {
composerText = text
}}
onSubmit={(text: string) => addComment($, text)}
/>
<Box flexDirection="row" gap={1}>
<Button key="composer-add" variant="primary" label="Add comment" onPress={() => addComment($, composerText)} />
<Button
key="composer-cancel"
label="Cancel"
onPress={() => closeComposer($, box.hi)}
/>
</Box>
</Box>,
)
}
if (card && rows[card.symbol.row]) {
place(
card.symbol.row,
<Box key="card" flexDirection="column" borderStyle="round" borderColor={card.isError ? 'red' : 'cyan'} paddingX={1}>
<Box flexDirection="row">
<Box flexGrow={1}>
<Text bold color="cyan">{`${LSP_LABELS[card.operation]} · ${card.symbol.name}`}</Text>
</Box>
<Button key="lsp-close" plain dimColor label="✕" onPress={() => update($, lsp, () => null)} />
</Box>
{card.isBusy ? (
<Text dimColor>Looking it up…</Text>Licence text (MIT)
MIT License Copyright (c) 2026 Rudra Secure Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
reads filesdrives Claudetool calls
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit d408a11fd553 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.review-pane/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.5 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add rudrasecure/claude-mods/plugin install review-pane@claude-modsThis installs the marketplace's latest commit, which may not be the one read here (d408a11fd553). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "rudrasecure-review-pane" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…Fix login▸★ build ok▸★ build ok▸★ build ok+3 moretasks 3 pending · Glob claimed · 3 doneConsensus42%
-
Ask Claude…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
Ask Claude…moai-boardmoai-boardPickedx closebuild 1build 2build 3r refreshQueue not read yetokPick
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claude…
-
Ask Claude…./rows.tsx●●●●●×./rows.tsxnothing loaded yet● Fix login● Fix login● Fix login● Fix login● Fix login● Fix login● Fix login● Fix login● Fix login./rows.tsxWorkspaceWorkspaceWorkspaceselected: build● open in Databricks
-
Ask Claude…build 3 app●●●◉●●okno Library app here yet; Library adds one●./rows.tsx./rows.tsxselected: Nerd