Repository navigation
Fix duplicated script block breaking the entire gallery - #114
Merged
Merged
Conversation
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]>
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.
What
gleapp/web/static/app.jshad the entire "add evidence to an already-open case" block — includingconst AE = { sources: [] }— declared twice, back to back, byte-for-byte identical.Why this is urgent
A duplicate
constdeclaration is aSyntaxError, and aSyntaxErroranywhere 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 currentmainor 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": mergingmaininto that branch duplicated the block instead of taking one copy, and #113 carried it straight intomainwhen it merged.Fix
Pure deletion of the first (identical) copy. Nothing else changed.
Testing
python -m pytest tests -q— 420 passed, 3 skippedbash tools/check_line_endings.sh— all LFUncaught SyntaxError: Identifier 'AE' has already been declaredand no UI interactions worked; after, the console is clean and the app is fully functional.🤖 Generated with Claude Code