Skip to content

Conversation

@nossila
Copy link
Member

@nossila nossila commented Sep 15, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive GraphQL schema for Wagtail, enabling rich queries, mutations, subscriptions, and Relay-style pagination.
  • Tests

    • Improved mock fetch utilities with robust URL normalization and safer defaults for test environment variables.
  • Documentation

    • Updated changelogs across packages to reflect releases and dependency catalog moves.
  • Chores

    • Centralized dependency management via workspace catalogs; removed legacy dev tools; added shared ESLint plugin; minor package version bumps.
    • Adjusted build/config files (e.g., Relay config export) and a small type-check suppression with no runtime impact.

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2025

⚠️ No Changeset found

Latest commit: 73c76e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Sep 15, 2025

Walkthrough

Dependency management shifted to pnpm workspace catalogs across multiple packages with version bumps and dev tooling additions. Introduces a large Wagtail GraphQL schema and centralizes Relay config. Refines test utilities with URL normalization and env var guard. Adds a TS ignore in Scrollbar and switches getTokenSSR to dynamically import next/headers.

Changes

Cohort / File(s) Summary
Workspace catalog reorg
pnpm-workspace.yaml, package.json
Reorganized catalogs (added components/design-system/eslint-plugin/utils groups), added Parcel TS packages and axios-mock-adapter; removed dev-tools group; switched some root devDependencies to catalog and removed chalk/chokidar/execa.
Package manifests: catalog switches & version bumps
packages/*/package.jsonpackages/components/package.json, packages/design-system/package.json, packages/eslint-plugin/package.json, packages/graphql/package.json, packages/provider/package.json, packages/test/package.json, packages/utils/package.json, packages/wagtail/package.json, packages/config/package.json, packages/authentication/package.json
Moved various deps/devDeps to catalog references; added devDependency @baseapp-frontend/eslint-plugin (workspace:*); version bumps across multiple packages (authentication, config, design-system, eslint-plugin, graphql, provider, test, utils, wagtail).
Design System: Scrollbar TS suppression
packages/design-system/components/web/scrollbars/Scrollbar/index.tsx
Added // @ts-ignore before StyledScrollbar scrollableNodeProps to silence type checking.
Utils: SSR token retrieval
packages/utils/functions/token/getTokenSSR/index.ts
Replaced static import with dynamic await import('next/headers') before calling cookies().
Test utilities: fetch mocks
packages/test/utils/mockFetch/index.ts, packages/test/utils/mockFetchError/index.ts, packages/test/__mocks__/fetch.ts
Implemented robust URL normalization and method checks in mockFetch/mockFetchError; added module guard to set NEXT_PUBLIC_API_BASE_URL when undefined.
Wagtail: Relay config and schema
packages/wagtail/relay.config.js, packages/wagtail/schema.graphql
Relay config now re-exports central config; added comprehensive Relay-style GraphQL schema with queries, mutations, subscriptions, types, connections, and enums.
Changelogs
packages/*/CHANGELOG.mdpackages/authentication/CHANGELOG.md, packages/components/CHANGELOG.md, packages/config/CHANGELOG.md, packages/design-system/CHANGELOG.md, packages/eslint-plugin/CHANGELOG.md, packages/graphql/CHANGELOG.md, packages/provider/CHANGELOG.md, packages/test/CHANGELOG.md, packages/utils/CHANGELOG.md, packages/wagtail/CHANGELOG.md
Added entries documenting catalog migration, version bumps, and specific notes (UI fixes in components; utils on-demand import; test mock updates; dependency updates).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant T as Test Code
  participant M as mockFetch (utils)
  participant C as Config

  Note over T,M: Request interception in tests
  T->>M: mockFetch(url, { method, body })
  M->>M: Normalize request URL (strip protocol/host, /vN, ensure leading /)
  M->>M: Normalize expected URL (ensure leading /)
  M->>M: Compare normalized URL + method
  alt Match
    M-->>T: Resolve with configured response (200-style)
  else No match
    M-->>T: Return 404 response
  end
Loading
sequenceDiagram
  autonumber
  participant S as Server-side code
  participant U as getTokenSSR
  participant N as next/headers

  S->>U: getTokenSSR()
  U->>N: await import('next/headers')
  U->>N: cookies()
  N-->>U: CookieStore
  U->>U: Read token key from cookies
  U-->>S: Return token (or null)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

needs review

Suggested reviewers

  • priscilladeroode
  • anicioalexandre
  • deboracosilveira

Poem

A catalog hop, a schema leap,
I twitch my nose, commit runs deep.
Mocks now sniff each URL trail,
Tokens fetched without a fail.
Relay rails for wagtail’s flight—
Carrot-shaped versions, patched just right.
Thump-thump, shipped tonight! 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title "unlock git submodule" is misleading relative to the changes in the diff; the patchset primarily migrates dependency pins into pnpm-workspace catalogs, bumps many package versions, adds a large Wagtail GraphQL schema, and contains assorted code/test tooling tweaks with no visible git submodule modifications. Because the title does not describe the main changes and could confuse reviewers scanning history, it fails the title check. Rename the PR to a concise title that reflects the primary change (for example, "Migrate dependencies to pnpm-workspace catalogs and bump package versions" or "Add Wagtail GraphQL schema and migrate dependency catalogs"). If the intent was to unlock a git submodule, either include the submodule-related changes or clarify why the branch name/title references that intent. Keep the title short and specific so reviewers immediately understand the primary scope.
Description Check ⚠️ Warning No pull request description was provided while the repository requires using the provided template (which expects package name/version and changelog_info entries); the absence of any description prevents reviewers from understanding intent, scope, and required verification steps. This omission means the description check fails. Please populate the PR description using the repository template: list each affected package with its package name and new version (e.g., "- __package_name__ package update - v __package_version__") and add concise changelog_info explaining what changed and why, plus any migration or testing instructions. If the PR spans many packages, either provide per-package entries or a clear overall summary that calls out breaking changes, behavioral impacts, and how reviewers should validate the changes. Updating the description will speed review and reduce follow-up questions.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/git-submodule

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/design-system/components/web/scrollbars/Scrollbar/index.tsx (1)

3-3: Remove ts-ignore by bridging the ref; ensure sx actually applies on desktop (non-SSR, non-mobile)

  • The ignore on Line 37 can be eliminated by using a local ref and useImperativeHandle.
  • sx passed to StyledScrollbar won’t be applied because it’s a styled(SimpleBar) component, not a system-aware MUI component. Wrap the desktop branch with a Box that consumes sx.

Apply this diff:

-import { forwardRef, memo } from 'react'
+import { forwardRef, memo, useImperativeHandle, useRef } from 'react'
@@
-const Scrollbar = forwardRef<HTMLDivElement, ScrollbarProps>(({ children, sx, ...other }, ref) => {
+const Scrollbar = forwardRef<HTMLDivElement, ScrollbarProps>(({ children, sx, ...other }, ref) => {
   const { isSSR } = useSSR()
 
   const userAgent = typeof navigator === 'undefined' ? 'SSR' : navigator.userAgent
   const mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)
+  const scrollRef = useRef<HTMLDivElement | null>(null)
+  useImperativeHandle(ref, () => scrollRef.current as HTMLDivElement | null)
@@
-    return (
-      <Box ref={ref} sx={{ overflow: 'hidden', ...sx }} {...other}>
+    return (
+      <Box ref={scrollRef} sx={{ overflow: 'hidden', ...sx }} {...other}>
         {children}
       </Box>
     )
@@
-    return (
-      <Box ref={ref} sx={{ overflow: 'auto', ...sx }} {...other}>
+    return (
+      <Box ref={scrollRef} sx={{ overflow: 'auto', ...sx }} {...other}>
         {children}
       </Box>
     )
@@
-  return (
-    <StyledRootScrollbar>
-      <StyledScrollbar
-        // @ts-ignore TODO: check typing
-        scrollableNodeProps={{
-          ref,
-        }}
-        clickOnTrack={false}
-        sx={sx}
-        {...other}
-      >
-        {children}
-      </StyledScrollbar>
-    </StyledRootScrollbar>
-  )
+  return (
+    <Box sx={sx}>
+      <StyledRootScrollbar>
+        <StyledScrollbar
+          scrollableNodeProps={{ ref: scrollRef }}
+          clickOnTrack={false}
+          {...other}
+        >
+          {children}
+        </StyledScrollbar>
+      </StyledRootScrollbar>
+    </Box>
+  )

Also applies to: 12-16, 34-47, 37-41

packages/test/package.json (1)

11-11: Typo in lint script: use --noEmit (camelCase) for tsc

Current flag likely isn’t recognized; tsc expects --noEmit.

Apply:

-    "lint": "eslint . --ext .tsx --ext .ts && tsc --noemit",
+    "lint": "eslint . --ext .tsx --ext .ts && tsc --noEmit",
packages/design-system/package.json (1)

91-116: Catalog migration: fix unaliased catalog: entries in packages/design-system/package.json

Several dependencies use plain catalog: (no alias); pnpm requires catalog:<name> and these will fail to resolve.

  • Unaliased deps: jotai, js-cookie, lodash, next, react-hook-form, react-international-phone, simplebar-react, zustand.
  • pnpm-workspace.yaml currently shows only react19 under catalogs:; add the missing aliases or update the package.json entries to point to existing catalog aliases.
    Action: update packages/design-system/package.json (lines 91–116) to use catalog:<alias> for each dependency or add the corresponding catalog mappings in pnpm-workspace.yaml.
🧹 Nitpick comments (17)
packages/utils/functions/token/getTokenSSR/index.ts (2)

5-5: Remove unnecessary await on cookies().

cookies() is synchronous in Next; awaiting it is redundant.

-  const cookieStore = await cookies()
+  const cookieStore = cookies()

3-8: Add explicit types (and optionally enforce server-only usage).

Improves API clarity and compile-time checks. Consider server-only guard if this package is Next-only.

-export const getTokenSSR = async (key = ACCESS_KEY_NAME) => {
+export const getTokenSSR = async (key: string = ACCESS_KEY_NAME): Promise<string | undefined> => {

Optional (only if all consumers run on Next.js server):

+import 'server-only'

Verify consumers before adding the guard.

packages/design-system/components/web/scrollbars/Scrollbar/styled.ts (1)

6-8: Stop ignoring types; remove the ts-ignore and type the styled component

Once the ambient module exists, this ignore should go.

Apply this diff:

-// @ts-ignore TODO: check typing
-import SimpleBar from 'simplebar-react'
+import SimpleBar from 'simplebar-react'

Additionally, avoid casting to FC (it erases useful props like the as prop). Prefer a typed styled component and filter sx so it doesn't leak to the DOM:

// Replace the FC cast with a typed styled component
export const StyledScrollbar = styled(SimpleBar, {
  shouldForwardProp: (prop) => prop !== 'sx',
})<ScrollbarProps>(({ theme }) => ({
  maxHeight: '100%',
  '& .simplebar-scrollbar': {
    '&:before': { backgroundColor: alpha(theme.palette.grey[600], 0.48) },
    '&.simplebar-visible:before': { opacity: 1 },
  },
  '& .simplebar-mask': { zIndex: 'inherit' },
}));
packages/design-system/components/web/scrollbars/Scrollbar/index.tsx (1)

20-31: Filter non-DOM props when rendering Box on SSR/mobile

Spreading ...other into Box can leak SimpleBar-only props (e.g., clickOnTrack) into the DOM, causing React warnings.

Apply this small guard:

-const Scrollbar = forwardRef<HTMLDivElement, ScrollbarProps>(({ children, sx, ...other }, ref) => {
+const Scrollbar = forwardRef<HTMLDivElement, ScrollbarProps>(({ children, sx, ...other }, ref) => {
   const { isSSR } = useSSR()
@@
   const mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)
+  const { clickOnTrack, scrollableNodeProps, ...restDomProps } = other
@@
-      <Box ref={scrollRef} sx={{ overflow: 'hidden', ...sx }} {...other}>
+      <Box ref={scrollRef} sx={{ overflow: 'hidden', ...sx }} {...restDomProps}>
@@
-      <Box ref={scrollRef} sx={{ overflow: 'auto', ...sx }} {...other}>
+      <Box ref={scrollRef} sx={{ overflow: 'auto', ...sx }} {...restDomProps}>
packages/test/__mocks__/fetch.ts (1)

1-5: Remove process.env mutation from shared mock

packages/test/mocks/fetch.ts is loaded via setupFilesAfterEnv (packages/test/jest.config.ts); assigning NEXT_PUBLIC_API_BASE_URL at module load mutates global state across tests. Remove the assignment from the mock and either set the default in a dedicated Jest setup file (e.g. packages/test/jest.setup.ts — process.env.NEXT_PUBLIC_API_BASE_URL ??= '' added to setupFiles/setupFilesAfterEnv) or update the mockFetch normalizers to handle undefined.

packages/test/utils/mockFetchError/index.ts (2)

34-38: Normalize expected URL consistently (version prefix, trailing slash).

Avoid mismatches when tests pass /v1/foo or trailing slashes.

Apply:

-    let normalizedExpectedUrl = url
+    let normalizedExpectedUrl = url
     if (!normalizedExpectedUrl.startsWith('/')) {
       normalizedExpectedUrl = `/${normalizedExpectedUrl}`
     }
+    normalizedExpectedUrl = normalizedExpectedUrl.replace(/^\/v\d+/, '')
+    if (normalizedExpectedUrl.length > 1 && normalizedExpectedUrl.endsWith('/')) {
+      normalizedExpectedUrl = normalizedExpectedUrl.slice(0, -1)
+    }

53-53: Return type inconsistency with mockFetch (Response vs plain object).

mockFetch returns a POJO; here the fallback returns a Response. Mixing shapes can make tests brittle.

Consider returning a POJO like in mockFetch for the non‑match branch (or migrate both to Response for consistency).

packages/test/utils/mockFetch/index.ts (3)

18-24: Normalize path robustly and ignore query/hash.

Mirror the recommended parsing from mockFetchError to avoid mismatches when requestUrl has a query or hash.

Apply:

-    // Remove protocol and domain if present
-    if (normalizedRequestUrl.includes('://')) {
-      const urlParts = normalizedRequestUrl.split('/')
-      const pathStartIndex = urlParts.findIndex((_, index) => index > 2)
-      normalizedRequestUrl = `/${urlParts.slice(pathStartIndex).join('/')}`
-    }
+    // Remove protocol/host if present using URL API when possible
+    if (normalizedRequestUrl.includes('://')) {
+      try {
+        normalizedRequestUrl = new URL(normalizedRequestUrl).pathname
+      } catch {
+        const parts = normalizedRequestUrl.split('/')
+        normalizedRequestUrl = `/${parts.slice(3).join('/')}`
+      }
+    }
+
+    // Drop query and hash
+    normalizedRequestUrl = normalizedRequestUrl.split('?')[0].split('#')[0]
@@
-    // Ensure path starts with /
+    // Ensure path starts with / and normalize trailing slash (except root)
     if (!normalizedRequestUrl.startsWith('/')) {
       normalizedRequestUrl = `/${normalizedRequestUrl}`
     }
+    if (normalizedRequestUrl.length > 1 && normalizedRequestUrl.endsWith('/')) {
+      normalizedRequestUrl = normalizedRequestUrl.slice(0, -1)
+    }

Also applies to: 25-33


33-38: Normalize expected URL similarly (version, trailing slash).

Keeps both sides symmetric.

Apply:

-    let normalizedExpectedUrl = url
+    let normalizedExpectedUrl = url
     if (!normalizedExpectedUrl.startsWith('/')) {
       normalizedExpectedUrl = `/${normalizedExpectedUrl}`
     }
+    normalizedExpectedUrl = normalizedExpectedUrl.replace(/^\/v\d+/, '')
+    if (normalizedExpectedUrl.length > 1 && normalizedExpectedUrl.endsWith('/')) {
+      normalizedExpectedUrl = normalizedExpectedUrl.slice(0, -1)
+    }

6-11: DRY: extract a shared normalizer to avoid drift between mocks.

Both files duplicate this logic. Consider a tiny helper (e.g., packages/test/utils/url.ts) and unit tests for it.

pnpm-workspace.yaml (1)

13-14: Parcel toolchain added to catalog (packager/transformer).

Confirm compatibility with parcel pinned under catalogs.eslint-plugin (2.12.0). If possible, align all Parcel bits to the same major/minor to reduce duplication.

packages/design-system/package.json (1)

5-5: CSS exports can be tree‑shaken away with sideEffects: false.

You export CSS files under exports, but sideEffects is false. Many bundlers will drop CSS imports unless marked as having side effects.

  • Action: declare CSS as side effects.

Apply:

-  "sideEffects": false,
+  "sideEffects": [
+    "./styles/web/tailwind/globals.css",
+    "./styles/web/material/globals.css"
+  ],

Also applies to: 52-57

packages/wagtail/schema.graphql (5)

277-296: Mixed pagination styles and loosely typed filters.

You accept both cursor args (before/after/first/last) and offset simultaneously, and orderBy/profileId are String. This complicates clients and backend logic, and invites injection bugs server‑side.

  • Action: pick cursor-based pagination (Relay) and drop offset. Replace orderBy: String with an enum of allowed fields/directions. Use profileId: ID instead of String.

339-341: Typo and type improvement for comment language.

  • Fix typo: “languaged used…” -> “language used…”
  • Prefer Languages enum over raw String for language.

1797-1802: Invalid/pointless default value on enum input field.

roleType: ProfileRoles = null sets a null default for an enum. Many GraphQL toolchains reject or ignore = null on input fields; omission already implies null.

  • Action: remove the default or make the field nullable without a default.
-  roleType: ProfileRoles = null
+  roleType: ProfileRoles

1137-1143: Prefer ID types for identifiers in inputs.

PageCreateInput.user: String likely represents a user identifier. Use ID (and consider naming it userId) for consistency and to enable better tooling/codegen.

-  user: String
+  userId: ID

1233-1234: Count field typed as JSON string.

commentsCount: JSONString! should be an Int (or an object with typed counters). Serializing counts as JSON harms type safety.

-  commentsCount: JSONString!
+  commentsCount: CommentsCount!
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fdfe4d and 6793df3.

⛔ Files ignored due to path filters (2)
  • packages/wagtail/__generated__/.keep is excluded by !**/__generated__/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (19)
  • package.json (1 hunks)
  • packages/components/package.json (3 hunks)
  • packages/design-system/components/web/scrollbars/Scrollbar/index.tsx (1 hunks)
  • packages/design-system/components/web/scrollbars/Scrollbar/styled.ts (1 hunks)
  • packages/design-system/components/web/scrollbars/Scrollbar/types.ts (1 hunks)
  • packages/design-system/package.json (4 hunks)
  • packages/eslint-plugin/package.json (1 hunks)
  • packages/graphql/package.json (1 hunks)
  • packages/provider/package.json (1 hunks)
  • packages/test/__mocks__/fetch.ts (1 hunks)
  • packages/test/package.json (2 hunks)
  • packages/test/utils/mockFetch/index.ts (1 hunks)
  • packages/test/utils/mockFetchError/index.ts (1 hunks)
  • packages/utils/functions/token/getTokenSSR/index.ts (1 hunks)
  • packages/utils/package.json (1 hunks)
  • packages/wagtail/package.json (2 hunks)
  • packages/wagtail/relay.config.js (1 hunks)
  • packages/wagtail/schema.graphql (1 hunks)
  • pnpm-workspace.yaml (6 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-04-23T20:19:26.771Z
Learnt from: davidbermudez-tsl
PR: silverlogic/baseapp-frontend#255
File: packages/components/modules/content-feed/web/PostItemImages/index.tsx:20-21
Timestamp: 2025-04-23T20:19:26.771Z
Learning: In the ContentFeed module, `ts-ignore` is necessary when working with RMCarousel from the react-multi-carousel library due to type definition bugs that cause build errors.

Applied to files:

  • packages/design-system/components/web/scrollbars/Scrollbar/index.tsx
  • packages/design-system/components/web/scrollbars/Scrollbar/styled.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (21)
packages/utils/functions/token/getTokenSSR/index.ts (1)

4-4: LGTM — lazy-load next/headers; confirm no client imports of getTokenSSR

Dynamic import is fine; sandbox search failed (rg file-type error) so I couldn't locate import sites. Run locally to confirm no client components import this util:

rg -n --glob '!node_modules' '\bgetTokenSSR\b' -g '**/*.{ts,tsx}' -S
rg -l --glob '!node_modules' '\bgetTokenSSR\b' -g '**/*.{ts,tsx}' -S | xargs -r -n1 rg -nH "^\s*['\"]use client['\"]"
packages/design-system/components/web/scrollbars/Scrollbar/types.ts (1)

2-3: ```shell
#!/bin/bash
set -euo pipefail

echo "PWD: $(pwd)"
TARGET="packages/design-system/components/web/scrollbars/Scrollbar/types.ts"
echo "Checking target file: $TARGET"
if [ -f "$TARGET" ]; then
echo "---- BEGIN $TARGET ----"
sed -n '1,200p' "$TARGET" || true
echo "---- END $TARGET ----"
else
echo "MISSING: $TARGET"
fi

echo
echo "Listing Scrollbar directory:"
ls -la packages/design-system/components/web/scrollbars/Scrollbar || true

echo
echo "Searching repository for: simplebar-react, scrollableNodeProps, @ts-ignore"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden --no-ignore-vcs "simplebar-react|scrollableNodeProps|@ts-ignore" || true
else
grep -RIn --line-number -e "simplebar-react" -e "scrollableNodeProps" -e "@ts-ignore" . || true
fi

echo
echo "Searching for existing declaration files for simplebar-react"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden --no-ignore-vcs "declare module 'simplebar-react'|simplebar-react.d.ts" || true
else
grep -RIn --line-number -e "declare module 'simplebar-react'" -e "simplebar-react.d.ts" . || true
fi

echo
echo "Searching package.json files for typescript dependency/version"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden --no-ignore-vcs '"typescript"' || true
else
grep -RIn --line-number -e '"typescript"' . || true
fi

echo
echo "If present, show root and packages/design-system package.json & tsconfig.json (first 200 lines)"
for f in package.json packages/design-system/package.json tsconfig.json packages/design-system/tsconfig.json; do
if [ -f "$f" ]; then
echo "---- $f ----"
sed -n '1,200p' "$f" || true
fi
done


</blockquote></details>
<details>
<summary>packages/test/package.json (2)</summary><blockquote>

`16-24`: **axios-mock-adapter via catalog — LGTM**

Change aligns with the catalog approach.

---

`28-32`: **eslint plugin added — LGTM; plugin is enabled in shared config** packages/test/.eslintrc.js requires @baseapp-frontend/config/.eslintrc.js, which declares plugins: ['@baseapp-frontend'] and includes @baseapp-frontend rules.

</blockquote></details>
<details>
<summary>packages/eslint-plugin/package.json (1)</summary><blockquote>

`21-27`: **Parcel catalog pin verified — no action required**

pnpm-workspace.yaml (catalogs -> eslint-plugin): parcel = ^2.12.0 — satisfies ^2.12.x.

</blockquote></details>
<details>
<summary>packages/utils/package.json (2)</summary><blockquote>

`36-59`: **Confirm @types/humps and @types/qs versions in the utils catalog**

Search of pnpm-workspace.yaml returned no matches; verify the utils catalog (catalog package.json or dependency-mapping) declares @types/humps and @types/qs versions that are compatible with the runtime packages.

---

`16-32`: **Approve — utils catalog entries exist**
pnpm-workspace.yaml (utils block) defines: events ^3.3.0, humps ^2.0.1, jwt-decode ^4.0.0, qs ^6.14.0, server-only ^0.0.1.

</blockquote></details>
<details>
<summary>package.json (1)</summary><blockquote>

`21-27`: **LGTM — catalog entries present in pnpm-workspace.yaml**

pnpm-workspace.yaml lists @parcel/packager-ts and @parcel/transformer-typescript-types at ^2.14.1; switching to catalog is fine.

</blockquote></details>
<details>
<summary>packages/graphql/package.json (1)</summary><blockquote>

`31-35`: **Approve — ESLint plugin present and wired via shared config**

Confirmed: packages/config/.eslintrc.js registers the '@baseapp-frontend' plugin and rules (e.g. '@baseapp-frontend/no-process-env-comparison'); package-level .eslintrc.js files require that shared config and multiple packages (authentication, components, config, design-system, graphql, provider, test, utils, wagtail) list @baseapp-frontend/eslint-plugin in devDependencies.

</blockquote></details>
<details>
<summary>packages/provider/package.json (1)</summary><blockquote>

`23-27`: **eslint plugin added — LGTM (confirmed)**

packages/provider/.eslintrc.js requires '@baseapp-frontend/config/.eslintrc.js' and packages/config/package.json includes '@baseapp-frontend/eslint-plugin', so the plugin and its rules will be applied.

</blockquote></details>
<details>
<summary>packages/wagtail/package.json (2)</summary><blockquote>

`41-41`: **Good addition: repo ESLint plugin moved to workspace.**

No issues. Verify the package uses the plugin rules (extends/plugins) so the new devDependency is actually applied.

---

`68-69`: **Catalog migration for dotenv(+cli) looks correct; confirm catalog entry exists.**

Mapped to catalogs.components; matches pnpm-workspace.yaml. Please run a quick install in this package to ensure the CLI (`dotenv`) resolves from the catalog.

</blockquote></details>
<details>
<summary>packages/test/utils/mockFetchError/index.ts (1)</summary><blockquote>

`7-12`: **Nice: explicit handling of odd prefixes (undefined/) and multiple URL forms.**

This should reduce flakiness from env misconfigurations.

</blockquote></details>
<details>
<summary>packages/components/package.json (3)</summary><blockquote>

`76-76`: **Catalog migration looks fine.**

framer-motion, numbro, slugify, use-long-press moved under catalogs.components; aligns with pnpm-workspace.yaml.



Also applies to: 81-81, 89-91

---

`104-104`: **Dev tool dependencies moved to catalog:components.**

Looks good; keeps versions centralized.



Also applies to: 109-109, 145-146

---

`152-152`: **Verify Jotai placement (devDependency vs runtime).**
rg searches in packages/components returned no imports/strings referencing "jotai"; manually confirm whether any exported runtime code imports "jotai". If exported code imports it, move it to dependencies or peerDependency; devDependency is acceptable only for Storybook/tests.
File: packages/components/package.json (≈ line 152) contains "jotai": "catalog:".

</blockquote></details>
<details>
<summary>pnpm-workspace.yaml (3)</summary><blockquote>

`24-24`: **simplebar-react bump to 3.3.1.**

Given recent SimpleBar ESM shifts, verify any TS ignore directives or prop changes in consumers still compile without extra shims.

---

`109-109`: **axios-mock-adapter added to test catalog.**

Matches test infra changes; no issues.

---

`161-169`: **New catalogs (components/design-system/eslint-plugin/utils) wired — workspace check OK.**
Ran the provided script; no package.json 'catalog:<group>' usages lack a corresponding catalogs entry in pnpm-workspace.yaml.

</blockquote></details>
<details>
<summary>packages/design-system/package.json (1)</summary><blockquote>

`135-136`: **ESLint plugin adoption looks good.**

Nice addition. Ensure project-level ESLint config enables the plugin rulesets (e.g., `"plugins": ["@baseapp-frontend"]`, and extend any recommended configs if applicable).

</blockquote></details>
<details>
<summary>packages/wagtail/schema.graphql (1)</summary><blockquote>

`1-5`: **Confirm @specifiedBy directive compatibility.**

Some servers already provide `@specifiedBy`; redefining it can cause schema build errors. Ensure your GraphQL server doesn’t auto‑register it, or guard this definition to avoid duplication.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/utils/package.json (1)

1-73: Fix catalog: placeholders in the published package.json

Packed tarball (baseapp-frontend-utils-4.0.2.tgz → package/package.json) contains unresolved "catalog:" specifiers (examples: axios, lodash, next, typescript, peer react, @testing-library/*). Replace these placeholders with concrete semver ranges in packages/utils/package.json or implement a publish-time rewrite that resolves "catalog:" → actual versions. Repack and verify: npm pack; tar -xOf package/package.json | rg -n 'catalog:' — expect zero matches.

Location: packages/utils/package.json (packaged as package/package.json in the tarball).

packages/components/package.json (1)

1-188: Prevent publishing 'catalog:' dependency selectors

Confirmed: npm pack produced a tarball (baseapp-frontend-components-1.4.3.tgz) whose package/package.json still contains many "catalog:..." specifiers in dependencies, devDependencies and peerDependencies. With publishConfig.access=public this will leak into the published package and break consumers — replace all "catalog:..." entries with concrete semver ranges or implement a publish-time rewrite that resolves catalog selectors (or mark the package private) before publishing.

Affected: packages/components/package.json (reproduced in package/package.json inside tarball).

packages/wagtail/package.json (1)

22-29: Fix before publish: packaged package.json still contains "catalog:" selectors and publishConfig.access="public".

Confirmed: npm pack produced baseapp-frontend-wagtail-1.0.38.tgz whose package/package.json (packages/wagtail/package.json) contains many "catalog:" dependency selectors and publishConfig.access="public".

Action:

  • Do not publish publicly. Ensure your release pipeline rewrites all "catalog:" selectors in the packaged package.json to concrete semver ranges before publishing.
  • If rewriting is not in place, gate the publish (make the package internal/private or remove public access) until the selectors are resolved.
🧹 Nitpick comments (5)
packages/wagtail/package.json (1)

24-29: Move Storybook and Next out of runtime deps.

  • @storybook/react should be a devDependency.
  • next should be a peerDependency to avoid duplicating/react-locking it for consumers.

Apply this diff:

   "dependencies": {
     "@mui/material": "catalog:material-ui",
     "@mui/system": "catalog:material-ui",
-    "@storybook/react": "catalog:storybook",
     "axios": "catalog:",
     "graphql": "catalog:graphql",
-    "next": "catalog:",
     "react-relay": "catalog:graphql"
   },
   "peerDependencies": {
+    "next": "catalog:",
     "@baseapp-frontend/design-system": "workspace:*",
     "@baseapp-frontend/graphql": "workspace:*",
     "@baseapp-frontend/utils": "workspace:*",
     "react": "catalog:react19"
   },
   "devDependencies": {
+    "@storybook/react": "catalog:storybook",
packages/components/package.json (2)

60-94: Classify Storybook/Next correctly; avoid pulling them into consumers.

  • Move @storybook/react to devDependencies.
  • Make next a peerDependency (libraries shouldn’t pin app frameworks).

Apply this diff:

   "dependencies": {
@@
-    "@storybook/react": "catalog:storybook",
@@
-    "next": "catalog:",
+    // next should be declared as a peer below
@@
   },
   "peerDependencies": {
     "@baseapp-frontend/authentication": "workspace:*",
     "@baseapp-frontend/design-system": "workspace:*",
     "@baseapp-frontend/graphql": "workspace:*",
     "@baseapp-frontend/utils": "workspace:*",
+    "next": "catalog:",
     "react": "catalog:react19",
     "react-dom": "catalog:react19"
   },
   "devDependencies": {
+    "@storybook/react": "catalog:storybook",

1-188: Add engines/packageManager to codify toolchain (optional).

Recommend adding Node/pnpm engines to prevent mismatched installs with catalogs.

Example:

   "readme": "https://github.com/silverlogic/baseapp-frontend/blob/master/packages/components/README.md",
+  "engines": { "node": ">=18.18", "pnpm": ">=9" },
+  "packageManager": "pnpm@9"
packages/utils/package.json (1)

16-32: Make Next a peer (and optional) for a utils library.

Having next as a runtime dependency can cause version conflicts for consumers; declare as optional peer instead.

Apply this diff:

   "dependencies": {
@@
-    "next": "catalog:",
@@
   },
   "peerDependencies": {
-    "react": "catalog:react19"
+    "react": "catalog:react19",
+    "next": "catalog:"
   },
+  "peerDependenciesMeta": {
+    "next": { "optional": true }
+  },
packages/design-system/package.json (1)

91-117: Reclassify Storybook and Next.

  • Move @storybook/react to devDependencies.
  • Make next a peerDependency to avoid locking consumer framework versions.

Apply this diff:

   "dependencies": {
@@
-    "@storybook/react": "catalog:storybook",
@@
-    "next": "catalog:",
+    // next declared as a peer below
@@
   },
   "peerDependencies": {
     "@baseapp-frontend/utils": "workspace:*",
+    "next": "catalog:",
     "react": "catalog:react19",
     "react-dom": "catalog:react19"
   },
   "devDependencies": {
+    "@storybook/react": "catalog:storybook",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e215fe and 73c76e1.

📒 Files selected for processing (20)
  • packages/authentication/CHANGELOG.md (1 hunks)
  • packages/authentication/package.json (1 hunks)
  • packages/components/CHANGELOG.md (1 hunks)
  • packages/components/package.json (4 hunks)
  • packages/config/CHANGELOG.md (1 hunks)
  • packages/config/package.json (1 hunks)
  • packages/design-system/CHANGELOG.md (1 hunks)
  • packages/design-system/package.json (5 hunks)
  • packages/eslint-plugin/CHANGELOG.md (1 hunks)
  • packages/eslint-plugin/package.json (2 hunks)
  • packages/graphql/CHANGELOG.md (1 hunks)
  • packages/graphql/package.json (2 hunks)
  • packages/provider/CHANGELOG.md (1 hunks)
  • packages/provider/package.json (2 hunks)
  • packages/test/CHANGELOG.md (1 hunks)
  • packages/test/package.json (3 hunks)
  • packages/utils/CHANGELOG.md (1 hunks)
  • packages/utils/package.json (2 hunks)
  • packages/wagtail/CHANGELOG.md (1 hunks)
  • packages/wagtail/package.json (3 hunks)
✅ Files skipped from review due to trivial changes (11)
  • packages/eslint-plugin/CHANGELOG.md
  • packages/config/CHANGELOG.md
  • packages/provider/CHANGELOG.md
  • packages/wagtail/CHANGELOG.md
  • packages/authentication/package.json
  • packages/test/CHANGELOG.md
  • packages/utils/CHANGELOG.md
  • packages/config/package.json
  • packages/graphql/CHANGELOG.md
  • packages/authentication/CHANGELOG.md
  • packages/design-system/CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/provider/package.json
  • packages/graphql/package.json
  • packages/eslint-plugin/package.json
  • packages/test/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Component Test Packages
  • GitHub Check: Build and Lint Packages
🔇 Additional comments (10)
packages/components/CHANGELOG.md (1)

3-12: Changelog entry looks good.

Accurately documents the catalog migration and dependent bumps for 1.4.3.

packages/wagtail/package.json (2)

41-41: ESLint plugin addition is appropriate.

Brings package in line with repo-wide linting.


68-69: Catalog alignment for dotenv tooling looks fine.

Matches workspace strategy; scripts reference dotenv-cli correctly.

packages/components/package.json (2)

104-110: ESLint plugin addition LGTM.

Consistent with other packages.


145-147: Catalog migration for dotenv tooling LGTM.

Matches workspace catalogs; scripts already use dotenv-cli.

packages/utils/package.json (2)

4-4: Version bump acknowledged.

v4.0.2 aligns with changelog and catalog migration.


37-39: ESLint plugin addition LGTM.

Keeps package consistent with workspace lint rules.

packages/design-system/package.json (3)

4-4: Version bump to 1.1.1 looks good.

Matches related changelog entry and catalog migration.


135-136: ESLint plugin addition LGTM.

Aligns with repo standards.


1-186: Guard against publishing catalog: to npm.

npm pack produced a tarball but verification aborted because tee is unavailable in the sandbox — re-run the pack+scan without tee and confirm there are no catalog: tokens in package/package.json inside the tarball.

#!/bin/bash
set -euo pipefail
cd packages/design-system
npm pack --silent >/dev/null
TARBALL="$(ls -t *.tgz | head -n1)"
echo "Inspecting $TARBALL"
tar -xOf "$TARBALL" package/package.json | rg -n 'catalog:' || echo "no matches"

No matches should remain in the tarball’s manifest.

@nossila nossila merged commit bc7ddf6 into master Sep 16, 2025
7 of 8 checks passed
@nossila nossila deleted the feature/git-submodule branch September 16, 2025 17:44
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