Skip to content

fix: skip cross-origin requests in Service Worker#336

Merged
glehmann merged 4 commits into
mainfrom
gln/fix-diff-rendering-logic-qzro
Jul 7, 2026
Merged

fix: skip cross-origin requests in Service Worker#336
glehmann merged 4 commits into
mainfrom
gln/fix-diff-rendering-logic-qzro

Conversation

@glehmann

@glehmann glehmann commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Add URL guard so cross-origin requests (api.github.com/graphql)
bypass the SW entirely, preventing CORS errors caused by the SW
re-issuing CORS fetches. Also handle cache-miss gracefully with a
503 fallback response.

Resolves #332

glehmann added 4 commits July 7, 2026 21:31
Add URL guard so cross-origin requests (api.github.com/graphql)
bypass the SW entirely, preventing CORS errors caused by the SW
re-issuing CORS fetches. Also handle cache-miss gracefully with a
503 fallback response.

Resolves #332
On mousedown on one side, set the opposite side's elements to
user-select: none. The protection persists until the next mousedown
(which clears it), preventing the browser from extending the
selection across sides after mouseup.
…view syntax highlighting

- Remove change-index distance bound in findBestInsertForDelete so
  indentation-only changes pair across block replacement boundaries
- Collect unpaired inserts separately and sort all output by new-line
  position, producing monotonic line numbers in unified view
- Estimate delete positions from the next paired line's new-line number,
  placing delete-only lines at their context-appropriate position
- Add second pairing pass after crossing detection to re-pair
  content-similar lines that crossing unpairing broke apart
- Merge adjacent empty delete+insert lines into a single normal line
- Stop re-diffing in split-view convertToSplitPairs; filter original
  segments by type instead, preserving syntax-highlighted HTML
The 3px left border for inline-change lines was blue, clashing with the
yellow row background. Changed --code-changed from blue.500 to yellow.500.
@glehmann glehmann force-pushed the gln/fix-diff-rendering-logic-qzro branch from a3a19c0 to 316c898 Compare July 7, 2026 19:31
@glehmann glehmann merged commit 316c898 into main Jul 7, 2026
6 checks passed
@glehmann glehmann deleted the gln/fix-diff-rendering-logic-qzro branch July 7, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Service Worker CORS errors by skipping cross-origin requests

1 participant