Skip to content

chore(deps): update dagre to @dagrejs/dagre v3.1.1 - #16836

Open
Joibel wants to merge 1 commit into
argoproj:mainfrom
Joibel:chore/dagrejs-dagre-3
Open

chore(deps): update dagre to @dagrejs/dagre v3.1.1#16836
Joibel wants to merge 1 commit into
argoproj:mainfrom
Joibel:chore/dagrejs-dagre-3

Conversation

@Joibel

@Joibel Joibel commented Aug 28, 2026

Copy link
Copy Markdown
Member

See the pull request guide for details on each item.

  • Ran make pre-commit -Bmake lint passes; codegen/docs could not run in my environment (no buf/markdownlint); neither is relevant to a UI-only dependency change
  • Signed-off commits with Conventional Commit messages
  • PR title is a conventional commit message (it becomes the release notes entry)
  • Unit or e2e tests cover the change
  • For features: an associated issue and a feature description file (make feature-new) — n/a, not a feature
  • Opened as draft; will mark "Ready for review" once builds are green

Motivation

The UI's graph layout uses dagre@0.8.5, the last release of the unscoped package (2019). The project moved to @dagrejs/dagre, currently 3.1.1. The new package ships its own TypeScript types, so @types/dagre goes too, and it no longer depends on lodash.

Dependency checks: MIT licensed, actively maintained (3.1.1 released 2026-08-08), yarn audit clean.

Modifications

  • ui/package.json, ui/yarn.lock: dagre + @types/dagre@dagrejs/dagre@^3.1.1 (pulls @dagrejs/graphlib@4.0.5; drops graphlib@2).
  • ui/src/shared/components/graph/pretty-layout.ts: import from @dagrejs/dagre; instantiate Graph with dagre's GraphLabel/NodeLabel/EdgeLabel generics (they default to any, which tripped noImplicitAny on edge().points). No layout API changes were needed.

Rendered against a live cluster, 351-node DAG:

image image

Verification

  • yarn lint, yarn test (28 suites), yarn build all pass.
  • Ran the UI against a live v4.1.2 argo-server; DAG renders correctly in both vertical and horizontal layouts with no new console errors.

Documentation

None needed — internal UI dependency.

AI

Claude Code (Claude Fable 5) produced the change, ran the verification, and drafted this description; reviewed by the author.

Summary by CodeRabbit

  • Bug Fixes
    • Updated graph layout support to use the latest Dagre package, improving compatibility and reliability.
    • Preserved existing graph layout behavior while ensuring type-safe graph configuration.

Replace the unmaintained unscoped dagre@0.8.5 (and @types/dagre) with
@dagrejs/dagre@3.1.1, which ships its own TypeScript types and drops the
lodash dependency. Instantiate the layout graph with dagre's own label
types since the new Graph generics default to any.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6uCkYGPcvx4qighMPonGz
Signed-off-by: Alan Clucas <alan@clucas.org>
@Joibel
Joibel requested a review from MasonM August 28, 2026 14:49
@Joibel
Joibel marked this pull request as ready for review August 28, 2026 14:56
@Joibel
Joibel requested a review from a team as a code owner August 28, 2026 14:56
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 13ca8f11-aba6-4bb0-8d49-93f79f5a71ad

📥 Commits

Reviewing files that changed from the base of the PR and between bde5adf and 45ab795.

⛔ Files ignored due to path filters (1)
  • ui/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • ui/package.json
  • ui/src/shared/components/graph/pretty-layout.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The UI replaces dagre with @dagrejs/dagre, removes @types/dagre, and adds explicit graph, node, and edge label types to the graph layout implementation.

Changes

Dagre migration

Layer / File(s) Summary
Typed Dagre integration
ui/package.json, ui/src/shared/components/graph/pretty-layout.ts
The UI uses @dagrejs/dagre version ^3.1.1, removes @types/dagre, and constructs the graph with explicit generic label types.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 45ab7

This localized UI dependency update changes the graph library and its import while preserving layout behavior; lint, tests, build, and live DAG rendering pass, so no actionable merge-blocking risk remains.

Suggested reviewers: masonm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: replacing the unscoped Dagre dependency with @dagrejs/dagre version 3.1.1.
Description check ✅ Passed The description covers the required motivation, modifications, verification, documentation, AI disclosure, and checklist items. The unchecked pre-commit item includes a clear explanation, and the omit…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the required motivation, modifications, verification, documentation, AI disclosure, and checklist items. The unchecked pre-commit item includes a clear explanation, and the omitted issue reference is non-critical for this dependency-only change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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