refactor(core-web): remove dead libs/dotcms and libs/dot-layout-grid (#36950) - #37150
refactor(core-web): remove dead libs/dotcms and libs/dot-layout-grid (#36950)#37150nicobytes wants to merge 8 commits into
Conversation
PR 1 of the Spec-Kit two-PR flow: the issue-resolution spec only, no implementation. Scopes the removal of two dead Nx libraries from `core-web`: - `libs/dotcms` (43 files) — legacy `initDotCMS` SDK, superseded by `@dotcms/client`. Tagged skip:build/lint/test so CI never compiled it; does not compile today (`TS2307` on a `'dotcms-models'` import alias that no longer exists). Last functional commit 2022-10-05. - `libs/dot-layout-grid` (20 files) — vendored `angular2-grid` NgGrid directives, superseded by GridStack in `libs/template-builder`. Last consumer deleted in 5e75d4d (2024-08-22); does not compile today (`ComponentFactoryResolver` no longer exported by @angular/core 22). Both were verified to have zero consumers repo-wide — by path alias, by every exported symbol, and (for the directive library) by template selector, since directives are consumable from HTML without a TS import. The spec also records three of the issue's acceptance criteria as already satisfied (npm deprecation of `dotcms`, closing #35936/#35937, rescoping epic #35932 to 42 projects) and adds two dangling references the issue missed: a broken `build:docs:dotcms` typedoc script and a stale triage area entry. Per Principle V, the spec states explicitly that no new test is added and why — deleting zero-consumer code has no behavior to assert — and defines an executable Red/Green removal assertion plus the existing `nx affected -t build,lint,test` regression gate in its place. Refs: #36950 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…36950) Both Nx libraries had zero consumers, were excluded from every CI gate, and did not compile against Angular 22. - libs/dotcms (43 files) — legacy initDotCMS SDK (npm dotcms@0.0.21), superseded by @dotcms/client. Tagged skip:build/lint/test, so `nx run-many -t build --exclude=tag:skip:build` (core-web/pom.xml:196) never compiled it. Three files imported from 'dotcms-models', an alias that no longer exists, so it failed with TS2307 regardless of strict mode. Last functional commit 2022-10-05. - libs/dot-layout-grid (20 files) — vendored angular2-grid NgGrid directives, superseded by GridStack in libs/template-builder. Had no build target at all. NgGrid.ts imported ComponentFactoryResolver, which @angular/core 22 no longer exports. Last consumer deleted in 5e75d4d (2024-08-22); never published to npm. Zero consumers was verified by path alias, by every exported symbol, and — for the directive library, which templates can use by selector without a TS import — by searching [ngGrid], [ngGridItem] and ng-grid-placeholder across .html/.vtl/.jsp/.ts/.js. Also removes two dangling references the issue did not list: - core-web/package.json build:docs:dotcms, already broken because libs/dotcms/typedoc.json does not exist - .claude/triage-config.json stale dot-layout-grid triage area No test is added: this deletes code with zero call sites, so there is no behavior to assert (Constitution Principle V declared exception). The gate is instead an executable removal assertion plus the existing suite. Verified: Nx projects 57 -> 55 with exactly these two removed and nothing else changed; build (17 projects), lint (46) and test (42) all green; nx graph resolves, so the tsconfig paths block is intact; pnpm-lock.yaml byte-identical; the four @dotcms/dotcms-* sibling aliases, build:docs:dotcms-models and the generic '@dotcms/**' eslint pattern untouched. npm dotcms@0.0.21 stays published — it is already deprecated in favor of @dotcms/client, and removing monorepo source does not unpublish it. Also corrects two verification commands in spec.md post-approval (form only, no AC change): `nx show projects` emits single-line JSON when piped, so the assertion needs `--json | jq -r '.[]'`; and BRE `\|` -> ERE `|`. Closes: #36950 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @nicobytes's task in 32s —— View job SDK Compatibility Analysis
Verdict: No SDK breaking change detected. AnalysisThe diff (71 files, +262/-4999) touches only:
None of these touch any of the surfaces the reference doc flags:
This is a pure dead-code removal (unused legacy JS SDK + unused vendored grid library) plus cleanup of dangling references in config/docs/CI files — no wire-format, GraphQL schema, REST shape, postMessage protocol, or version-handshake code is touched. Per the custom instructions, no PR comment or label is posted since this is not a breaking change. |
There was a problem hiding this comment.
Pull request overview
Removes two unused/dead Nx libraries from the core-web workspace (libs/dotcms legacy JS SDK and libs/dot-layout-grid legacy Angular grid directives) and cleans up the remaining workspace references so the Nx graph/paths/scripts/docs no longer mention them.
Changes:
- Deleted
core-web/libs/dotcms/andcore-web/libs/dot-layout-grid/source trees. - Removed TypeScript path aliases and Nx/Jest plugin include entries that referenced those libs.
- Removed stale docs/triage/documentation references (README rows, broken docs script, triage area entry).
Reviewed changes
Copilot reviewed 69 out of 69 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| specs/36950-remove-dead-core-web-libs/spec.md | Spec/verification record accompanying the deletion work. |
| core-web/tsconfig.base.json | Removes @dotcms/dotcms and @dotcms/dot-layout-grid path aliases. |
| core-web/README.MD | Removes library rows for the deleted projects from the workspace table. |
| core-web/package.json | Removes broken build:docs:dotcms script entry. |
| core-web/nx.json | Removes libs/dotcms/**/* from Jest plugin include globs. |
| .claude/triage-config.json | Removes stale core-web/libs/dot-layout-grid triage area. |
| core-web/libs/dotcms/tsconfig.spec.json | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/tsconfig.lib.json | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/tsconfig.json | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/utils/request.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/utils/getEsQuery.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/utils/DotCMSHttpClient.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/index.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSSite.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSPageFormat.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSPage.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSNavigation.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSLanguage.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSHttpClient.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSForm.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSEvent.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSError.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSContent.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSConfiguration.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/models/DotCMSAuthorization.model.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiWidget.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiWidget.spec.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiSite.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiPage.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiPage.spec.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiNavigation.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiLanguage.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiForm.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiForm.spec.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiEvent.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiElasticSearch.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiContentType.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiContentType.spec.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiContent.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiContent.spec.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiConfiguration.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/lib/api/DotApiAuthorization.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/src/index.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/README.md | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/project.json | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/package.json | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/jest.config.ts | Deleted (part of removing libs/dotcms). |
| core-web/libs/dotcms/eslint.config.mjs | Deleted (part of removing libs/dotcms). |
| core-web/libs/dot-layout-grid/tsconfig.spec.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/tsconfig.lib.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/tsconfig.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/test.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/public_api.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/NgGrid.css | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/NgGrid_FixSmall.css | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/modules/NgGrid.module.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/helpers/NgGridHelper.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/directives/NgGridItem.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/directives/NgGrid.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/src/lib/components/NgGridPlaceholder.ts | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/README.md | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/project.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/package.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/ng-package.prod.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/ng-package.json | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/karma.conf.js | Deleted (part of removing libs/dot-layout-grid). |
| core-web/libs/dot-layout-grid/eslint.config.mjs | Deleted (part of removing libs/dot-layout-grid). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Registers the speckit feature tracking file so tooling can locate the spec directory for the dead core-web libs cleanup work.
…36950) Review catch on #37150: this PR removed the `build:docs:dotcms` script from core-web/package.json, but .github/workflows/publish_docs.yml still invoked it — an eighth dangling reference to libs/dotcms that the original sweep missed, because that sweep matched library paths rather than the npm script name. Keeps `build:docs:dotcms-models`, whose library is still live. Two corrections to the review's framing, for the record: - The workflow is `disabled_manually` in GitHub Actions and has no run history, so it would not have failed on the next push to main. The reference was stale, not actively breaking. - `build:docs:dotcms-models` is broken too: no typedoc.json exists anywhere in the repo (both were deleted around #23122/#23257), so the whole "Run NX Commands" step cannot succeed even after this fix. That is pre-existing and unrelated to libs/dotcms, so it is left alone here; the workflow looks like a candidate for outright deletion in a follow-up — it also pins Node 16.13.2 and runs `npm install` in a pnpm workspace. publish_docs.yml matches neither `.github/workflows/cicd_comp_*.yml` nor `cicd_1-pr.yml`, so it does not match the `backend` path filter and this PR stays frontend-only for merge-queue purposes (ADR-0013). Refs: #36950 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review feedback addressed — 9df2078Both reviewers flagged the same single issue, and it was real: Root cause of the miss: my reference sweep matched library paths ( Two corrections to the reported severityThe workflow would not have failed on the next push to
Both configs disappeared around #23122 / #23257. So the Scope decisionI deliberately did not fix
Re-verified after the fix
|
Re: the failing QA Stuck Check — PR validate jobThat failure is not caused by this PR — it's a pre-existing time bomb on Why it runs here at allThe validate workflow triggers on changes to Why it fails
Verified pre-existing — it reproduces on a clean checkout of git checkout main
node .github/scripts/qa-stuck-check/test-find-stuck-issues.js # fails#37169 freezes the whole This PR's own gates were green: Minor: stray file in this PR
|
PR 2 of 2 — the implementation
Spec approved in #37147 (PR 1, spec only). This PR carries the actual removal.
Closes #36950
What was removed
core-web/libs/dotcms/initDotCMSJS SDK (npmdotcms@0.0.21), superseded by@dotcms/clientcore-web/libs/dot-layout-grid/angular2-grid(NgGrid) directives, superseded by GridStack inlibs/template-builderPlus the seven references that pointed at them, across five files:
core-web/tsconfig.base.json@dotcms/dotcmsand@dotcms/dot-layout-gridpath aliasescore-web/nx.jsonlibs/dotcms/**/*from the@nx/jest/pluginincludeglobcore-web/package.jsonbuild:docs:dotcms— already broken, itslibs/dotcms/typedoc.jsondoes not existcore-web/README.MD.claude/triage-config.jsoncore-web/libs/dot-layout-gridtriage areaThe last two were not in the issue's AC list — they are dangling references it missed.
Verification
Both stories ran a genuine Red → Green gate (assertions confirmed failing before the deletion, passing after).
nx run-many -t build --exclude=tag:skip:build(the CI command,core-web/pom.xml:196)nx graphtsconfig.base.jsonpathsblock is still coherenttsconfig.base.json,nx.json,package.json,triage-config.jsonspecs/, which documents the paths)pnpm-lock.yamla4975568…, no workspace entry existedtesttargetnx.jsonglob edit cost no surviving project its test target@dotcms/dotcms-*aliases,build:docs:dotcms-models, and the generic'@dotcms/**'eslint pattern all still presentThree of the issue's ACs were already satisfied before this work
No action taken on these; recorded for the reviewer:
npm deprecate dotcms— already done. The registry reportsdeprecated = 'Please use @dotcms/client'. Deleting monorepo source does not unpublish the package, and it stays installable (~439 downloads/month).ADR alignment
Consulted
dotCMS/platform-adrsvia the mandatorybefore_planhook.core-web/**; the seventh (.claude/triage-config.json) matches no filter in.github/filters.yaml, and sincedorny/paths-filteruses OR logic it sets no flag rather than flippingbackendtrue. So this stays a frontend-only PR and thecore-webbuild is the meaningful gate.libs/dotcmsis a pre-lockstep legacy SDK outsidelibs/sdk/**; removing it and its unusedpublishtarget moves toward that ADR's end state.Note for the reviewer
Two verification commands in
spec.mdwere corrected after PR 1 was approved. No acceptance criterion changed — command form only:nx show projectsemits a single-line JSON array when stdout is not a TTY, so the original| grep '^dotcms$'assertion could never match. Now--json | jq -r '.[]'.grep -Eportability fix (BRE\|→ ERE|).Say the word if you'd rather these were split out rather than folded in.
plan.md,tasks.md, andchecklists/are absent by design —.gitignorelines 229-233 deliberately ignorespecs/*/plan.md,specs/*/tasks.md, andspecs/*/checklists/.🤖 Generated with Claude Code