spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

diff: toasts show while the pane is openBrowse files
The pane and the dialog were opened with holdToasts, which holds every toast while the pane is shown: other plugins' and the app's own, as this plugin's. Nothing in the mod relies on the hold, and a toast no longer lands between the pane and the prompt, so the option goes from both opens.
Alice Poteat authored 20 days ago parent 1c229fc · commit ac350125ec0e
4 changed files+4 -9compared with 1c229fc
Mmods/diff/README.md
Mmods/diff/hooks/register.ts
Mmods/diff/tests/register.test.ts
Mmods/diff/tests/views.test.ts
@@ -37,8 +37,8 @@
3737 `ui.focus` and re-centres the rows as the built-in does), the key hints;
3838 Enter shows that file's hunks alone,
3939 Escape backs out to the list and then closes, leaving `Diff dialog
40-dismissed`; toasts are held while it is up. A file's ask button arms that
41-file: its hunks ride the next prompt as context, once.
40+dismissed`; toasts show while it is up, as beside the docked pane. A file's
41+ask button arms that file: its hunks ride the next prompt as context, once.
4242
4343 The pane compares the working tree against HEAD, split at the session's
4444 start (the default; the start the engine gives in `$.session.usage()`, so a
@@ -180,7 +180,6 @@
180180 return {
181181 id: Names.PANE_ID,
182182 title: Names.PANE_TITLE,
183- holdToasts: true,
184183 closeOnEscape: true,
185184 rows: Views.dialogRowsOf(model),
186185 }
@@ -439,7 +438,7 @@
439438 const opened = await engine.openPane(
440439 isDialog
441440 ? { ...dialogPane(), focus: true }
442- : { id: Names.PANE_ID, title: Names.PANE_TITLE, holdToasts: true },
441+ : { id: Names.PANE_ID, title: Names.PANE_TITLE },
443442 )
444443
445444 const isWaiting = isRecord(opened) && opened.isPlaced === false
@@ -358,9 +358,7 @@
358358 '--show-toplevel',
359359 )
360360
361- expect(world.opened).toEqual([
362- { id: 'diff', title: 'Diff', holdToasts: true },
363- ])
361+ expect(world.opened).toEqual([{ id: 'diff', title: 'Diff' }])
364362
365363 await world.clock.advance(Fixtures.SETTLE_MS)
366364
@@ -380,7 +378,6 @@
380378 expect(world.opened[0]).toEqual({
381379 id: 'diff',
382380 title: 'Diff',
383- holdToasts: true,
384381 closeOnEscape: true,
385382 rows: expect.any(Number),
386383 focus: true,
@@ -290,7 +290,6 @@
290290 expect(world.opened.at(-1), 'sized to its rows once listed').toEqual({
291291 id: 'diff',
292292 title: 'Diff',
293- holdToasts: true,
294293 closeOnEscape: true,
295294 rows: 8,
296295 })