Skip to content

[OBEZS] fix(ui): the memory map's hit flash no longer crashes the page - #90

Merged
den-vasyliev merged 2 commits into
triageagent-dev:mainfrom
obezsmertnyi:fix/ui-d3-transition-side-effect
Nov 21, 2026
Merged

den-vasyliev merged 2 commits into
triageagent-dev:mainfrom
obezsmertnyi:fix/ui-d3-transition-side-effect

Conversation

@obezsmertnyi

Copy link
Copy Markdown
Collaborator

On the 2.10.0 production build the map's hit flash throws a.interrupt is not a function and the page shows "This page couldn't load": d3 is sideEffects: false, nothing reads its transition export, so the bundle drops d3-transition, which is what adds selection.interrupt() and .transition().

memory-graph.tsx now imports d3-transition for its side effect, and ui/package.json lists it as a direct dependency (3.0.2, already in the lockfile, still one copy of d3-selection). Nothing else in ui/ calls interrupt or transition on a selection.

Vitest loads d3 unbundled, so a unit test cannot catch this; the proof is the export: prototype.interrupt= is absent from out/_next/static before and present after. npm run lint and npm test (102/102) pass. Running on two of our instances since 2026-11-21: a voice search flashes the map (3 regions on one, 2 on the other) with no page error.

Fixes #ISSUE.

The d3 barrel is sideEffects:false and nothing reads its transition export, so the
production bundle lacked d3-transition's patch of selection.interrupt/transition.
Import d3-transition explicitly where the map uses them and declare it as a dependency.
@den-vasyliev
den-vasyliev merged commit 2ad9676 into triageagent-dev:main Nov 21, 2026
6 checks passed
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.

3 participants