Repository navigation
ci: lint, typecheck, test and build the ui/ app - #517
Merged
Merged
Conversation
The graph debugger in ui/ had no CI: ci.yml runs only the Python toolchain, so a change there could break the build and merge green. It already had — main carried six eslint errors and two TypeScript errors nothing reported. New workflow ui.yml, path-filtered to ui/** and itself: bun install --frozen-lockfile (fails on a stale bun.lock), eslint, tsc --noEmit (vite transpiles without type-checking, so build alone would pass a type error), vitest via test:run (the canonical runner per ui/AGENTS.md; `bun test` lacks vi.mock hoisting), and vite build. Actions pinned by SHA like the other workflows; bun pinned to 1.3.14. Fixes to bring main green under it, none changing behaviour: - applyHeatmap.test.ts: makeNode returns a typed Node, dropping six `as any`. - ControlPanel.test.tsx: defaults gain the required colorMode and onToggleColorMode props. - useGraphStore.ts: the namespace filter's predicate names NodeNamespace, the type it narrows, instead of an unrelated string. Not included: prettier --check fails on 31 files. Reformatting them would bury this change in whitespace, and the issue scopes lint, typecheck, tests and build. Closes #452 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uv6LUrB5HCQcqBvmcixYn3
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves TypeScript typing and test setup across several files, including adding color mode properties to the control panel test helper, typing the makeNode helper in heatmap tests to remove as any assertions, and using the NodeNamespace type in the graph store. A review comment suggests optimizing the namespace extraction in useGraphStore.ts by replacing the chained .map() and .filter() calls with a single-pass .reduce() to avoid intermediate array allocations on large graphs.
…e script SonarCloud failed the quality gate on #517 with two vulnerabilities in the new workflow: - githubactions:S6505: `bun install` without --ignore-scripts lets package lifecycle scripts run on the runner. No dependency here needs one: every step passes from a clean install with --ignore-scripts. - githubactions:S8543: `bunx tsc` could fetch an unpinned typescript. The check now runs as `bun run typecheck`, a package script using the typescript pinned in bun.lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uv6LUrB5HCQcqBvmcixYn3
|
3 of 4 tasks
zaebee
added a commit
that referenced
this pull request
Oct 1, 2026
`prettier --check src/` failed on 31 files: formatting had drifted with no check to catch it, and eslint-config-prettier switches ESLint's style rules off, so nothing else would. All files are reformatted with the repository's own .prettierrc (no config change), and the UI job gains a Prettier step (`bun run format:check`) after ESLint. Whitespace and wrapping only: lint, typecheck, the 119 vitest tests and the build all pass after the reformat. Follow-up to #517. Claude-Session: https://claude.ai/code/session_01Uv6LUrB5HCQcqBvmcixYn3 Co-authored-by: Claude <noreply@anthropic.com>
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.



Closes #452.
Problem
The graph debugger in
ui/had no CI.ci.ymlruns only the Python toolchain, and no workflow referencesui/, so a change there could break the build and still merge green. It already had:maincarried 6 ESLint errors and 2 TypeScript errors that nothing reported.What changes
New workflow
.github/workflows/ui.yml, path-filtered toui/**and the workflow file itself. Job "UI Verification", run inui/:bun install --frozen-lockfile --ignore-scriptsbun.lock. No dependency needs an install hook, so none gets to run code on the runner (Sonar S6505).bun run lintbun run typecheck(tsc --noEmit -p .)buildalone passes a type error. Runs as a package script so the TypeScript pinned inbun.lockis used, never an unpinnedbunxfetch (Sonar S8543).bun run test:run(vitest)ui/AGENTS.md;bun testhas novi.mockhoisting.bun run buildActions are pinned by SHA like the other workflows (
setup-bunv2.2.0). Bun is pinned to 1.3.14.permissions: contents: read.Fixes that bring
maingreen under it. None of them changes behaviour:applyHeatmap.test.ts:makeNodereturns a typedNode, which drops sixas any.ControlPanel.test.tsx: the default props gain the requiredcolorModeandonToggleColorMode(TS2322).useGraphStore.ts: the namespace filter's type predicate namesNodeNamespaceinstead ofstring(TS2677).ui/package.json: atypecheckscript.Not included
prettier --checkfails on 31 files. Reformatting them would bury this change in whitespace, and the issue scopes lint, typecheck, tests and build. It can be a separate PR that also adds a format-check step.Test plan
node_moduleswith--ignore-scripts, each exit code checked: install, lint, typecheck, tests (14 files, 119 tests) and build all exit 0.actionlintclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01Uv6LUrB5HCQcqBvmcixYn3