Skip to content

Fix duplicated script block breaking the entire gallery - #114

Merged
charpy4n6 merged 1 commit into
mainfrom
fix/duplicate-add-evidence-script-block
Sep 14, 2026
Merged

charpy4n6 merged 1 commit into
mainfrom
fix/duplicate-add-evidence-script-block

Conversation

@charpy4n6

Copy link
Copy Markdown
Collaborator

What

gleapp/web/static/app.js had the entire "add evidence to an already-open case" block — including const AE = { sources: [] } — declared twice, back to back, byte-for-byte identical.

Why this is urgent

A duplicate const declaration is a SyntaxError, and a SyntaxError anywhere in a script aborts parsing of the whole file. This isn't a cosmetic issue with Add evidence — it silently breaks every button, filter, and keyboard shortcut in the gallery for anyone running current main or a build made from it.

How it got there

Not present in #112 (the PR that introduced this block — one copy, verified). Introduced at 6e1305b, "Merge remote-tracking branch 'origin/main' into feat/processing-history-detail": merging main into that branch duplicated the block instead of taking one copy, and #113 carried it straight into main when it merged.

Fix

Pure deletion of the first (identical) copy. Nothing else changed.

Testing

  • python -m pytest tests -q — 420 passed, 3 skipped
  • bash tools/check_line_endings.sh — all LF
  • Manually verified in a browser: before the fix, the console showed Uncaught SyntaxError: Identifier 'AE' has already been declared and no UI interactions worked; after, the console is clean and the app is fully functional.

🤖 Generated with Claude Code

gleapp/web/static/app.js declared `const AE = { sources: [] }` (and the whole
"add evidence to an already-open case" block around it) twice, byte-for-byte
identical, back to back. A duplicate `const` is a SyntaxError, and a
SyntaxError anywhere in the file aborts parsing of the whole script - every
button, filter, and keyboard shortcut in the gallery silently stopped
working, not just Add evidence.

Traced it: not present in #112 (the PR that added this block, one copy).
Introduced at 6e1305b, "Merge remote-tracking branch 'origin/main' into
feat/processing-history-detail" - merging main into that branch duplicated
the block instead of taking one copy, and PR #113 carried it straight into
main.

Fix is a pure deletion of the first (identical) copy; nothing else changed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@charpy4n6
charpy4n6 merged commit 5997eb0 into main Sep 14, 2026
7 checks passed
@charpy4n6
charpy4n6 deleted the fix/duplicate-add-evidence-script-block branch September 14, 2026 13:58
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.

1 participant