"Where the time went" needs magpie's own client to send the request
(TryNet). A plugin sends its own through the plugin host, and a Claude
subscription's goes through Claude Code, so those tries never have a
split, and the page showed nothing in its place, which read as a
request that lost its details (Discord, lute).
A try now records who sent it when magpie didn't (Try.SentBy: "plugin"
or "claude", from sentBy), and the request's story says it under a
done, answered try with no timing: "Its plugin sent this request
itself, so magpie can't split its time" (or Claude Code), in every
language.
Run (mote, go1.26.8, Node 22, Playwright 1.62.0):
- TestPluginTrySaysWhoSentIt: red without the gateway.go line (SentBy
empty), green with it. TestSentBy, TestTryTellsWhereItsTimeWent,
TestCursorPlugin*: ok.
- go test ./internal/gateway ./internal/usage -count=1 -timeout 45m:
ok (gateway 502s, usage 16s).
- node --test routing-time-went (now checks the plugin try's line and
that a routed try has none), routing-masking, i18n-keys, routing-js,
routing-time, routing-went-on, routing-steps-cap: 57 of 58 ok in
Chromium and WebKit, every language. The red is
routing-steps-cap's WebKit ResizeObserver error, red the same at
8cbd0a9c9 without this change and listed in #4304.
- go vet for darwin, linux (-tags nogui), windows: ok. gofmt -l: clean.
Not tried: a real plugin or Claude subscription request in the app.
The three commits' full package runs were at base 8cbd0a9c9. Rebased
onto fb2e11e28 (#4308, which changed codex_backend.go), this head ran:
go vet ./internal/gateway for darwin, linux (-tags nogui), windows: ok;
go test ./internal/gateway -run 'TestCodex|TestMasking|TestNoMasking|
TestPluginTrySaysWhoSentIt|TestSentBy|TestTryTellsWhereItsTimeWent|
Revoked': ok.