
\ Senior software engineer · JetBrains · 2026 \
ThinkRail is an open-source workspace for coding agents, from JetBrains. I work on how it feels: speed, safety and the small things people notice. Every change comes with numbers.
Not all good work is merged yet. This page shows all three places it lives.
merged into JetBrains/thinkrail
64 PRs
Speed, reliability, type checks and UI fixes. They ship in the app today.
built in my fork
170 PRs
Where I build and review stacks before they go up. Some bigger work still waits there.
written up
25 issues
Bug reports with repros, UX audits with recordings, and interactive design pages.
Measured on the engine people use, on a slow machine, with the numbers that got worse.
The desktop app draws its UI in WebKit, which is slower than Chrome. So I measure there first, with the CPU slowed down 4x like an older laptop.
The first code block of each language froze the chat. In WebKit, one TypeScript block blocked the page for almost a second. I moved highlighting into a worker: 880 ms became 47 ms.
Then I replaced three highlighters with one. Chat, diffs and the editor now share Pierre: one WebAssembly file, one color table. Eight stacked PRs, each measured against the one below it.
web app build
18 MB
Was 34.9 MB. Shiki and its theme catalogs left the build.
languages with color
152
Was 36, and chat showed 23 of those as plain text.
color lag while code streams, WebKit
96 ms
Was 327 ms. Only new lines are sent and parsed.
components rendered while typing
−84%
React Compiler on, plus a profiler that proves each fix.
An audit of 15 rules, one recording per rule, and the first fix already shipped.
A chat that moves while you read is broken, even when nothing crashes. I checked ThinkRail against 15 rules for streaming chat, read how six other apps solve each one, and recorded every rule: how it works now and how it should.
The first fix shipped: the answer used to slide 120-240 px twice a second. Now the newest line stays pinned to the bottom. In WebKit, slides in one answer went from 24 to 1, and a whole setting could go.
15 rules, now and proposed, scroll sideways
Built in my fork as 22 stacked PRs. Not merged yet: the proposal is open upstream.
The UI and the host talk over a WebSocket. Every one of 193 methods reached its handler through one type cast, so TypeScript could not tell checked data from unchecked. Delete one runtime check and the build still passed.
I gave each message one schema and derived the TypeScript type from it. Each side parses outside data once, at the edge, and everything inside trusts the type. Files on disk get the same rule: a corrupt one is copied aside instead of being overwritten with defaults.
Ids got brands, so a workspace id cannot go where a session id belongs, and strict patterns, so a session named ../../x never reaches a file write. If the UI and the host disagree on the protocol version, you get a Reload button instead of a broken app.
methods and channels with a schema
226
193 methods, 33 push channels. A missing validator fails the build.
unchecked id casts
0
Was 72 in production code. Ids are minted or parsed, never cast.
cost in the web build
+0.4%
25 KB gzip. Measured end to end, with an A-vs-A run for noise.
a 200,000-deep bad frame
refused
Used to crash the host. Now it gets an error reply.
declare const ID_KIND: unique symbol;
interface Id<Kind extends string> {
readonly [ID_KIND]: Kind;
}
export type ProjectId = string & Id<"project">;
export type SessionId = string & Id<"session">;
// a session id must be path-safe, so "../../x" never reaches the disk
export const SessionId = idSchema<SessionId>({
pattern: "^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$",
maxLength: 200,
});
export const parseSessionId = parserOf(SessionId); // SessionId | null// one validator per method, or the build fails
type ParamsValidators = {
[M in WsMethodName]: Validator<WsParams<M>>;
};
const VALIDATORS: ParamsValidators = {
"project.open": compile(S["project.open"].params),
"session.prompt": compile(S["session.prompt"].params),
// ...191 more
};My first week on the repo, I started with the product, not a bug.The first prototype
Three days after I forked the repo, I opened a prototype marked DO NOT MERGE. The idea: UI extensions that the agent writes for you while you work. It reloads them live and keeps the last version that worked.
The founders said that is where they want extensions to go, in a different shape. A month later I wrote the full design. These are its playable parts: five scripted demos and the diagrams that explain how it works.
Five short demos in a mock of ThinkRail: you ask the agent for a feature, and it writes the extension while you watch.
Demo 1 of 5: Voice input. One sentence becomes a mic button.
Three blocks and needs: what this step uses
Say people want a spending cap on voice transcription. See what a built-in feature does to the kernel, and what one hook does instead.
The easy way: put a budget feature in the kernel.
An extension describes its UI with five nouns. Each noun has fixed places in the app, so every extension looks like part of ThinkRail.
panelright1 / 3
A view you move between the side groups.
Rail and pane
Install adds an icon to the rail. The panel opens on the side the extension asks for.
Many people and devices can connect to one host. Each connection gets a ticket with a name and a device, so every edit and command shows who made it.
your local network
checks a one-time code
no ticket yet
no events yet
On the desktop, /pair shows a QR code and a one-time code.
Tools I built to understand a large codebase fast.
Before I change a flow, I want to see it. The transit map is generated from the real code: it shows how each user action travels from the click, over the wire, to the host and back.
repo-map does the same for any branch, with the links the compiler cannot see, like a request name to its handler.
all lines
188 wire methods on 7 lines. Solid lines are requests from the UI to the host. Dashed lines are the 32 push channels back: 26 of them end in the store.
UI → transport → wire → host → server → pi / OS
Bugs nobody can reproduce get a script that reproduces them first.
One slow git call froze every ThinkRail window: the host waited for it on its only thread. Now every git call has a deadline and is killed with its whole process group, so no lock files stay behind.
A stalled git hook made each refresh pile up: 465 requests in flight until the app gave up. Now each view keeps one read in flight, and the error toast is gone.
requests in flight, slow git
3
Was 465, and the app showed an error until reload.
git calls with a deadline
35
None before. One hung call no longer freezes the app.
start with a hung shell profile
5.7 s
Was 30.9 s before the app window showed.
CLI warm launch, Linux
210 ms
Was 889 ms. The binary is compiled to bytecode.
Small fixes people feel before they can name them: each one is a before and after from a merged PR.

\ Andrey Markin \
I find where the time goes, fix the cause and prove it with numbers before and after. Tell me what feels wrong in yours.