Repository navigation
Shorter links: ?doc= is deflated, and portal pages carry only their c… - #78
Merged
Merged
Conversation
…hanged settings Every JSON value the app writes into a URL (lib/url-json.ts) is now `1.<base64url>`: the JSON's UTF-8 bytes, raw deflate with no dictionary, so any zlib reads it (Python: zlib.decompress(data, -15)). A value with no "." is the plain base64url JSON that links were before, and still opens, so old links, scripts and hand-made links keep working. The lab, the Examples tab, the reproductions and campaign pages, the agent tools and MCP's run_analysis link all write it; the oncoprint lab's ?spec= is unchanged and shares the base64 helpers. The Results and Comparison pages no longer put their whole document in the URL. ?changes= (app/portal/page-changes.ts) holds only how each view differs from the page's defaults, which are rebuilt from the query, keyed by the kinds of the page's views in order: changes made on another layout are not applied, and the page says so. An untouched page carries nothing. Comparison keeps its cohorts in ?doc= without the views; a ?doc= link with views still opens. Measured on the 92 gallery documents: about half the plain length overall (largest 2,598 -> 568 characters). On the Results page, hiding Missense on the lollipop is a 225-character ?changes=, and a reload shows the same selection. Verified: unit tests (new test/url-json.test.ts, test/page-changes.test.ts; a pinned format-1 link is read by Node's own zlib), lint, and the e2e lane of scripts/gate.sh (185 pass), which now asserts the Results page writes ?changes= and no ?doc=, and decodes the lab's ?doc= with the same module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
…hanged settings
Every JSON value the app writes into a URL (lib/url-json.ts) is now
1.<base64url>: the JSON's UTF-8 bytes, raw deflate with no dictionary, so any zlib reads it (Python: zlib.decompress(data, -15)). A value with no "." is the plain base64url JSON that links were before, and still opens, so old links, scripts and hand-made links keep working. The lab, the Examples tab, the reproductions and campaign pages, the agent tools and MCP's run_analysis link all write it; the oncoprint lab's ?spec= is unchanged and shares the base64 helpers.The Results and Comparison pages no longer put their whole document in the URL. ?changes= (app/portal/page-changes.ts) holds only how each view differs from the page's defaults, which are rebuilt from the query, keyed by the kinds of the page's views in order: changes made on another layout are not applied, and the page says so. An untouched page carries nothing. Comparison keeps its cohorts in ?doc= without the views; a ?doc= link with views still opens.
Measured on the 92 gallery documents: about half the plain length overall (largest 2,598 ->
568 characters). On the Results page, hiding Missense on the lollipop is a 225-character ?changes=, and a reload shows the same selection.
Verified: unit tests (new test/url-json.test.ts, test/page-changes.test.ts; a pinned format-1 link is read by Node's own zlib), lint, and the e2e lane of scripts/gate.sh (185 pass), which now asserts the Results page writes ?changes= and no ?doc=, and decodes the lab's ?doc= with the same module.
Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum