modscode / Gallery / while-you-wait
while-you-wait
While Claude works, the side panel lists what you can do meanwhile on GitHub: pull requests waiting for your review (with the diff and a quick pre-review), your own pull requests that need you, issues assigned to you.
What it does
- Draws a pane
- Adds /wait
- Hooks session.start, turn.complete, turn.start
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Writes no files
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 while-you-wait by XYZ Makes (pane, status), as modscode read it from the mod's code:
// https://modscode.com/gallery/xyzbuilds-while-you-wait/
// 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: "While you wait" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Link, Text } = $.ui.resolve(e)
const url = '…'
const title = '…'
const meta = '…'
const problem = '…'
const summary = '…'
const length = '…'
const more = '…'
const path = '…'
const added = '…'
const removed = '…'
const path2 = '…'
const added2 = '…'
const removed2 = '…'
const path3 = '…'
const added3 = '…'
const removed3 = '…'
return (
<Box flexDirection="column" paddingX={1}>
<Box flexDirection="row" gap={1}>
<Button label="← Back" />
<Link href={`${url}`} label="Open on GitHub" />
<Button label="Pre-review" variant="primary" />
</Box>
<Text dimColor>
────────
</Text>
<Text bold wrap="wrap">
{title}
</Text>
<Text dimColor wrap="wrap">
{meta}
</Text>
<Text dimColor>
Loading the diff…
</Text>
<Text dimColor>
Reading the diff for a pre-review…
</Text>
<Text color="red">
{problem}
</Text>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="row" gap={1}>
<Text bold color="magenta">
PRE-REVIEW
</Text>
<Text dimColor>
Haiku, first pass
</Text>
</Box>
<Text wrap="wrap">
{summary}
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Text dimColor>
────────
</Text>
<Box flexDirection="row" gap={1} marginBottom={1}>
<Text bold color="blue">
FILES
</Text>
<Text dimColor>
{`${length}${more}`}
</Text>
</Box>
<Box flexDirection="column" marginBottom={1}>
<Box flexDirection="row" gap={1}>
<Text bold wrap="truncate-middle">
{path}
</Text>
<Text color="green">
+
{added}
</Text>
<Text color="red">
−
{removed}
</Text>
</Box>
<Text dimColor>
No text changes (binary or renamed).
</Text>
<Text dimColor>
The rest of this file is on GitHub.
</Text>
</Box>
<Box flexDirection="column" marginBottom={1}>
<Box flexDirection="row" gap={1}>
<Text bold wrap="truncate-middle">
{path2}
</Text>
<Text color="green">
+
{added2}
</Text>
<Text color="red">
−
{removed2}
</Text>
</Box>
<Text dimColor>
No text changes (binary or renamed).
</Text>
<Text dimColor>
The rest of this file is on GitHub.
</Text>
</Box>
<Box flexDirection="column" marginBottom={1}>
<Box flexDirection="row" gap={1}>
<Text bold wrap="truncate-middle">
{path3}
</Text>
<Text color="green">
+
{added3}
</Text>
<Text color="red">
−
{removed3}
</Text>
</Box>
<Text dimColor>
No text changes (binary or renamed).
</Text>
<Text dimColor>
The rest of this file is on GitHub.
</Text>
</Box>
<Text dimColor>
{more}
{" more files on GitHub."}
</Text>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/register.tsx lines 287–342 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const queue = await read($, queueAtom)
const detail = await read($, detailAtom)
const seen = await read($, seenAtom)
const now = await $.clock.now()
const rule = '─'.repeat(Math.max(20, e.props.bodyColumns - 2))
if (detail) return detailView($, e, detail, rule)
const { Box, Text, Button } = $.ui.resolve(e)
const hint = hintOf(queue, seen)
const sections: ReturnType<typeof cardView>[] = []
if (queue.reviews.length) {
sections.push(heading($, e, 'REVIEW REQUESTED', queue.reviews.length, 'yellow', sections.length === 0, rule))
for (const pr of queue.reviews) {
const meta = `${pr.repo}#${pr.number} · by ${pr.author} · +${pr.additions} −${pr.deletions} in ${pr.files} files · ${agoText(pr.updatedAt, now)}${pr.isDraft ? ' · draft' : ''}`
const pick = { url: pr.url, title: pr.title, meta }
sections.push(cardView($, e, `r-${pr.url}`, pr.title, meta, pr.url, [{ label: 'Diff', run: () => showDiff($, pick) }]))
}
}
if (queue.mine.length) {
sections.push(heading($, e, 'YOUR PULL REQUESTS', queue.mine.length, 'magenta', sections.length === 0, rule))
for (const pr of queue.mine) {
const fresh = newTalk(pr, seen)
const meta = `${pr.repo}#${pr.number} · ${STATE_TEXT[pr.state]}${fresh ? ` · ${fresh} new comment${fresh === 1 ? '' : 's'}` : ''} · ${agoText(pr.updatedAt, now)}`
sections.push(cardView($, e, `m-${pr.url}`, pr.title, meta, pr.url, []))
}
}
if (queue.issues.length) {
sections.push(heading($, e, 'ASSIGNED ISSUES', queue.issues.length, 'blue', sections.length === 0, rule))
for (const issue of queue.issues) {
sections.push(cardView($, e, `i-${issue.url}`, issue.title, `${issue.repo}#${issue.number} · ${agoText(issue.updatedAt, now)}`, issue.url, []))
}
}
return (
<Box flexDirection="column" paddingX={1}>
<Box flexDirection="row" justifyContent="space-between">
<Text bold>👀 While you wait</Text>
<Text dimColor>{queue.fetchedAt ? `updated ${agoText(new Date(queue.fetchedAt).toISOString(), now)}` : 'loading…'}</Text>
</Box>
<Text dimColor>{rule}</Text>
{queue.problem && <Text color="red">{queue.problem}</Text>}
{!hint && !queue.problem && queue.fetchedAt > 0 && (
<Box flexDirection="column" alignItems="center" marginY={1}>
<Text dimColor>Nothing waiting for you on GitHub.</Text>
</Box>
)}
{sections}
<Text dimColor>{rule}</Text>
<Box flexDirection="row" gap={1}>
<Button key="refresh" label="Refresh" onPress={() => refresh($)} />
<Text dimColor>{config.onlyThisRepo ? `this repository only${repo ? ` (${repo})` : ''}` : 'all your repositories'}</Text>
</Box>
</Box>
)
})hooks/register.tsx lines 184–237 · Pane
function detailView($: EngineInterface, e: View, detail: Detail, rule: string) {
const { Box, Text, Button, Code, Link } = $.ui.resolve(e)
return (
<Box flexDirection="column" paddingX={1}>
<Box flexDirection="row" gap={1}>
<Button key="back" label="← Back" onPress={() => setDetail($, null)} />
{e.surface === 'mobile' ? <Link href={detail.url} label="Open on GitHub" /> : <Button key="detail-open" label="Open" onPress={() => openUrl($, detail.url)} />}
{!detail.summary && !detail.busy && !detail.problem && <Button key="pre-review" label="Pre-review" variant="primary" onPress={() => preReview($)} />}
</Box>
<Text dimColor>{rule}</Text>
<Text bold wrap="wrap">
{detail.title}
</Text>
<Text dimColor wrap="wrap">
{detail.meta}
</Text>
{detail.busy === 'diff' && <Text dimColor>Loading the diff…</Text>}
{detail.busy === 'summary' && <Text dimColor>Reading the diff for a pre-review…</Text>}
{detail.problem && <Text color="red">{detail.problem}</Text>}
{detail.summary && (
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="row" gap={1}>
<Text bold color="magenta">PRE-REVIEW</Text>
<Text dimColor>Haiku, first pass</Text>
</Box>
<Text wrap="wrap">{detail.summary}</Text>
</Box>
)}
{detail.files.length > 0 && (
<Box flexDirection="column" marginTop={1}>
<Text dimColor>{rule}</Text>
<Box flexDirection="row" gap={1} marginBottom={1}>
<Text bold color="blue">FILES</Text>
<Text dimColor>{detail.files.length + detail.more}</Text>
</Box>
{detail.files.map((file, i) => (
<Box key={`f-${i}`} flexDirection="column" marginBottom={1}>
<Box flexDirection="row" gap={1}>
<Text bold wrap="truncate-middle">
{file.path}
</Text>
<Text color="green">+{file.added}</Text>
<Text color="red">−{file.removed}</Text>
</Box>
{file.hunks ? <Code source={file.hunks} format="diff" path={file.path} /> : <Text dimColor>No text changes (binary or renamed).</Text>}
{file.isCut && <Text dimColor>The rest of this file is on GitHub.</Text>}
</Box>
))}
{detail.more > 0 && <Text dimColor>{detail.more} more files on GitHub.</Text>}
</Box>
)}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 XYZ Makes LLC 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
runs programsdrives Clauderemembers
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 8a0ee9a783c6 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.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.2 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.its repository's .claude-plugin/marketplace.json does not list it: no install line to give |
| 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.hooks/register.tsx:60 a program named at run time; hooks/register.tsx:106 a program named at run time |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches the network, but reads no files and no environment variables |
| 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's .claude-plugin/marketplace.json does not list it, so there is no install line to give. Read it as code, or follow its author's README.
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 "xyzbuilds-while-you-wait" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…CIcross Bash · Classicmain · a1b2c3d · failed at 14:32Open the run on GitHubFix it fClose x
(no log available)
-
✦ explain as pick how Claude answers×3 ● build3 ● build3 ● build▸ VideoAsk Claude…
-
Ask Claude…Could not fetch PRs: PortuguesePR Inbox▍readbuildFix login━━━━━━━━Koreanq buildStill fetching · q goes back
-
Ask Claude…AttemptsPlain3 attempts from src/ · nothing is applied until you press AdoptDiff of StealthHide+ src/app.ts
Footer label+ src/app.tsFooter label+ src/app.tsClassic more files not shown: open the worktree to see them.Footer labelClose x -
Ask Claude…GitHub inboxGitHubloading…Refresh rbuildbuildbuildClose xStealth IssuesNo open issues in this view.#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopenPull requestsNo open pull requests.#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopenChecks for #3Plain
-
Ask Claude…Gitbranch main · Pinned notice · 0, 0 untracked, 0 staged× git failed► Hint lineRefresh rStage all aCommit Ghost cClose xWorking tree clean.Fix loginMonoGenerate gCommitTop rowHint linesrc/app.tsbinDiffStageUnstageRevertTop rowHint linesrc/app.tsbinDiffStageUnstageRevertTop rowHint line… 3 moresrc/app.tsbinDiffStageUnstageRevertsrc/app.tsClosebuild (cut to fit)
Plainbuild (cut to fit)Plainbuild (cut to fit)MinimalMinimalMinimalPlain