fix(web): keep linked service graph roots together #539

Closed
simon wants to merge 1 commit from fix/service-graph-link-gravity into main
Owner

Summary

  • pass ITIL service dependency edges into the service graph layout helper
  • group dependency-linked root service trees together before assigning positions
  • remove the extra root spacer only between adjacent linked root trees so connected services render closer together
  • add a layout regression test for a cross-root service dependency

Validation

  • node --experimental-strip-types --test apps/web/lib/services/service-graph-layout.test.mjs
  • pnpm --filter web type-check
  • pnpm --filter web exec eslint lib/services/service-graph-layout.ts lib/services/service-graph-layout.test.mjs app/(dashboard)/services/service-graph.tsx
  • pnpm --filter web test:unit
  • pnpm --filter web lint (passes with existing warnings tracked by #521)
  • BETTER_AUTH_URL=http://localhost:3000 DATABASE_URL=postgresql://ctops:ctops@localhost:5432/ctops pnpm --filter web build (passes; unrelated Turbopack NFT trace warning tracked by #538)

Notes

This keeps the layout deterministic rather than adding a runtime physics simulation. Dependency-linked root groups are pulled together during static layout, while unrelated roots retain the existing spacing.

## Summary - pass ITIL service dependency edges into the service graph layout helper - group dependency-linked root service trees together before assigning positions - remove the extra root spacer only between adjacent linked root trees so connected services render closer together - add a layout regression test for a cross-root service dependency ## Validation - `node --experimental-strip-types --test apps/web/lib/services/service-graph-layout.test.mjs` - `pnpm --filter web type-check` - `pnpm --filter web exec eslint lib/services/service-graph-layout.ts lib/services/service-graph-layout.test.mjs app/(dashboard)/services/service-graph.tsx` - `pnpm --filter web test:unit` - `pnpm --filter web lint` (passes with existing warnings tracked by #521) - `BETTER_AUTH_URL=http://localhost:3000 DATABASE_URL=postgresql://ctops:ctops@localhost:5432/ctops pnpm --filter web build` (passes; unrelated Turbopack NFT trace warning tracked by #538) ## Notes This keeps the layout deterministic rather than adding a runtime physics simulation. Dependency-linked root groups are pulled together during static layout, while unrelated roots retain the existing spacing.
fix(web): keep linked service graph roots together
All checks were successful
Conventional PR title / Conventional PR title (pull_request) Successful in 0s
PR Checks (Docker images) / Ansible API contract (pull_request) Successful in 7s
PR Checks (Docker images) / Detect Docker image changes (pull_request) Successful in 9s
Customer bundle check / validate (pull_request) Successful in 15s
PR Checks (Docker images) / Ingest Docker image (pull_request) Has been skipped
PR Checks (Docker images) / Ansible API Docker image (pull_request) Has been skipped
Secret Scan / gitleaks (pull_request) Successful in 27s
SAST / crypto-lint (no weak hashes / ciphers) (pull_request) Successful in 1m6s
SAST / semgrep (pull_request) Successful in 1m12s
SAST / gosec (agent) (pull_request) Successful in 1m59s
SAST / trivy (filesystem) (pull_request) Successful in 2m8s
SAST / gosec (ingest) (pull_request) Successful in 2m9s
SAST / trivy (config / IaC) (pull_request) Successful in 2m1s
PR Checks (Web) / Web (lint / type-check / build) (pull_request) Successful in 2m38s
PR Checks (Docker images) / Web Docker image (pull_request) Successful in 7m52s
220ce280d4
Author
Owner

Landed on main as aefac91c after fj merge returned 405, then released via web/v0.234.1 and bundle/v0.103.1.

Landed on main as aefac91c after fj merge returned 405, then released via web/v0.234.1 and bundle/v0.103.1.
simon closed this pull request 2026-06-07 19:07:41 +00:00
All checks were successful
Conventional PR title / Conventional PR title (pull_request) Successful in 0s
PR Checks (Docker images) / Ansible API contract (pull_request) Successful in 7s
PR Checks (Docker images) / Detect Docker image changes (pull_request) Successful in 9s
Customer bundle check / validate (pull_request) Successful in 15s
PR Checks (Docker images) / Ingest Docker image (pull_request) Has been skipped
PR Checks (Docker images) / Ansible API Docker image (pull_request) Has been skipped
Secret Scan / gitleaks (pull_request) Successful in 27s
SAST / crypto-lint (no weak hashes / ciphers) (pull_request) Successful in 1m6s
SAST / semgrep (pull_request) Successful in 1m12s
SAST / gosec (agent) (pull_request) Successful in 1m59s
SAST / trivy (filesystem) (pull_request) Successful in 2m8s
SAST / gosec (ingest) (pull_request) Successful in 2m9s
SAST / trivy (config / IaC) (pull_request) Successful in 2m1s
PR Checks (Web) / Web (lint / type-check / build) (pull_request) Successful in 2m38s
PR Checks (Docker images) / Web Docker image (pull_request) Successful in 7m52s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carrtech/ct-ops!539
No description provided.