Interpolate log fields instead of passing an object #107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/renderer-log-object-args"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Electron's console bridge stringifies each console argument on its way to the journal, so
console.log('msg:', { a, b })arrives asmsg: [object Object]and every field is lost.That cost a debugging session today. A cassette-state publish that had in fact applied an operator refill correctly looked, from the journal, like nothing had happened, because the d-tag, event id and stamp were all inside the object.
Three call sites, the only ones in the renderer passing an object. The publish line now also carries
seqand the applied-op count, which are the two things worth knowing when an operation seems not to have landed.Before:
After:
Recorded in CLAUDE.md's debugging invariants so it does not come back.
CLAUDE.mdandoperator-fees.tsare both already prettier-dirty ondev, so I reapplied these edits by hand rather than letting the formatter bury a three-line fix under a full-file reflow. That drift is worth its own cleanup commit sometime.Typecheck passes, 135 machine tests pass.
Electron's console bridge stringifies each console argument on its way to the journal, so `console.log('msg:', { a, b })` arrives as `msg: [object Object]` and every field is lost. That cost a debugging session today: a cassette-state publish that had in fact applied an operator refill correctly looked from the journal like nothing had happened, because the d-tag, event id and stamp were all inside the object. Three call sites, the only ones in the renderer passing an object. The publish line now also carries seq and the applied-op count, which are the two things worth knowing when an operation seems not to have landed. Recorded in CLAUDE.md's debugging invariants so it does not come back.