Skip to content

Clean up readability warnings in the graph presentation and reading view scripts - #48

Merged
OstenHun merged 4 commits into
mainfrom
task/eslint-cleanup-viewer-1
Nov 23, 2026
Merged

OstenHun merged 4 commits into
mainfrom
task/eslint-cleanup-viewer-1

Conversation

@OstenHun

Copy link
Copy Markdown
Owner

What changed and why

The fifth readability cleanup after ESLint was added (#43), and the first for the browser viewer scripts. It covers skills/danseo/assets/graph-presentation.js and skills/danseo-reading/assets/learning-view.js, which are inlined into generated HTML pages. They had 7 readability warnings and now have none, and this PR makes the readability rules errors for these two files. The other viewer scripts follow in later PRs. It changes no behavior.

  • d4c4f28 Reading view. select (125 lines) delegates the connections section (one row per relation) and the sources section (one detail per source). The connections area is still cleared before its relations are chosen.
  • 951b4de Graph presentation. explorer (98 lines) delegates the filter definitions, the select for each filter, and the status line. The relation state and edge line style use named branches instead of nested ternaries. Topic layout coordinates get descriptive local names; the fields they set are still x and y.
  • 6e6f954 promotes the rules for the two files.
  • 7355122 Review fixes. Each row, detail and control is built before it is appended, as in the original, and a comment explains why controls are registered.

Remaining warnings in the repository: 284 (291 on main).

Verification

  • npm run lint: 0 errors; 0 warnings in these files. npm run check:format, npm test (94 product and 143 skill tests), npm run check:docs, npm run test:package and git diff --check passed on Windows 11 with Node 24.22.3.
  • Differential against main (1a212c8). Both versions were run on the same inputs:
    • every exported window.DanseoGraph function on 20,000 random inputs;
    • the explorer's DOM, filters and change count over 3,000 random sequences of filter changes, updates, reveals, resets and destroys;
    • the reading view in the existing fake DOM (learning-dom.mjs) on 1,470 random valid candidates, comparing the whole DOM, focus and hash after every concept selection, previous/next click, skip-link click and hash change.
    • All compared equal. A changed class name, line style or status class was detected by the matching part.
  • Real browser. The reading view and the research view were rendered from both versions and opened side by side. The same interaction script produced identical states: 8 for the reading view (text, focus, hash, connections and sources HTML) and 10 for the research view explorer (selects, filter changes, paper selections, status line, details). The first-map view also renders. Both versions log the same pre-existing cytoscape wheel-sensitivity warning and a CSP message about an inline style; this PR does not touch them.
  • Claude Code prepared this change. Codex (read-only) and Claude Fable (read-only) reviewed it once each; their findings are applied. This is not a human review.
  • Not checked: cytoscape canvas layout and hit testing beyond viewing one page of each kind. Not run locally: Ubuntu, macOS, Node 22.

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 4 commits November 24, 2026 03:23
select delegates the connections section (one row per relation) and
the sources section (one detail per source). The DOM is updated in the
same order: the connections area is cleared before its relations are
chosen. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
explorer delegates the filter definitions, the select for each filter
and the status line. Controls are built and appended in the same order.
The relation state and edge line style use named branches instead of
nested ternaries, and topic layout coordinates get descriptive names
without changing the fields they set. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view scripts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The split appended helper results directly, which read the parent's
append before building the child. Build the relation row, source
detail and filter control first, then append, as the original code
did. Also say in a comment that each filter control is registered in
selects for reset and reveal.

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-23T18:34:28.751118Z 7355122 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.

@claude

claude Bot commented Nov 23, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@OstenHun
OstenHun merged commit 6c9803b into main Nov 23, 2026
3 checks passed
@OstenHun
OstenHun deleted the task/eslint-cleanup-viewer-1 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