Skip to content

fix(web): the refusal view declared note twice, so no page ran (#810 regression) - #817

Merged
eaitbrahim merged 1 commit into
mainfrom
fix/refusal-view-duplicate-const
Sep 25, 2026
Merged

eaitbrahim merged 1 commit into
mainfrom
fix/refusal-view-duplicate-const

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Problem

#810 (a1ee344) added const note = el("p") to refusedView in render.js, but that function already declares const note = el("p", "detail"). Declaring the same name twice in one scope is a SyntaxError for the whole module. render.js never loads, main.js imports it, and so every console built from current main shows a blank shell. The browser reports Identifier 'note' has already been declared.

It isn't released (no tag contains a1ee344), and ~/keel runs 0.16.0, so nothing deployed is affected.

Fix

  • Renamed the first note to howNote.
  • Added a test: test_no_module_declares_a_name_twice_in_one_scope runs over every module in static/js/. It scans for a const/let/class name declared twice in one block scope, after _code_only strips strings and comments.
  • test_the_redeclaration_scan_can_fail pins that the scan catches the feat(console): the refusal now says how to GET the address it asks you to paste #810 shape and doesn't flag the same name in sibling blocks or loop heads.

Why tests missed it

The repo deliberately has no JavaScript toolchain, so nothing ever parses the client. This scan covers the one class of parse error that got through. It is not a general parser.

Verification

🤖 Generated with Claude Code

…regression)

#810 added `const note = el("p")` to refusedView beside the existing
`const note = el("p", "detail")`. A duplicate declaration in one scope
is a SyntaxError for the whole module, so render.js did not load and
every console built from main showed a blank shell. The first is now
`howNote`.

Nothing caught it because the repo has no JavaScript toolchain. A new
scan in test_client_assets fails any module that declares one name
twice in one block scope, with a self-test that it catches the #810
shape and passes sibling blocks and loop heads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim eaitbrahim added the fix Bug fix (groups under Fixes) label Sep 24, 2026
@eaitbrahim
eaitbrahim merged commit 1d3185b into main Sep 25, 2026
4 checks passed
@eaitbrahim
eaitbrahim deleted the fix/refusal-view-duplicate-const branch September 25, 2026 06:26
eaitbrahim added a commit that referenced this pull request Sep 25, 2026
…e switcher with no tokens (#818)

MINOR: #810 and #814/#816 add console features. No schema change since
0.16.0, so a deployment needs no `keel migrate` step beyond the usual
idempotent run.

What lands:

  #807 -- a quote-increment cache record predating quote_increment is a
  MISS, not an "unknown".
  #810 -- the refused view says how to get the address it asks you to
  paste; #817 fixes its duplicate `const note`, which blanked the console.
  #813 (#812) -- the cycle line ends `vetoed=N (rail, ...)`, so a rail
  veto no longer reads as a silent drop.
  #815 + #816 (#814) -- a console switcher beside the session chip.
  /api/config carries no session token; /switch/<port> redirects into the
  chosen console's own hand-off, local deployments only.

Eight workspace versions and the inter-package `==` pins move together,
plus the refreshed uv.lock the release workflow checks first.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix (groups under Fixes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant