Repository navigation
The segment style fields are strings, and the format doc says so - #71
Merged
Merged
Conversation
`docs/band-format.md` documented a segment's `fillOpacity` and `strokeWidth` as numbers — `0.4` and `2` — and the payload sends `"0.4"` and `"2px"`. The four appearance fields come through `tubemap.js` as the document's own attribute values and go back out as attributes on the SVG route, so they travel as written. The doc is what a client is written against, and `pgb`'s reader is being written from it now (pgb#151). Its `SegmentBox.stroke` is a number its overlay does arithmetic with, so a reader trusting the spec turns `"2px"` into `NaN` and lays a border of the wrong width — silently, because `NaN` in a CSS length is an ignored declaration rather than an error. Same class as `pclaiScore` in #67, and caught the same way: by someone reading the spec instead of the encoder. The document moves, not the payload. No encoder change, no bytes move, and `version` stays 1 — this corrects what the format claims, not what it sends. Closes #70 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012QQpjq82mqv6GS2GQyoUrm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/band-format.mddocumented a segment'sfillOpacityandstrokeWidthas numbers —0.4and2. The payload sends"0.4"and"2px", verified against the post-#66 fixturesubgraph_chr8_78771162_78771252_v2_with_walk.band.json.gz. The four appearance fields come throughtubemap.jsas the document's own attribute values and go back out as attributes on the SVG route, so they travel as written.The doc is what a client is written against, and pgb's reader is being written from it now (pgb#151). Its
SegmentBox.strokeis a number its overlay does arithmetic with, so a reader trusting the spec turns"2px"intoNaNand lays a border of the wrong width — silently, sinceNaNin a CSS length is an ignored declaration rather than an error. Same class aspclaiScorein #67, caught the same way: by reading the spec instead of the encoder.The document moves, not the payload. No encoder change, no bytes move,
versionstays 1 — this corrects what the format claims, not what it sends.The new paragraph sits after the #66 discussion rather than directly under the
segmentsdescription, so that "It travelled as a path command" keeps pointing at the box.Closes #70
🤖 Generated with Claude Code
https://claude.ai/code/session_012QQpjq82mqv6GS2GQyoUrm