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

DailyBrief · Story
Georgian text turned into mojibake, and I repaired it with a reversed cp1252 table
UTF-8 read as Windows-1252 turned my Georgian task titles into Latin garbage. A Latin-1 round trip cannot undo it, so the fix is cp1252's own table reversed, with guards that never touch good text.
In short
- An older version of my PowerShell scripts read UTF-8 as Windows-1252 and saved the result back as UTF-8, so Georgian text turned into Latin-looking garbage.
- A Latin-1 round trip cannot undo it, because cp1252 maps bytes 0x80-0x9F to characters outside Latin-1, and Georgian UTF-8 is full of those bytes.
- The repair is a reverse table plus two safety checks, and it runs on read, so the files heal themselves.
#encoding#utf-8#electron#powershell#georgian
·5 min read

DailyBrief · Story
I made the wheel pan a kanban board, then cut it down to Ctrl+wheel two months later
A careful wheel handler that scrolled a column first and the board second still felt wrong. I replaced 21 lines with 10 and paid for it with Ctrl+wheel zoom over the board.
In short
- On 25 Aug (dfd8ecd) a plain wheel over the board panned it sideways once the column under the cursor had nothing left to scroll. On 26 Oct (8cf68ae) I replaced that with Ctrl+wheel only.
- The old handler needed a loop up the DOM tree to ask each element whether it could still scroll. The new one has no such guesswork; the commit diff is 10 lines added and 21 removed.
- Ctrl+wheel was already the zoom gesture, so the handler calls preventDefault() and the window loses wheel zoom while the cursor is over the board. I kept that trade and documented it in the zoom hint.
#electron#javascript#ux#scrolling
·5 min read

DailyBrief · Story
My workspace on G: was invisible to DailyBrief, and the fix exposed a 3 minute scan
Every scan root was hardcoded under the user profile, so a workspace on another drive never showed up. Making folders configurable meant fixing a walk that entered every node_modules first.
In short
- The scan roots were a hardcoded list of folders under %USERPROFILE%, so a workspace on another drive was invisible to every script.
- Get-ChildItem -Recurse entered every nodemodules and .git folder and filtered the results afterwards; the source comment in core/walk.ps1 puts that at three minutes per monitor run on G:\Desktop.
- A shared roots.ps1 now feeds every script, a pruned walk never enters dependency folders, and removing a folder no longer triggers a full rescan.
#powershell#filesystem#performance#electron
·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
·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