Repository navigation
DSH Shell for Windows — v0.2.0
The first release that is actually usable end to end: a start that fails now tells
you why, a crashed dsh is brought back, and the window behaves like a window while
it is loading.
A failed start shows the evidence, and can be retried
When the port is taken, the window used to set two lines of text and stop — so a
deliberate refusal to end somebody else's process looked exactly like a hang. It
now shows which PID holds the port, its command line, and the verdict on
whether it is ours, with Retry and Close leftovers and retry.
Scoped to our own port: listing every node.exe on the machine would be mostly
irrelevant processes with alarming names, and the one that matters would be buried.
The orphan reclaim works — and now runs before every respawn
dsh.cmd is an npm shim, so the node.exe holding the port is a child of a
cmd.exe that stays alive as long as the dsh does. "Does it have a living
parent" was therefore true for every real orphan, and the reclaim never fired.
It now walks the whole ancestor chain and asks whose ancestor is alive: our own
shim is ours to step over, anything else alive means somebody is using it, and the
first dead parent is the break.
Under that sat a second defect: Windows reports command-line separators
doubled, so the harness marker never matched and every real dsh was refused as
"not the dsh this shell is configured to".
The reclaim now also runs before every spawn, not just at start-up: waiting
cannot free a process nobody is supervising, so a respawn that skipped it met the
same leftover and failed the same way.
The restart ladder survives a crash loop and a failed respawn
- A failed respawn consumes a budget unit and continues into the next
back-off, instead of ending the ladder — oneEADDRINUSEfrom a still-draining
socket was enough to produce an error page. - The budget resets on uptime (60s), not on the URL line, so a dsh that
announces its endpoint and dies immediately is not forgiven forever. - Spending the budget shows the failure page, with the reason and the attempt
count, instead of leaving the window on a dead page.
The window can be dragged while dsh loads
On the dsh page the contract paints the caption's drag strip. The shell's own boot
page is not dsh and had none, so the window could be resized but not moved until
dsh arrived. The shell now paints that band itself, on the boot page only.
Zoom is the webview's, and the readout follows a hotkey
The caption menu lists the whole 50%–200% ladder in 10% steps, with the current
rung ticked and a reset to 100%. Ctrl+−/=/0 work and are Chromium's own.
A chosen zoom survives a restart.
The status line's percentage is kept on the page rather than echoing the config:
the shell pushes a known zoom before the script runs, so the page measures the
display scale from that one point and derives every later zoom from it. A Ctrl+=
moves the readout instead of leaving it stale.
The icon is dsh's own whale, on a measured plate
The mark comes from dsh's FISH_LOGO_PATH on its FISH_LOGO_VIEWBOX — the
same geometry the macOS shell draws — rather than from dsh's favicon, which is a
different path that sat about two percent off. scripts/extract-dsh-whale.py
refreshes it from an installed dsh and commits both the geometry and the rasterised
mask, so the build needs no dsh.
The plate's colour is sampled from the supplied background, and its corner was
measured against the supplied reference: candidates rendered at the reference's
own 30px size and compared row by row give a 20% circular radius that reproduces the
reference exactly, where 12% and 22% do not.
Also
- The menu button's bars no longer change thickness with the zoom (fractional CSS
heights antialias differently at every scale); they are stroked SVG now. - The menu panel scrolls on a short window and brings the ticked rung into view.
auto_restart_on_crashis a real field: bounded to three attempts with
back-off, budget reset after a minute of uptime.
Verification
122 hermetic tests against stub-dsh, cargo clippy --all-targets -- -D warnings
clean, cargo build --release clean. The reclaim was verified end to end against a
real orphan holding port 3080; the restart ladder against a new
crash-after-ready stub (three attempts at 2s/4s/8s, then the failure page, port
free and no leftover); and the boot-page drag by synthesising a drag and watching
the window's rectangle change.
Install
DSH.Shell_0.2.0_x64-setup.exe— NSIS, per-user, no admin needed (recommended)DSH.Shell_0.2.0_x64_en-US.msi— MSI for managed installs
Requires the WebView2 Runtime (preinstalled on Windows 11) and dsh on PATH.