fix(warroom): repair broken LLM-call sites so docs/index.html parses#117
Closed
hoptoad-off wants to merge 1 commit into
Closed
fix(warroom): repair broken LLM-call sites so docs/index.html parses#117hoptoad-off wants to merge 1 commit into
hoptoad-off wants to merge 1 commit into
Conversation
The War Room UI (docs/index.html) shipped with several bad-merge artifacts in its main <script> block — duplicate/half-merged safeLLMCall call sites, two `catch` clauses on one `try`, and duplicate lexical declarations (`response`, `content`, `autoApplyBtn`). Any one of these is a hard SyntaxError that discards the entire ~20k-line script block, so `navigateTo` was never defined and sidebar navigation (Settings, etc.) did nothing. Fixes: - Merge the two split `safeLLMCall` definitions into one: keep the complete model-fallback loop and restore the `backend` resolution + keyless agent/server branch it referenced but no longer defined. - Drop premature/dead fetch and options fragments in `_safeLLMCallOnce`, `runBenchmarks`, `runLLMJudge`, `generateAnalysis`, `autoApplyRecommendations`, `runSelfImprovementLoop`, the benchmark evaluator, and the CTF call — keeping the newer variant (`_noFallback` / `llmTimeoutFor`) in each. Verified in a headless browser: `navigateTo` is defined, all 14 nav pages switch, Settings renders, and there are no console errors. All <script> blocks pass a syntax check and bracket-balance is even. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
Closing as a duplicate of #112. I independently reproduced the same 8 botched-merge syntax scars in Separately I opened #118 for an unrelated backend bug that #112 doesn't touch: |
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 & why
The War Room UI (
docs/index.html) ships with syntax errors in its main<script>block from several bad-merge artifacts. Any one of them is a hardSyntaxErrorthat discards the entire ~20k-line block, sonavigateToisnever defined and sidebar navigation (Settings, Arsenal, …) does nothing — the
UI is stuck on the War Room page.
npm run verify-claimsdoesn't cover the UI,so this slipped through.
Changes
safeLLMCalldefinitions into one: keep the completemodel-fallback loop and restore the
backendresolution + keylessagent/server branch it referenced but no longer defined.
_safeLLMCallOnce,runBenchmarks,runLLMJudge,generateAnalysis,autoApplyRecommendations,runSelfImprovementLoop, the benchmarkevaluator, and the CTF call — keeping the newer
_noFallback/llmTimeoutForvariant in each.Net: +17 / −85 (dead-code removal).
Verification
<script>block passes a syntax check; bracket balance is even.navigateTodefined (global fn count 93 → 515), all 14nav pages switch, Settings renders, no console errors.
Notes
Semantics are preserved to the newer of each duplicated pair; no behavior was
invented. Suggest adding a lightweight UI syntax-check (per
<script>block)to CI so this can't regress.