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

Desktop Grid · Story
Why a Desktop Grid zone looked right while dragging and re-inflated after the drop
Deleted icons stayed in a pinned zone's kept list forever, and the icon-hugging border kept stretching toward their old spots. A 5-tick grace period fixed it.
In short
- A pinned zone keeps a list of icon positions, and a deleted or renamed icon stayed in that list forever.
- The border draws itself around every kept position, so a ghost icon far from the zone re-inflated the border after each drop.
- Entries missing for 5 consecutive enforcement ticks, about 10 seconds, are now forgotten, and auto-fit zones re-fit when that happens.
#python#pyside6#windows#debugging
·5 min read

A publish step that never worked, because headless Claude has no Artifact tool
DailyBrief asked a headless CLI run to use a tool it does not have. The rewrite builds the markdown in PowerShell, serializes every argument itself and treats the model's reply as untrusted.
In short
- The old publisher told a headless claude -p run to use the Artifact tool, which a headless session does not have, so it never worked.
- The new one builds the markdown in PowerShell, serializes every tool argument itself, and gives a small model only the job of passing them on.
- Everything the model returns is treated as untrusted: the doc link is stored only if it is plausible, and the body id only if it matches an id pattern.
#claude-cli#powershell#automation#llm
·5 min read

DailyBrief · Story
The brief warned about a missing guard that the code already had
A model reading only commit subjects concluded a bulk delete had no confirmation. The code had a dialog, a 200-row cap and an audit row. The fix was a rule: absence is not evidence.
In short
- The brief reads one digest of commit subjects, never code, and it warned about a missing guard because no subject mentioned one.
- That is an inference from silence: the guard existed, but nothing in the pipeline could ever have shown it.
- Both prompts that write warnings now require evidence present in the digest, and an unverified concern goes into questions.
#llm#prompt-engineering#debugging#dailybrief
·6 min read

TaskPad · Story
TaskPad icons would not line up: one shared frame, then the checkbox column
AvalonEdit puts inline elements at the top of the line, so badges and checkboxes drifted. Two commits fixed it: a shared vertical frame, then a horizontal column.
In short
- AvalonEdit places inline elements at the top of the text line, and a line's top depends on its tallest element, so icons of different heights drifted vertically.
- Commit 525a0a8 added Align.Host, one shared frame for every inline icon, centred on the middle of the capital letters; commit 270faef then made tag icons share the checkbox's three-cell column.
- To do that the parser's tag token now swallows one trailing space, so the text starts at the fifth cell, like [ ] text.
#wpf#avalonedit#csharp#ui-alignment
·5 min read

DailyBrief's run estimate averaged two programs, so I switched to a median by kind
The pre-run cost estimate averaged the last 10 runs, including ones from before the lean runner and slow outliers. A median over same-kind lean runs fixed it, with tests.
In short
- estimateRun averaged the last 10 ok runs of a mode, mixing pre-lean runs, slow outliers, and per-project checks with whole-board checks.
- The replacement is a pure module, src/estimate.js: lean-era runs only, the median of the newest 9, and runs of the same kind when there are at least 2 of them.
- Seed defaults were re-measured per kind of check, and five node:test cases pin the behaviour.
#javascript#electron#testing#estimation
·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
·4 min read

TaskPad · Story
TaskPad comment editing threw because WPF panels do not allow Children[i] = x
The edit button swapped a TextBlock for a TextBox by assigning into a panel's Children by index. WPF throws on that. RemoveAt then Insert fixed it, and copy plus a right-click menu came along.
In short
- Comment editing replaced a TextBlock with a TextBox by assigning into the panel's Children collection by index, which WPF does not allow.
- The fix removes the old element at its index and inserts the box at the same index, which keeps the position.
- While in there I moved delete into a local function so a toolbar button and a new right-click menu share one code path, and added copy with a short check mark as feedback.
#wpf#csharp#desktop#bugfix#ui
·5 min read

Desktop Grid · Story
My auto-fit zone never grew: enforcement put the icon back first
In Desktop Grid, dragging an icon out of an auto-fit zone made it snap back, so the zone never re-fit. Two correct features cancelled out; a ten-line branch fixed it.
In short
- Pinned zones keep their icons inside via a periodic enforcement loop that puts any escaped icon back at its remembered position.
- Auto-fit zones are meant to grow to wrap their icons, but enforcement returned the icon before the zone ever saw it outside, so the zone never re-fit.
- For auto-fit zones the loop now accepts the new position, updates the remembered one and re-fits the border; the enforcement interval went from 4 s to 2 s.
#python#qt#windows#state#debugging