Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
15 posts · #electron
Clear filters·5 min read

DailyBrief · Story
My task check said nothing happened, but git evidence was failing silently
A baseline..HEAD range missed feature branches, broke after an amend, and one stderr line under PowerShell 5.1 threw away a task's whole diff. Here is how I rebuilt the evidence.
In short
- The task check built its git evidence from <baseline sha>..HEAD, which misses feature branches, breaks silently after an amend or rebase, and resets every time a check runs.
- Under PowerShell 5.1 with $ErrorActionPreference = 'Stop', one stderr line from git ("unknown revision") became a terminating error and discarded the whole scan diff.
- The fix keeps two baselines, reads every local branch, bounds the window by time as well as by sha, relinks moved folders by root commit, and ships with a digest-only mode and a fixture script.
#powershell#git#debugging#electron
·5 min read

DailyBrief · Story
The app blamed the claude CLI, but my migration had swallowed an ENOENT
A fresh DailyBrief 1.7.0 account reported 'claude CLI wrote no log'. The CLI was fine: a migration copied into a folder that did not exist and a catch hid the error.
In short
- 1.7.0 moved user data into a per-user data folder, but the migration copied into a directory that did not exist yet. ENOENT was thrown and then swallowed by a catch.
- Every run on a fresh or migrated account then died inside Get-Content on a missing file, before it could open a log, so the app blamed the claude CLI.
- The fix creates the destination first, seeds the files the scripts read unconditionally, and makes the scripts treat a missing board as an empty one.
#electron#powershell#error-handling#migration#debugging
·6 min read

Parallel AI checks kept overwriting my kanban board, so I added a lock and a merge
Several AI runs and the page saved the same kanban.json, and the last writer won. A shared lock file was not enough, so saves became a three-way merge.
In short
- Parallel AI checks and the user's own board saves all did read-modify-write on the same kanban.json, so the last writer dropped everyone else's changes.
- I added one lock file that both Node and PowerShell take, and a three-way merge so a page save is merged with what the scripts wrote meanwhile instead of overwriting it.
- If the lock cannot be taken, nothing is written and the user sees an error, because an unlocked write is exactly the bug being fixed.
#electron#concurrency#file-locking#powershell
·5 min read

DailyBrief · Story
A stray PowerShell error turned my digest into 391 MB
One unsuppressed script call inside a foreach expression put a .NET error object into DailyBrief's digest. The same commit fixed a Georgian text repair that had never worked.
In short
- A call inside a foreach expression leaked an error object into the captured array, and ConvertTo-Json serialized its whole object graph.
- The fix is $null = ... 2>$null, plus a comment so nobody removes it.
- fixMojibake inverted a cp1252 corruption with latin1, so it always rejected its own output.
#powershell#debugging#encoding#electron
·5 min read

DailyBrief · Story
A 72 MB upload kept dying, so I moved releases off my laptop
Pushing the DailyBrief installer from a home uplink took 14 minutes or ended in ECONNRESET, and left tags with no files. A tag-triggered GitHub Actions workflow made the upload local.
In short
- electron-builder created the release first and then died uploading the installer, leaving a tag with no assets.
- A GitHub Actions workflow now builds, tests and publishes on a runner that sits inside GitHub's network.
- scripts/publish-assets.js stays as a manual repair path, with the sha512 the updater checks and retries on every upload.
#github-actions#electron#ci#auto-update
·8 min read

Simple Video Compressor: an Electron app around FFmpeg and NVENC
A small Windows app that shrinks videos with FFmpeg. The interesting parts: GPU encoder selection, presets that mean different things on NVENC, and a live size estimate built from FFmpeg's stderr.
In short
- The app picks an NVENC or AMF encoder only if the bundled FFmpeg build lists it, and otherwise falls back to libx264 or libx265.
- The UI offers x264 presets such as ultrafast and veryslow, so the hardware path whitelists its own preset names and falls back to default for anything else.
- The v2 redesign (b899b60, Mar 2026) replaced a file-size poll with FFmpeg's own size= output and shows an estimated final size from two blended estimators.
#electron#ffmpeg#javascript#desktop-app
·13 min read

DailyBrief: a personal AI advisor on the desktop with PowerShell
A 391 MB digest, a mojibake fix that never worked, and a 30k-token baseline cut to 1.2k: the real bugs behind DailyBrief, a desktop AI advisor built on PowerShell and a headless Claude CLI.
In short
- The unit of planning is the project, not the folder: a registry rebuilt every 30 minutes with no AI involved.
- Scripts gather and compress activity into a small digest, the model returns a small JSON patch, and a script applies it.
- A stripped claude -p session cut the recorded per-call baseline from about 30k tokens to about 1.2k.
#ai#powershell#electron#claude