Skip to content

Clean up readability warnings in the comparison page, server and map - #46

Merged
OstenHun merged 7 commits into
mainfrom
task/eslint-cleanup-web
Nov 23, 2026
Merged

OstenHun merged 7 commits into
mainfrom
task/eslint-cleanup-web

Conversation

@OstenHun

Copy link
Copy Markdown
Owner

What changed and why

The third readability cleanup after ESLint was added (#43). It covers the comparison page, its server and the shared map: src/views/research-map.ts, src/web/comparison.ts and src/web/comparison-server.ts. These files had 14 readability warnings and now have none, and this PR adds them (with browser-types.d.ts) to the list in eslint.config.js where the readability rules are errors. It changes no behavior.

The commits are meant to be read separately. git diff --color-moved helps tell moved code from new code.

  • ad40400 Renames only.
  • dca9b1b Map. build delegates node positions, the state line, and the comparison, context, application and relation elements. mount delegates the stylesheet (node, edge and selection groups, then the comparison relation style, in the same order), fitting and zooming the view, and the selection filter.
  • 1989af4 Server. The request handler becomes handleRequest, which delegates the security headers, the allowed-request check, resolving and sending an evidence file, and sending a static asset. Header order, status codes and messages are unchanged; static assets are still sent without awaiting.
  • aaaa712 Page. show delegates the relation, criterion and paper details; render names its empty-relations message instead of nesting ternaries.
  • 4b5a147 promotes the rules for these files.
  • 414f5bc, f42f41b Review fixes. A clearer type name and comment, and record fields read in the original order in three labels.

No warning needed a behavior change to fix. Remaining warnings in the repository: 314 (328 on main).

Verification

  • npm run lint: 0 errors; 0 warnings in these files. A scratch one-letter name fails lint there.
  • npm run check:format, npm test (94 product and 143 skill tests), npm run check:docs, npm run test:package, node dist/cli.js validate --workspace examples/minimal --json and git diff --check passed on Windows 11 with Node 24.22.3. The strict browser type check passes.
  • Differential against main (ce1bf5e). Both builds were given the same inputs:
    • DanseoMap.build on 20,000 random map inputs across every mode and scene, including broken ones: same elements or error message.
    • DanseoMap.mount on 3,000 scenarios with a recording fake cytoscape: same config (style functions evaluated), calls, event wiring, ResizeObserver use and controller calls.
    • comparison.js in a fake DOM over 400 multi-step scenarios (load, selection buttons, filter, map selections, reload, pageshow, failed fetches): same DOM, title and map calls after every step.
    • The server over 27 requests in 3 rounds: same status, headers and body for assets, data, PDF and analysis files, refusals by method, Host and Origin, unknown paths and tokens, and a hash mismatch. Only the bytes of the two built scripts this PR changes and the generated_at time were masked.
    • A one-character change planted in each built file was detected by the matching part.
  • Types. A type-level equality check of the server module's exports passes; the declaration now spells the same Server<...> type with imported names.
  • Real browser. On a synthetic two-paper topic, the page loaded with no console messages, the map rendered, the criterion, relation and paper buttons and a click on a map node filled the details and highlighted the node, and the source-checked filter hid the AI relation and showed the empty-relations message.
  • Known residual, same kind as Clean up readability warnings in the CLI and core modules #44 and Clean up readability warnings in the analysis, collection and comparison modules #45. When reading an evidence file fails, the 409 response is written a few microtasks later because the failure now passes through await sendEvidenceFile. The response is the same.
  • Claude Code prepared this change. Codex (read-only) and Claude Fable (read-only) reviewed it once each; the findings above are applied or listed. This is not a human review.
  • Not checked: Ubuntu, macOS and Node 22 locally; real cytoscape layout beyond one page viewed by eye.

Checklist

  • I kept private materials, local paths, and secrets out of this pull request.
  • I checked the attribution and licenses of any third-party code or materials included here.

🤖 Generated with Claude Code

OstenHun and others added 7 commits November 24, 2026 02:12
Rename only. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build delegates node positions, state labels, and the comparison,
context, application and relation elements. mount delegates the
stylesheet (node, edge and selection groups plus the comparison
relation style), fitting and zooming the view, and the selection
filter. Element order, labels, styles and event wiring are unchanged.
No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The request handler becomes handleRequest, which delegates the security
headers, the allowed-request check, resolving and sending an evidence
file, and sending a static asset. Header order, status codes, messages
and the await points are unchanged; static assets are still sent
without awaiting. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
show delegates the relation, criterion and paper details and the
relation provenance line; render names its empty-relations message
instead of nesting ternaries. The not-found reset, button state, map
selection and focus run in the same order. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RequestContext names the per-request server state, which was easy to
confuse with the URL route string, and the show* comment says that
nothing is appended when the record is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The split read a node's title before its state line, a relation's
needs_recheck before its number and kind, and a relation's review before
its creator. Read them in the original order again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T17:39:17.919646Z f42f41b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@OstenHun
OstenHun merged commit a7bcc0d into main Nov 23, 2026
2 checks passed
@OstenHun
OstenHun deleted the task/eslint-cleanup-web branch November 25, 2026 09:15
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