fix(diff): preserve E2E decryption key on label sync + add A/B line counters; uplift Docker#1
Merged
Conversation
…ng app build ts-jest now uses tsconfig.jest.json (jest types) for specs; *.test.ts excluded from the app tsconfig so the nuxt build doesn't type-check them. Adds @types/jest.
… links On the ?id= path the URL hash holds the AES key for the server-stored blob, not the diff payload. syncLabelsToUrl() ran when unzipCommitData set the pane labels after decryption and replaceState'd the hash with the gzipped payload, so refreshing/re-copying the link failed with 'We couldn't decrypt your diff.' buildLabelSyncUrl() now returns null on the ?id= path, leaving the key intact.
…on bar Adds an A/B line-count display with a colour-coded net delta (b - a) to the diff action bar, computed reactively from the store payload (matches the Monaco gutter). Hidden under 640px.
Build stage node:22 -> node:24 (current LTS); production nginx 1.27.0 (old mainline) -> 1.28.3-alpine-slim (current stable, pinned). Loosen engines 22.x -> >=22 so the Node 24 Docker build and newer local runtimes don't emit EBADENGINE. Bump CI matrix node 20 (nears EOL) -> 22 (the supported floor). Kept --openssl-legacy-provider (webpack 4 / MD4 on OpenSSL 3) and documented why.
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.
Summary
Two user-facing fixes plus a build uplift.
1. Encrypted share links break on refresh ("We couldn't decrypt your diff")
On the
?id=(end-to-end-encrypted) path the URL hash holds the AES decryption key (#s-…), not the diff payload.syncLabelsToUrl()fired whenunzipCommitData()set the pane labels after decryption andreplaceState'd the hash with the gzipped payload (#H4sI…). On refresh/re-copy,getE2EData()then read that payload as the key → decryption failed.New pure helper
buildLabelSyncUrl()returnsnullon the?id=path so the key is never clobbered. Covered byhelpers/labelSyncUrl.test.ts.2. Per-side line counters
Adds an A / B line-count display with a colour-coded net delta (
b − a) to the diff action bar, computed reactively from the store payload (matches the Monaco gutter). Hidden under 640px. Pure stats logic inhelpers/lineStats.ts+ tests.3. Docker / engines uplift
node:22→node:24(current LTS); productionnginx:1.27.0(old mainline) →nginx:1.28.3-alpine-slim(current stable, pinned).engines.node22.x→>=22; CI matrix node20→22.--openssl-legacy-provider(webpack 4 / MD4 vs OpenSSL 3) with an explanatory comment.Test infra
Added
@types/jest+tsconfig.jest.jsonso specs type-check without polluting the app build;*.test.tsexcluded from the app tsconfig.Verification
npm test— 13 unit tests green (TDD).npm run build(nuxt generate, incl. fork-ts-checker) compiles clean;/diffroute generates.workflow_dispatchrun ofbuild-imageon this branch (Node 24 / nginx 1.28).🤖 Generated with Claude Code