Not on the backlog
Small, fast changes let me fix things our backlog would never have gotten to, starting with a dialog that jumped four times.
I work on a large, long-lived legacy application. My work used to come from the backlog: one large feature, built mostly in one long push. Recently I started making small changes at a rapid clip instead, through agentic development. The technical choices now matter less to me than the experience of using our application.
So I don't tell the agent how to build something. I state the north star, let it present the choices, and pull the best thread, as Jack says. I get less bogged down, and I can focus on whether the output is correct and the direction is clear.
Then I ask for proof. Thorsten Ball's go-to request is "give me irrefutable proof that this works." The agent can decide how. A video of your application running the code is solid evidence. So are side-by-sides of before and after, recorded with Playwright. You get to use your brain and decide what's correct.
Working this way, I can more fully consider the application, and get to improvements we didn't have in scope and wouldn't have prioritized.
Here's what that looks like in practice. It starts with a button.
Late last week, I was clicking through a list, and the next button moved under my cursor. The label beside it went from "1 to 8 of 14" to "7 to 14 of 14". The new label is wider, so it pushes the arrow over. You aim, you click, and the button is somewhere else for the next click.
No fix
- Arrow moved on
- 0 of 0 clicks
Tabular figures
- Arrow moved on
- 0 of 0 clicks
Tabular figures and reserved width
- Arrow moved on
- 0 of 0 clicks
There are two fixes. Use tabular figures, so every digit is the same width. Then make the label as wide as the longest text it can show.
.pager-label {
font-variant-numeric: tabular-nums;
min-width: 17ch; /* widest label */
text-align: right;
}
That's the whole idea at the size of one line. The name for it is layout shift: something on screen moves when you didn't ask it to. Chrome scores it as Cumulative Layout Shift, or CLS, and Google calls 0.1 or less good and anything above 0.25 poor.
Nobody had filed this, and if they had, it would have collected dust on our backlog.
The dialog
The app is server-rendered, with newer React islands mounted into it. It has a dialog for scheduling who gets access to something. The dialog loaded several independent pieces of data and showed each one as it arrived.
It opened about 340 px tall with a centered spinner. The form arrived and the dialog jumped to about 710 px. That's the first jump. A footer button appeared. Second jump. An actions menu popped in. Third. One late setting arrived, section headings appeared, and everything went down again. Fourth.
Then the counts arrived and re-sorted a dropdown. The height stayed the same this time, but the option under your cursor changed. You could point at one group and select another.
I measured CLS at 0.278. That's poor on Google's scale. It wasn't in scope, and nobody had asked me to look.
Grows as it loads
- Height
- 170.00 px
- Shifts
- 0
- Score
- 0.000
- Under the cursor
- nothing yet
Reserves the space
- Height
- 496.00 px
- Shifts
- 0
- Score
- 0.000
- Under the cursor
- nothing yet
The second dialog takes longer to show you anything. Everything appears at once at 1.70 s, instead of the form at 0.35 s. I think that's the right trade, because the form at 0.35 s was going to move four more times.
Six fixes
None of these would have been prioritized as a project. I did them as small, separate changes.
1. Paint once
Don't render partial states that will grow. Sort the data into two piles: things that change the shape of the dialog, and things that only change values. Wait for everything that changes the shape. Let the values fill in later.
2. A skeleton that is the real layout
Most skeletons only suggest the page. Some gray bars, roughly form-shaped. I set each skeleton block to the measured height of the real block it stands for. The skeleton came out at 829.06 px and the loaded form at 829.08 px.
3. Shape the skeleton from what you already know
A generic skeleton assumed a few rows. A record with none collapsed from 514 px to 210 px when its one-line empty state arrived. The list view that opens the dialog already knew the row counts, so it passed them in, and the skeleton drew the right number of rows, capped at page size, with the pager.
Where exact text height mattered, I rendered the real element invisibly under a skeleton bar, so it occupied exactly its real space.
.skeleton .text {
color: transparent;
background: var(--bar);
}
Generic skeleton
- Skeleton
- 514.00 px
- Loaded
- 258.00 px
- Jump when it loads
- −256.00 px
Measured skeleton
- Skeleton
- 258.00 px
- Loaded
- 258.00 px
- Jump when it loads
- 0.00 px
4. Reserve slots for late values
Numbers that arrive late get a same-size placeholder. They never push anything.
5. Don't move what's under the cursor
The dropdown waits until its order is final before it shows options.
6. Make the wait shorter, too
Prefetch on hover, cached for 10 seconds. Often there is no loading state at all.
Result: CLS 0.
The wait that wasn't the database
The same dialog waited 0.7 to 1.3 seconds for content, though each request took a few milliseconds on the server.
The cause was the server framework. It holds a per-user session lock, which means it serves one person's requests one at a time. A request that finds the lock taken doesn't wait in line. It gets turned away and tries again about every 0.5 seconds, even if the lock freed up right after. So three small reads that should have finished together took turns, and most of the wait was time spent waiting to try again.
Turned away, waiting to try againDoing the work
You wait1,009 msThe slowest request needs9 ms
The fix was to move the read-only requests to endpoints that don't take the session lock. The wait went away.
This wasn't on the backlog either. It was in the same dialog, so I kept going.
The network panel showed parallel requests. The server ran them in series.
The week
All of this came out of one week when I deliberately changed how I work within a legacy application.
Recently I've been making drastic changes to my work, which I wrote about in Designer or developer. At my day job, I only want to get faster and prove these things out more.
Before, I would build one large feature, mostly in one long push. This week I made many small changes in parallel. Each one went the same way: write a failing test, make it pass, commit, update the docs in the same branch, get it reviewed, answer review comments the same day. One large feature at a time is the drop. Many small changes is closer to the stream.
I used Claude Code as an aid for the mechanical parts: writing tests, refactors, auditing every grid in the app for the same bug, and writing audit proofs with video, screenshots and logs. I kept the judgment calls.
Nobody had filed any of the layout shift work. I saw it and fixed it, unprompted. Based on our backlog, we wouldn't have prioritized it. I did the same with other things I noticed, as long as the fix was small, shared, and testable.
Every spreadsheet export downloaded as export.xlsx, and repeats became export (1).xlsx, (2), and so on. Now the file is named for its page and the time. I fixed it once in the shared grid component so every page got it, and a test clicks Export in a real browser to prove it.
Before
- export (2).xlsx
- export (1).xlsx
- export.xlsx
After
- People_2026-10-30_142233.xlsx
- Groups_2026-10-30_141508.xlsx
- Schedule_2026-10-30_140741.xlsx
Exported dates, currency and percents were also text in Excel, so they wouldn't sort or sum. Now they're typed cells, and IDs with leading zeros stay text.
I started working this way on a Thursday, so the fair comparison is the last full week before it. Commits went from 28 to 96, and separate pieces of work went from 3 to 15.
Commits
Pieces of work
Commit counts don't prove any of that was worth doing. These do: the dialog's CLS went from 0.278 to 0. Its 0.7 to 1.3 second wait went away. Exports stopped downloading as export (2).xlsx, and their dates and currency now sort and sum. I also removed 2.7k lines, some of them duplicated code, and that's part of why everything else went faster.
Reserve the space before you fill it
You can check your own app in a couple of minutes. In Chrome, open DevTools, go to Rendering, and turn on Layout Shift Regions. Then open your slowest dialog. Anything that flashes just moved.
If you want a number, paste this into the console first:
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry.value, entry.sources);
}
}).observe({ type: 'layout-shift', buffered: true });
From drops to a stream
Code used to arrive one drop at a time. Soon, if not already, code will be written as if it were a continuous stream, like a violent river twisting and turning as it pleases.
@poteto, shared by Thorsten Ball
A backlog is built for drops. Each item waits its turn, and only the ones worth a slot get one. When changes are small and fast, the slot stops being the limit. This week let me more fully consider our application, and get to improvements we didn't have in scope and likely wouldn't have been able to prioritize.
Some may look at this work and think it's basic stuff. It is. That doesn't mean it isn't worth talking about improvements. Demanding excellence of yourself and what you work on is worth it...whether you're working on a Honda Accord or a Porsche.