Skip to content

Renamed files to kebab-case and added linting rules - admin-x-framework#25649

Merged
ibalosh merged 1 commit intomainfrom
moved-to-kebab-case-formatting-admin-x-framework
Dec 9, 2025
Merged

Renamed files to kebab-case and added linting rules - admin-x-framework#25649
ibalosh merged 1 commit intomainfrom
moved-to-kebab-case-formatting-admin-x-framework

Conversation

@ibalosh
Copy link
Contributor

@ibalosh ibalosh commented Dec 8, 2025

ref https://linear.app/ghost/issue/NY-722/migrate-ghost-codebase-to-kebab-case-file-naming-convention

what

  • Renamed all files to match to kebab-case format
  • Added ESLint kebab-case rule
  • updated affected imports in other apps
    • activitypub - only couple of them, updated version
    • admin-x-settings
    • admin

why

  • To match our working agreement on filenames in Ghost repo

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

This PR renames many source files to kebab-case and updates all import/export module specifiers across multiple apps (admin-x-framework, activitypub, admin-x-settings, admin) and tests. It also adds the ESLint rule ghost/filenames/match-regex to enforce the kebab-case filename pattern in two .eslintrc.cjs files. No runtime logic, exported identifiers, or function signatures were changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas requiring extra attention:

  • Central public re-exports: apps/admin-x-framework/src/index.ts, apps/admin-x-framework/src/routing.ts, apps/admin-x-framework/src/hooks.ts.
  • Provider files with case-only renames: framework-provider, routing-provider, navigation-stack-provider and all locations that import them.
  • ESLint changes: apps/admin-x-framework/.eslintrc.cjs and apps/admin-x-framework/test/.eslintrc.cjs — verify rule syntax and placement.
  • Tests and mocks: many test files updated to new paths (ensure test runner/module resolution still works).
  • API path updates used by other apps (e.g., api/current-user, api/update-queries, api/custom-theme-settings) to confirm external imports remain correct.

Possibly related PRs

Suggested reviewers

  • kevinansfield
  • rob-ghost

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Renamed files to kebab-case and added linting rules - admin-x-framework' accurately summarizes the main changes: file renaming to kebab-case format and addition of ESLint rules, specific to the admin-x-framework package.
Description check ✅ Passed The description clearly explains what was changed (file renaming to kebab-case, ESLint rule addition, import updates), why it was done (matching Ghost repo conventions), and affected apps (activitypub, admin-x-settings, admin).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch moved-to-kebab-case-formatting-admin-x-framework

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf70f25 and 6f08f12.

📒 Files selected for processing (71)
  • apps/activitypub/package.json (1 hunks)
  • apps/activitypub/src/components/layout/Layout.tsx (1 hunks)
  • apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx (1 hunks)
  • apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx (1 hunks)
  • apps/admin-x-framework/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/src/api/actions.ts (1 hunks)
  • apps/admin-x-framework/src/api/automated-emails.ts (1 hunks)
  • apps/admin-x-framework/src/api/current-user.ts (1 hunks)
  • apps/admin-x-framework/src/api/integrations.ts (1 hunks)
  • apps/admin-x-framework/src/api/invites.ts (1 hunks)
  • apps/admin-x-framework/src/api/newsletters.ts (1 hunks)
  • apps/admin-x-framework/src/api/offers.ts (1 hunks)
  • apps/admin-x-framework/src/api/themes.ts (1 hunks)
  • apps/admin-x-framework/src/api/tiers.ts (1 hunks)
  • apps/admin-x-framework/src/api/users.ts (1 hunks)
  • apps/admin-x-framework/src/hooks.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-active-visitors.ts (3 hunks)
  • apps/admin-x-framework/src/hooks/use-filterable-api.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-handle-error.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-permissions.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts (2 hunks)
  • apps/admin-x-framework/src/index.ts (2 hunks)
  • apps/admin-x-framework/src/providers/app-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/framework-provider.tsx (3 hunks)
  • apps/admin-x-framework/src/providers/router-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/routing-provider.tsx (1 hunks)
  • apps/admin-x-framework/src/routing.ts (1 hunks)
  • apps/admin-x-framework/src/test/acceptance.ts (1 hunks)
  • apps/admin-x-framework/src/test/render-shade.tsx (1 hunks)
  • apps/admin-x-framework/src/test/render.tsx (1 hunks)
  • apps/admin-x-framework/src/test/test-utils.tsx (3 hunks)
  • apps/admin-x-framework/src/utils/api/fetch-api.ts (2 hunks)
  • apps/admin-x-framework/src/utils/api/hooks.ts (2 hunks)
  • apps/admin-x-framework/src/utils/stats-config.ts (1 hunks)
  • apps/admin-x-framework/test/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx (4 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts (5 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (6 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts (29 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx (13 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts (3 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx (10 hunks)
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts (1 hunks)
  • apps/admin-x-settings/src/components/providers/global-data-provider.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/advanced/integrations/zapier-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/general/users/staff-token.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-preview.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-settings.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/utils/is-custom-theme-settings-visible.ts (1 hunks)
  • apps/admin-x-settings/test/acceptance/general/users/profile.test.ts (1 hunks)
  • apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts (1 hunks)
  • apps/admin/src/App.tsx (1 hunks)
  • apps/admin/src/hooks/user-preferences.ts (1 hunks)
  • apps/admin/src/layout/AdminLayout.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavContent.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavMain.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavSettings.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/UserMenu.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/UserMenuAvatar.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/admin-x-framework/src/hooks/use-permissions.ts
🚧 Files skipped from review as they are similar to previous changes (51)
  • apps/admin-x-framework/src/api/actions.ts
  • apps/admin-x-framework/src/hooks/use-filterable-api.ts
  • apps/admin-x-settings/test/acceptance/general/users/profile.test.ts
  • apps/admin-x-framework/src/test/acceptance.ts
  • apps/admin-x-settings/src/components/providers/global-data-provider.tsx
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
  • apps/admin-x-settings/src/utils/is-custom-theme-settings-visible.ts
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-settings.tsx
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-framework/src/providers/routing-provider.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsx
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations/zapier-modal.tsx
  • apps/admin-x-framework/src/api/themes.ts
  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-settings/src/components/settings/general/users/staff-token.tsx
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
  • apps/admin-x-framework/src/api/users.ts
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/src/api/automated-emails.ts
  • apps/admin-x-framework/src/api/current-user.ts
  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
  • apps/activitypub/package.json
  • apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx
  • apps/admin-x-framework/src/providers/framework-provider.tsx
  • apps/admin/src/layout/app-sidebar/UserMenu.tsx
  • apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx
  • apps/admin/src/layout/app-sidebar/NavSettings.tsx
  • apps/admin/src/layout/app-sidebar/NavMain.tsx
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/src/api/tiers.ts
  • apps/admin-x-framework/src/providers/app-provider.tsx
  • apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx
  • apps/admin-x-framework/src/index.ts
  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-preview.tsx
  • apps/admin/src/layout/app-sidebar/NavContent.tsx
  • apps/admin-x-framework/src/api/integrations.ts
  • apps/admin/src/hooks/user-preferences.ts
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx
  • apps/admin/src/layout/AdminLayout.tsx
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
🧰 Additional context used
🧠 Learnings (22)
📓 Common learnings
Learnt from: sagzy
Repo: TryGhost/Ghost PR: 24673
File: ghost/i18n/lib/i18n.js:34-35
Timestamp: 2025-11-24T11:12:15.712Z
Learning: In the Ghost i18n package (ghost/i18n/lib/i18n.js), changing existing locale codes requires backwards compatibility handling for users who have already configured those locales. Such changes should be done in a separate PR with migration logic rather than included in feature PRs.
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names
Learnt from: ibalosh
Repo: TryGhost/Ghost PR: 25525
File: apps/shade/src/shade-app.tsx:4-4
Timestamp: 2025-11-25T11:58:51.652Z
Learning: In apps/shade, the app wrapper file should be named `src/shade-app.tsx` (kebab-case) while the component itself is exported as `ShadeApp` (PascalCase). Context providers should be placed in `src/providers/*` using kebab-case filenames.
📚 Learning: 2025-10-27T11:59:33.968Z
Learnt from: peterzimon
Repo: TryGhost/Ghost PR: 25261
File: apps/admin/src/layout/app-sidebar/UserMenu.tsx:24-29
Timestamp: 2025-10-27T11:59:33.968Z
Learning: In apps/admin/src/layout/app-sidebar/UserMenu.tsx, the hardcoded placeholder data (avatar URL, initials "US", name "User Name", email "userexample.com") is a known limitation and should not be flagged for replacement with real user data.

Applied to files:

  • apps/admin/src/layout/app-sidebar/UserMenuAvatar.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Admin apps should use `tanstack/react-query` for data fetching

Applied to files:

  • apps/admin-x-framework/src/api/newsletters.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
  • apps/admin-x-framework/src/api/invites.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.

Applied to files:

  • apps/activitypub/src/components/layout/Layout.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Use React with Vite for Admin app development (admin-x-settings, admin-x-activitypub, posts, stats)

Applied to files:

  • apps/activitypub/src/components/layout/Layout.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Use `admin-x-framework` for API hooks (useBrowse, useEdit, etc.) in Admin apps

Applied to files:

  • apps/activitypub/src/components/layout/Layout.tsx
  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Ember admin uses `AdminXComponent` to dynamically import React apps with Suspense and error boundaries

Applied to files:

  • apps/activitypub/src/components/layout/Layout.tsx
  • apps/admin/src/App.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test suite names should follow the format 'Ghost Admin - Feature' or 'Ghost Public - Feature'

Applied to files:

  • apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts
  • apps/admin-x-framework/test/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use the `@` alias for internal imports (e.g., `@/lib/utils`)

Applied to files:

  • apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts
  • apps/admin-x-framework/src/providers/router-provider.tsx
  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Follow ESLint and `tailwindcss/*` plugin rules when writing styles

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
  • apps/admin-x-framework/test/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
  • apps/admin-x-framework/test/.eslintrc.cjs
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use factory pattern for all test data creation instead of hard-coded data or direct database manipulation

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/src/api/invites.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use `getByTestId()` only when semantic locators are unavailable, and suggest adding `data-testid` to Ghost codebase when needed

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test names should be lowercase and follow the format 'what is tested - expected outcome'

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Always follow ADRs in `../adr/` folder (ADR-0001: AAA pattern, ADR-0002: Page Objects)

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Follow the AAA (Arrange, Act, Assert) pattern in test structure

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/hooks/**/*.{ts,tsx} : Custom React hooks should be placed in `src/hooks/*`

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Run `yarn lint` after making changes to fix any ESLint errors and warnings before committing

Applied to files:

  • apps/admin-x-framework/test/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names

Applied to files:

  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Analytics using Tinybird should reference scripts in `ghost/core/core/server/data/tinybird/scripts/` and datafiles in `ghost/core/core/server/data/tinybird/`

Applied to files:

  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
📚 Learning: 2025-11-10T17:07:54.169Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25377
File: apps/admin/src/ember-bridge/EmberBridge.test.tsx:146-174
Timestamp: 2025-11-10T17:07:54.169Z
Learning: In apps/admin/src/ember-bridge/EmberBridge.tsx, the useEmberAuthSync hook invalidates all React Query caches whenever an emberAuthChange event is emitted, regardless of the isAuthenticated field value in the event payload. The isAuthenticated field exists in the event type but is not currently used by the handler.

Applied to files:

  • apps/admin-x-framework/src/api/invites.ts
  • apps/admin/src/App.tsx
⏰ 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: Build & Push Docker Image
  • GitHub Check: Setup
🔇 Additional comments (21)
apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts (1)

2-2: Import path update matches kebab-case convention

The updated import path correctly reflects the kebab-case filename and keeps the type-only import pattern unchanged. No issues from a test or typing perspective.

apps/admin/src/App.tsx (1)

2-2: LGTM! Import path correctly updated to kebab-case.

The import path change from currentUser to current-user aligns with the PR's kebab-case naming convention. The hook identifier useCurrentUser correctly remains in camelCase per React conventions.

apps/admin/src/layout/app-sidebar/UserMenuAvatar.tsx (1)

8-22: Import path rename to kebab-case aligns with PR scope

Switching useCurrentUser to @tryghost/admin-x-framework/api/current-user matches the new kebab-case convention, and the hook usage remains unchanged and correct in this component.

Please ensure TypeScript build and ESLint pass so any mismatched import paths elsewhere are caught automatically.

apps/admin-x-framework/src/utils/stats-config.ts (1)

1-1: Import path correctly updated to kebab-case.

The import path change from FrameworkProvider to framework-provider aligns with the PR objective to migrate to kebab-case file naming. The target file exists at the new location, and no stale references to the old path remain in the codebase.

apps/admin-x-framework/.eslintrc.cjs (1)

31-34: LGTM! ESLint rule correctly enforces kebab-case filenames.

The addition of the ghost/filenames/match-regex rule with pattern ^[a-z0-9.-]+$ properly enforces kebab-case naming (lowercase with hyphens) while allowing dots for file extensions and dotfiles. The configuration is well-commented and consistent with the PR's migration objectives.

apps/activitypub/src/components/layout/Layout.tsx (1)

9-9: LGTM! Import path correctly updated to kebab-case.

The import path change from currentUser to current-user aligns with the kebab-case file naming migration. The exported identifier useCurrentUser correctly remains in camelCase.

apps/admin-x-framework/test/.eslintrc.cjs (1)

8-10: LGTM! Test ESLint config properly mirrors main config.

The kebab-case filename rule is correctly added to the test configuration with the same pattern and error level as the main .eslintrc.cjs, ensuring consistent enforcement across both source and test files.

apps/admin-x-framework/src/api/offers.ts (1)

2-2: LGTM! Import path updated consistently.

The import path change from updateQueries to update-queries is consistent with the kebab-case migration pattern applied across the codebase.

apps/admin-x-framework/src/api/invites.ts (1)

3-3: LGTM! Import path updated to kebab-case.

The import path has been correctly updated, maintaining consistency with the other API files in this migration.

apps/admin-x-framework/src/api/newsletters.ts (1)

3-3: LGTM! Import path updated to kebab-case.

The import path has been correctly updated from updateQueries to update-queries. The old camelCase file no longer exists, the new kebab-case file is in place, and both imported functions (insertToQueryCache and updateQueryCache) are actively used throughout the file at lines 93, 113, and 125.

apps/admin-x-framework/src/routing.ts (1)

1-2: Re-export path update to kebab-case looks correct

The re-exports now target ./providers/routing-provider while keeping the same values and types. This aligns with the kebab-case migration and doesn’t alter the public API.

apps/admin-x-framework/src/providers/router-provider.tsx (2)

3-4: Kebab-case provider import paths are consistent

Switching to ./framework-provider and ./navigation-stack-provider matches the filename convention while keeping the imported symbols the same. No behavior change here.


184-193: Navigate component hunk is effectively a no-op

This hunk only changes the closing brace/newline; the component behavior (delegating cross-app navigation to externalNavigate or falling back to ReactRouterNavigate) remains the same and looks fine.

apps/admin-x-framework/src/hooks/use-handle-error.ts (1)

5-5: LGTM! Clean import path update.

The import path update from FrameworkProvider to framework-provider correctly reflects the kebab-case file naming convention with no functional changes.

apps/admin-x-framework/src/hooks/use-active-visitors.ts (1)

2-3: LGTM! Import paths updated correctly.

Both import paths now follow kebab-case convention (framework-provider and use-tinybird-query) with no functional changes.

apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts (1)

2-2: LGTM! Test imports and mocks updated correctly.

All import and mock paths now use kebab-case (use-tinybird-query, use-tinybird-token), maintaining test functionality.

Also applies to: 14-18

apps/admin-x-framework/src/utils/api/fetch-api.ts (2)

2-5: LGTM! Import paths updated correctly.

Both import paths now follow kebab-case convention (framework-provider and handle-response) with no impact on functionality.


28-32: This review comment is based on an incorrect premise.

The file apps/admin-x-framework/src/utils/api/fetch-api.ts is newly added (status "A" in git), not a renamed file. There is no pre-existing fetch_api.ts that was refactored. Since the file and its conditional header logic are part of new code being introduced, the concern about "functional change outside the scope of file renaming" does not apply.

Likely an incorrect or invalid review comment.

apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (1)

2-2: LGTM! Test imports and mocks aligned with kebab-case.

All import and mock paths correctly updated to kebab-case (use-filterable-api, fetch-api), maintaining test functionality.

Also applies to: 5-11

apps/admin-x-framework/src/hooks/use-tinybird-query.ts (1)

2-3: LGTM! Import paths updated correctly.

Both import paths now follow kebab-case convention (use-tinybird-token and framework-provider) with no functional changes.

apps/admin-x-framework/src/hooks.ts (1)

1-5: LGTM! Re-exports updated to kebab-case paths.

All hook re-exports now reference kebab-case module paths while maintaining the same public API surface. The exported identifiers remain unchanged, ensuring backward compatibility.


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
Contributor

@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: 2

Caution

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

⚠️ Outside diff range comments (2)
apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts (1)

2-19: Fix useTinybirdToken mock path to match kebab-case import

useTinybirdToken is imported from ../../../src/hooks/use-tinybird-token, but vi.mock still targets ../../../src/hooks/useTinybirdToken. That mismatch prevents Vitest from replacing the module with the mock.

Suggested change:

-vi.mock('../../../src/hooks/useTinybirdToken', () => ({
+vi.mock('../../../src/hooks/use-tinybird-token', () => ({
     useTinybirdToken: vi.fn()
 }))
apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (1)

2-11: Align fetch API mock path with renamed fetch-api module

The useFilterableApi import now targets ../../../src/hooks/use-filterable-api and the API util import targets ../../../src/utils/api/fetch-api, but the vi.mock call still mocks the old camelCase module ID:

  • Import used in tests: ../../../src/utils/api/fetch-api
  • Mocked module ID: ../../../src/utils/api/fetchApi

Because Vitest matches mocks by the exact module string, fetchApiModule.useFetchApi will not be a mocked function, and calls like vi.mocked(fetchApiModule.useFetchApi).mockReturnValue(...) can break or hit real implementation.

Update the mock to use the kebab-case path:

-// Mock the fetchApi module
-vi.mock('../../../src/utils/api/fetchApi', () => ({
+// Mock the fetchApi module
+vi.mock('../../../src/utils/api/fetch-api', () => ({
     useFetchApi: vi.fn(),
     apiUrl: vi.fn()
 }))
🧹 Nitpick comments (3)
apps/admin-x-framework/src/hooks/use-filterable-api.ts (1)

44-60: Consider avoiding non-null assertion in loadInitialValues

return values.map(value => data.find(item => item[key] === value)!); assumes every requested value exists in data. If the API ever omits an ID, this will throw. Not introduced by this PR, but you might later prefer a safer pattern (e.g., filter out missing items or fall back when find returns undefined).

apps/admin-x-framework/src/utils/api/fetch-api.ts (1)

23-36: Clarify Content-Type comment vs actual behavior

The comment says "By default, we set the Content-Type header to application/json", but the code only sets it when options.body is a string. Consider rephrasing the comment to avoid confusion (e.g. "For JSON string bodies, set Content-Type to application/json").

apps/admin-x-framework/.eslintrc.cjs (1)

31-35: Filename regex matches stated kebab-case convention

The ghost/filenames/match-regex rule with ^[a-z0-9.-]+$ enforces lowercase, digits, dots, and hyphens, which aligns with the described kebab-case filename policy (including extensions and multi-dot names). Just ensure there are no required exceptions (e.g. legacy or third-party filenames) that would need to be excluded.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f7be8e and 3cbdcd0.

📒 Files selected for processing (43)
  • apps/admin-x-framework/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/src/api/actions.ts (1 hunks)
  • apps/admin-x-framework/src/api/automated-emails.ts (1 hunks)
  • apps/admin-x-framework/src/api/current-user.ts (1 hunks)
  • apps/admin-x-framework/src/api/integrations.ts (1 hunks)
  • apps/admin-x-framework/src/api/invites.ts (1 hunks)
  • apps/admin-x-framework/src/api/newsletters.ts (1 hunks)
  • apps/admin-x-framework/src/api/offers.ts (1 hunks)
  • apps/admin-x-framework/src/api/themes.ts (1 hunks)
  • apps/admin-x-framework/src/api/tiers.ts (1 hunks)
  • apps/admin-x-framework/src/api/users.ts (1 hunks)
  • apps/admin-x-framework/src/hooks.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-active-visitors.ts (3 hunks)
  • apps/admin-x-framework/src/hooks/use-filterable-api.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-handle-error.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-permissions.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts (2 hunks)
  • apps/admin-x-framework/src/index.ts (2 hunks)
  • apps/admin-x-framework/src/providers/app-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/framework-provider.tsx (3 hunks)
  • apps/admin-x-framework/src/providers/router-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/routing-provider.tsx (1 hunks)
  • apps/admin-x-framework/src/routing.ts (1 hunks)
  • apps/admin-x-framework/src/test/acceptance.ts (1 hunks)
  • apps/admin-x-framework/src/test/render-shade.tsx (1 hunks)
  • apps/admin-x-framework/src/test/render.tsx (1 hunks)
  • apps/admin-x-framework/src/test/test-utils.tsx (3 hunks)
  • apps/admin-x-framework/src/utils/api/fetch-api.ts (2 hunks)
  • apps/admin-x-framework/src/utils/api/hooks.ts (2 hunks)
  • apps/admin-x-framework/src/utils/stats-config.ts (1 hunks)
  • apps/admin-x-framework/test/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx (4 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts (5 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (7 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts (29 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx (13 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts (3 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx (10 hunks)
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (43)
📓 Common learnings
Learnt from: sagzy
Repo: TryGhost/Ghost PR: 24673
File: ghost/i18n/lib/i18n.js:34-35
Timestamp: 2025-11-24T11:12:15.712Z
Learning: In the Ghost i18n package (ghost/i18n/lib/i18n.js), changing existing locale codes requires backwards compatibility handling for users who have already configured those locales. Such changes should be done in a separate PR with migration logic rather than included in feature PRs.
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names
Learnt from: ibalosh
Repo: TryGhost/Ghost PR: 25525
File: apps/shade/src/shade-app.tsx:4-4
Timestamp: 2025-11-25T11:58:51.652Z
Learning: In apps/shade, the app wrapper file should be named `src/shade-app.tsx` (kebab-case) while the component itself is exported as `ShadeApp` (PascalCase). Context providers should be placed in `src/providers/*` using kebab-case filenames.
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Use `admin-x-framework` for API hooks (useBrowse, useEdit, etc.) in Admin apps

Applied to files:

  • apps/admin-x-framework/src/hooks/use-filterable-api.ts
  • apps/admin-x-framework/src/hooks.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use the `@` alias for internal imports (e.g., `@/lib/utils`)

Applied to files:

  • apps/admin-x-framework/src/hooks/use-filterable-api.ts
  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/src/api/current-user.ts
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/src/api/actions.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/providers/framework-provider.tsx
  • apps/admin-x-framework/src/index.ts
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/router-provider.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.

Applied to files:

  • apps/admin-x-framework/src/api/newsletters.ts
  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/src/api/invites.ts
  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx
  • apps/admin-x-framework/src/api/tiers.ts
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/providers/framework-provider.tsx
  • apps/admin-x-framework/src/test/render-shade.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Admin apps should use `tanstack/react-query` for data fetching

Applied to files:

  • apps/admin-x-framework/src/api/newsletters.ts
  • apps/admin-x-framework/src/api/invites.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
  • apps/admin-x-framework/src/api/users.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/src/api/current-user.ts
  • apps/admin-x-framework/src/api/tiers.ts
  • apps/admin-x-framework/src/api/actions.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/providers/framework-provider.tsx
📚 Learning: 2025-11-25T11:58:51.652Z
Learnt from: ibalosh
Repo: TryGhost/Ghost PR: 25525
File: apps/shade/src/shade-app.tsx:4-4
Timestamp: 2025-11-25T11:58:51.652Z
Learning: In apps/shade, the app wrapper file should be named `src/shade-app.tsx` (kebab-case) while the component itself is exported as `ShadeApp` (PascalCase). Context providers should be placed in `src/providers/*` using kebab-case filenames.

Applied to files:

  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/index.ts
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/test/unit/**/*.test.{ts,tsx,js} : Vitest unit tests should be located in `test/unit/*` with pattern `test/unit/**/*.(test).(ts|tsx|js)` and use the `render` helper from `test/unit/utils/test-utils.tsx`

Applied to files:

  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/test/render-shade.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/index.ts : Place new UI components under `src/components/ui` and export them from `src/index.ts`

Applied to files:

  • apps/admin-x-framework/src/test/render.tsx
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/index.ts
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Ember admin uses `AdminXComponent` to dynamically import React apps with Suspense and error boundaries

Applied to files:

  • apps/admin-x-framework/src/test/render.tsx
📚 Learning: 2025-11-10T17:07:54.169Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25377
File: apps/admin/src/ember-bridge/EmberBridge.test.tsx:146-174
Timestamp: 2025-11-10T17:07:54.169Z
Learning: In apps/admin/src/ember-bridge/EmberBridge.tsx, the useEmberAuthSync hook invalidates all React Query caches whenever an emberAuthChange event is emitted, regardless of the isAuthenticated field value in the event payload. The isAuthenticated field exists in the event type but is not currently used by the handler.

Applied to files:

  • apps/admin-x-framework/src/api/invites.ts
  • apps/admin-x-framework/src/api/users.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use factory pattern for all test data creation instead of hard-coded data or direct database manipulation

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/hooks/**/*.{ts,tsx} : Custom React hooks should be placed in `src/hooks/*`

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/src/hooks.ts
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test names should be lowercase and follow the format 'what is tested - expected outcome'

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Always follow ADRs in `../adr/` folder (ADR-0001: AAA pattern, ADR-0002: Page Objects)

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/src/test/acceptance.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use `getByTestId()` only when semantic locators are unavailable, and suggest adding `data-testid` to Ghost codebase when needed

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Never use CSS/XPath selectors - only use semantic locators or data-testid

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Prefer semantic locators (`getByRole`, `getByLabel`, `getByText`) over test IDs and never use CSS selectors, XPath, nth-child, or class names

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Follow the AAA (Arrange, Act, Assert) pattern in test structure

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.{ts,tsx} : Prefer less comments and give things clear names

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/.eslintrc.cjs
  • apps/admin-x-framework/src/test/render-shade.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Follow ESLint and `tailwindcss/*` plugin rules when writing styles

Applied to files:

  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/.eslintrc.cjs
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test suite names should follow the format 'Ghost Admin - Feature' or 'Ghost Public - Feature'

Applied to files:

  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Run `yarn lint` after making changes to fix any ESLint errors and warnings before committing

Applied to files:

  • apps/admin-x-framework/test/.eslintrc.cjs
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Analytics using Tinybird should reference scripts in `ghost/core/core/server/data/tinybird/scripts/` and datafiles in `ghost/core/core/server/data/tinybird/`

Applied to files:

  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
📚 Learning: 2025-03-13T09:02:50.102Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/views/Feed/components/NewPostModal.tsx:29-34
Timestamp: 2025-03-13T09:02:50.102Z
Learning: In the ActivityPub module, error handling for mutations is handled at the hook level (in use-activity-pub-queries.ts) rather than in individual components. This allows for centralized error handling across the application.

Applied to files:

  • apps/admin-x-framework/src/utils/api/hooks.ts
📚 Learning: 2025-03-13T09:02:50.102Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/views/Feed/components/NewPostModal.tsx:29-34
Timestamp: 2025-03-13T09:02:50.102Z
Learning: In the Ghost ActivityPub module, error handling for mutations is handled at the hook level (in use-activity-pub-queries.ts) rather than in individual components. This allows for centralized error handling across the application.

Applied to files:

  • apps/admin-x-framework/src/utils/api/hooks.ts
📚 Learning: 2025-11-10T11:30:41.316Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25357
File: apps/admin/test-utils/test-helpers.ts:6-12
Timestamp: 2025-11-10T11:30:41.316Z
Learning: In apps/admin/test-utils/test-helpers.ts, the waitForQuerySettled helper is intentionally designed to timeout for idle/disabled queries. It should only treat queries as settled when they reach a terminal state (isSuccess or isError) and are not fetching. This ensures tests properly wait for active queries to complete.

Applied to files:

  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: When changing tokens/config, verify Storybook and a library build still succeed

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/lib/utils.ts : Shared utilities (class merging, formatting, chart helpers) should be centralized in `src/lib/utils.ts`

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts
  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use CVA (Class Variance Authority) for component variants when useful instead of heavy prop configuration

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Use the existing setup (Vitest + Testing Library + jsdom) when adding tests

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use Playwright's auto-waiting capabilities and run tests multiple times to ensure stability

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
📚 Learning: 2025-09-02T13:06:50.918Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 24779
File: ghost/core/test/unit/server/services/members/members-api/controllers/RouterController.test.js:1388-1392
Timestamp: 2025-09-02T13:06:50.918Z
Learning: In Ghost's test files, sinon.restore() in afterEach hooks handles cleanup of all sinon modifications including fake timers, spies, and stubs, so explicit restoration of individual sinon features like clock.restore() is typically not needed when there's a top-level sinon.restore() call.

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Never use hard-coded waits like `waitForTimeout()`

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
📚 Learning: 2025-05-27T15:35:31.779Z
Learnt from: 9larsons
Repo: TryGhost/Ghost PR: 23550
File: apps/admin-x-framework/test/utils/mockFetch.ts:9-9
Timestamp: 2025-05-27T15:35:31.779Z
Learning: The codebase is currently using Vitest 0.34.3, which has limited type definitions. Modern Vitest types like MockedFunction are not available in this version, so `any` types are used as a temporary workaround in test utilities.

Applied to files:

  • apps/admin-x-framework/src/test/test-utils.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use Tailwind CSS scoped via `.shade` class; dark mode uses `.dark`

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/ui/**/*.{ts,tsx} : Atomic UI components should be placed in `src/components/ui/*` and each component must have a corresponding `*.stories.tsx` file next to it for Storybook documentation

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/features/**/*.{ts,tsx} : Higher-level, opinionated components (e.g., PostShareModal, SourceTabs) should be placed in `src/components/features/*`

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Prefer compound subcomponents (e.g., `Header.Title`, `Header.Meta`, `Header.Actions`) for multi-region components instead of many props

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Always forward and merge `className` prop with `cn(...)` utility function

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Use `shade` design system for new components in Admin UI (avoid legacy `admin-x-design-system`)

Applied to files:

  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
🧬 Code graph analysis (2)
apps/admin-x-framework/test/unit/api/tinybird.test.tsx (1)
apps/admin-x-framework/src/api/tinybird.ts (1)
  • getTinybirdToken (27-32)
apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx (2)
apps/admin-x-framework/src/index.ts (1)
  • useTinybirdToken (15-15)
apps/admin-x-framework/src/hooks/use-tinybird-token.ts (1)
  • useTinybirdToken (17-40)
⏰ 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). (5)
  • GitHub Check: Admin-X Settings tests
  • GitHub Check: Unit tests (Node 22.18.0)
  • GitHub Check: ActivityPub tests
  • GitHub Check: Lint
  • GitHub Check: Build & Push
🔇 Additional comments (45)
apps/admin-x-framework/src/api/invites.ts (1)

3-3: Import path rename looks correct and non-behavioral

The updated path aligns with the new kebab-case convention and keeps the same helpers; no functional change within this module.

apps/admin-x-framework/src/api/automated-emails.ts (1)

2-2: Import path rename correctly aligned with kebab-case convention

The updated import path to ../utils/api/update-queries matches the new kebab-case filename convention and keeps the same exported symbols, so behavior here remains unchanged while aligning with the PR’s goals.

apps/admin-x-framework/src/api/integrations.ts (1)

2-2: Import path correctly updated to match kebab-case file rename.

The import statement has been properly updated from './apiKeys' to './api-keys' and the corresponding file rename has been completed. The APIKey type is correctly imported and used in the Integration type definition.

apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx (1)

4-6: LGTM! Import paths correctly updated to kebab-case.

The import paths have been properly updated to reflect the new kebab-case file naming convention while preserving the correct casing for the exported identifiers (FrameworkProvider remains PascalCase, withMockFetch remains camelCase). No test logic or behavior has changed.

apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx (2)

3-4: LGTM! Import paths correctly updated to kebab-case.

The import statements have been properly updated to reflect the renamed module files, aligning with the PR's kebab-case naming convention.


61-290: LGTM! Cosmetic whitespace cleanup.

The remaining changes are whitespace-only (blank lines) and have no functional impact on the test logic or assertions.

apps/admin-x-framework/src/api/tiers.ts (1)

3-3: LGTM! Import path correctly updated to kebab-case.

The import path has been properly updated to use kebab-case formatting (update-queries), aligning with the repository's file naming convention. The imported updateQueryCache function continues to be used correctly on line 69, ensuring no functional changes.

apps/admin-x-framework/src/api/offers.ts (1)

2-2: Import path update correctly aligns with kebab-case naming convention.

The change from updateQueries to update-queries is correct. The new file exists at the expected location, imported functions are used properly at lines 65 and 76, and there are no lingering references to the old camelCase path.

apps/admin-x-framework/src/api/themes.ts (1)

2-2: Import path correctly updated to match kebab-case file naming.

The change from './customThemeSettings' to './custom-theme-settings' is correct. The target file exists and the imported symbol customThemeSettingsDataType is properly used on line 80. No remaining references to the old filename exist in the codebase.

apps/admin-x-framework/src/providers/routing-provider.tsx (1)

3-3: LGTM! Import path correctly updated to kebab-case.

The import path for useFramework has been correctly updated from './FrameworkProvider' to './framework-provider', aligning with the kebab-case file naming convention.

apps/admin-x-framework/src/api/actions.ts (1)

2-2: LGTM! Import path correctly updated to kebab-case.

The import path for ExternalLink and InternalLink types has been correctly updated from '../providers/RoutingProvider' to '../providers/routing-provider', aligning with the kebab-case file naming convention.

apps/admin-x-framework/src/test/acceptance.ts (1)

28-28: LGTM! Import path correctly updated to kebab-case.

The import path for CustomThemeSettingsResponseType has been correctly updated from '../api/customThemeSettings' to '../api/custom-theme-settings', aligning with the kebab-case file naming convention.

apps/admin-x-framework/src/api/newsletters.ts (1)

3-3: LGTM! Import path correctly updated to kebab-case.

The import path for insertToQueryCache and updateQueryCache has been correctly updated from '../utils/api/updateQueries' to '../utils/api/update-queries', aligning with the kebab-case file naming convention.

apps/admin-x-framework/test/unit/api/tinybird.test.tsx (2)

5-6: LGTM! Import paths correctly updated to kebab-case.

The import paths have been correctly updated:

  • FrameworkProvider from '../../../src/providers/FrameworkProvider' to '../../../src/providers/framework-provider'
  • withMockFetch from '../../utils/mockFetch' to '../../utils/mock-fetch'

These changes align with the kebab-case file naming convention.


85-165: LGTM! Whitespace cleanup.

Minor whitespace adjustments are acceptable and improve code consistency.

apps/admin-x-framework/src/hooks/use-active-visitors.ts (2)

2-3: LGTM! Import paths correctly updated to kebab-case.

The import paths have been correctly updated:

  • StatsConfig from '../providers/FrameworkProvider' to '../providers/framework-provider'
  • useTinybirdQuery from './useTinybirdQuery' to './use-tinybird-query'

These changes align with the kebab-case file naming convention.


46-63: LGTM! Whitespace cleanup.

Minor whitespace adjustments are acceptable and improve code consistency.

apps/admin-x-framework/src/hooks/use-permissions.ts (1)

1-1: LGTM! Import path correctly updated to kebab-case.

The import path for useCurrentUser has been correctly updated from '../api/currentUser' to '../api/current-user', aligning with the kebab-case file naming convention.

apps/admin-x-framework/src/utils/stats-config.ts (1)

1-1: Import path correctly updated to kebab-case.

The import path for StatsConfig has been updated from '../providers/FrameworkProvider' to '../providers/framework-provider', aligning with the kebab-case file naming convention.

apps/admin-x-framework/src/hooks/use-handle-error.ts (1)

5-5: Import path correctly updated to kebab-case provider

useFramework now imports from ../providers/framework-provider, matching the new kebab-case filename while preserving behavior. Looks good.

apps/admin-x-framework/src/test/render.tsx (1)

4-4: Test helper import aligned with kebab-case provider filename

Updating TopLevelFrameworkProps to come from ../providers/framework-provider is consistent with the provider rename; no behavior change.

apps/admin-x-framework/src/hooks/use-filterable-api.ts (1)

2-2: fetch-api import path matches kebab-case utils rename

Switching to ../utils/api/fetch-api aligns this hook with the new utils filename; hook behavior remains the same.

apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx (1)

3-5: Test imports consistently updated to kebab-case modules

The imports for FrameworkProvider, useFetchApi, and withMockFetch now reference framework-provider, fetch-api, and mock-fetch, matching the renamed source files and keeping the test behavior identical.

apps/admin-x-framework/src/api/current-user.ts (1)

3-4: current-user API imports updated to kebab-case paths

Both useHandleError and apiUrl/useFetchApi now import from kebab-case modules, which aligns with the repo-wide convention without affecting the useCurrentUser behavior.

apps/admin-x-framework/src/routing.ts (1)

1-2: Re-exports now target kebab-case routing-provider module

The routing helpers and types are still re-exported unchanged, now pointing at ./providers/routing-provider, which matches the new filename convention.

apps/admin-x-framework/src/providers/app-provider.tsx (1)

3-3: App provider now imports framework props from kebab-case module

TopLevelFrameworkProps correctly comes from ./framework-provider, matching the providers-in-src/providers kebab-case pattern used elsewhere. No behavior change to AppProvider or useAppContext.

apps/admin-x-framework/test/unit/hooks/use-form.test.ts (1)

1-506: useForm tests updated to reference kebab-case hook module

The test suite now imports useForm from ../../../src/hooks/use-form, matching the hook’s kebab-case filename. Aside from this path and formatting-only noise, the tests remain the same and continue to give good coverage of useForm behavior.

apps/admin-x-framework/src/utils/api/fetch-api.ts (1)

2-5: Kebab-case import path updates look consistent

The renamed imports for useFramework and handleResponse correctly follow the new kebab-case filenames and should resolve cleanly with the updated module paths.

apps/admin-x-framework/test/unit/utils/stats-config.test.ts (1)

2-2: Updated StatsConfig import path matches new provider filename

The StatsConfig type import now correctly targets framework-provider and stays consistent with the rest of the refactor.

apps/admin-x-framework/src/providers/framework-provider.tsx (1)

4-5: Provider import path normalization looks correct

Imports of queryClient and ExternalLink now point to kebab-case modules and remain consistent with their usage below; no behavioral change.

apps/admin-x-framework/src/test/render-shade.tsx (1)

4-4: TopLevelFrameworkProps import updated consistently

The test helper now pulls TopLevelFrameworkProps from the kebab-case framework-provider module, matching the rest of the refactor.

apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts (1)

1-1: update-queries import path aligned with util rename

The cache update helper imports now target update-queries, matching the new filename while preserving the existing test behavior.

apps/admin-x-framework/src/providers/router-provider.tsx (1)

3-4: Kebab-case provider imports look consistent

framework-provider and navigation-stack-provider imports match the new filename convention and are used identically to before, so behavior stays the same.

apps/admin-x-framework/test/.eslintrc.cjs (1)

8-10: Filename lint rule correctly enforces kebab-case

The ghost/filenames/match-regex rule with ^[a-z0-9.-]+$ aligns with the kebab-case convention for test files (including extensions). Looks good.

apps/admin-x-framework/src/hooks/use-tinybird-query.ts (1)

2-3: use-tinybird-query imports updated to kebab-case with no logic changes

The hook now imports from use-tinybird-token and framework-provider, matching the renamed files; query behavior and return shape remain identical.

Also applies to: 33-37

apps/admin-x-framework/src/test/test-utils.tsx (1)

4-4: FrameworkProvider import now matches kebab-case filename

Switching the import to ../providers/framework-provider is consistent with the new naming convention, and the surrounding test utilities remain unchanged in behavior.

apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx (1)

3-4: useTinybirdToken tests correctly updated for kebab-case hook import

The test now imports useTinybirdToken from use-tinybird-token while continuing to mock getTinybirdToken from the same API module path. Assertions around enabled options and token behavior remain valid.

Also applies to: 62-83, 146-151, 187-191

apps/admin-x-framework/src/api/users.ts (1)

3-4: users API imports updated to kebab-case helpers

Switching to ../utils/api/update-queries and ./current-user keeps the query helpers and usersDataType usage intact while matching the new filename convention.

apps/admin-x-framework/src/utils/api/hooks.ts (2)

4-7: LGTM!

Import paths correctly updated to kebab-case module paths. The imported symbols (useHandleError, usePermission, useFramework, useFetchApi, etc.) remain unchanged, preserving API compatibility.


153-156: LGTM!

The invalidateQueries type union is reformatted for readability but remains semantically identical. The runtime behavior and type constraints are unchanged.

apps/admin-x-framework/src/hooks.ts (1)

1-5: LGTM!

Export paths correctly updated to kebab-case module paths. The public API surface remains unchanged—all exported symbols (useFilterableApi, useForm, useHandleError, usePermission, and type exports) retain their original names.

apps/admin-x-framework/src/index.ts (4)

2-3: LGTM!

Framework provider exports correctly updated to kebab-case path. Exported types and values (StatsConfig, FrameworkContextType, FrameworkProviderProps, TopLevelFrameworkProps, FrameworkProvider, useFramework) remain unchanged.


6-7: LGTM!

App provider exports correctly updated to kebab-case path.


10-18: LGTM!

All hook exports correctly updated to kebab-case paths. The exported symbols and types remain unchanged, preserving backward compatibility for consumers of admin-x-framework.


37-39: LGTM!

Routing provider exports correctly updated to kebab-case paths (router-provider, navigation-stack-provider).

@ibalosh ibalosh changed the title Renamed files to kebab-case and added linting rules Renamed files to kebab-case and added linting rules - admin-x-framework Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

React E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 20031264070 -n playwright-report-react -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

React E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 20031264070 -n playwright-report-react -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@ibalosh ibalosh force-pushed the moved-to-kebab-case-formatting-admin-x-framework branch from 257d970 to bf70f25 Compare December 9, 2025 09:55
Copy link
Contributor

@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

🧹 Nitpick comments (1)
apps/admin-x-framework/.eslintrc.cjs (1)

31-31: Disabling react/jsx-key might hide missing-key list bugs

Turning this rule off means ESLint will no longer catch missing key props in arrays/iterables, which are easy to introduce and can cause subtle rendering issues. If this change is new in this PR, consider keeping it as 'error'/'warn' or scoping any relaxations to specific folders instead of globally.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 257d970 and bf70f25.

📒 Files selected for processing (71)
  • apps/activitypub/package.json (1 hunks)
  • apps/activitypub/src/components/layout/Layout.tsx (1 hunks)
  • apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx (1 hunks)
  • apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx (1 hunks)
  • apps/admin-x-framework/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/src/api/actions.ts (1 hunks)
  • apps/admin-x-framework/src/api/automated-emails.ts (1 hunks)
  • apps/admin-x-framework/src/api/current-user.ts (1 hunks)
  • apps/admin-x-framework/src/api/integrations.ts (1 hunks)
  • apps/admin-x-framework/src/api/invites.ts (1 hunks)
  • apps/admin-x-framework/src/api/newsletters.ts (1 hunks)
  • apps/admin-x-framework/src/api/offers.ts (1 hunks)
  • apps/admin-x-framework/src/api/themes.ts (1 hunks)
  • apps/admin-x-framework/src/api/tiers.ts (1 hunks)
  • apps/admin-x-framework/src/api/users.ts (1 hunks)
  • apps/admin-x-framework/src/hooks.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-active-visitors.ts (3 hunks)
  • apps/admin-x-framework/src/hooks/use-filterable-api.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-handle-error.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-permissions.ts (1 hunks)
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts (2 hunks)
  • apps/admin-x-framework/src/index.ts (2 hunks)
  • apps/admin-x-framework/src/providers/app-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/framework-provider.tsx (3 hunks)
  • apps/admin-x-framework/src/providers/router-provider.tsx (2 hunks)
  • apps/admin-x-framework/src/providers/routing-provider.tsx (1 hunks)
  • apps/admin-x-framework/src/routing.ts (1 hunks)
  • apps/admin-x-framework/src/test/acceptance.ts (1 hunks)
  • apps/admin-x-framework/src/test/render-shade.tsx (1 hunks)
  • apps/admin-x-framework/src/test/render.tsx (1 hunks)
  • apps/admin-x-framework/src/test/test-utils.tsx (3 hunks)
  • apps/admin-x-framework/src/utils/api/fetch-api.ts (2 hunks)
  • apps/admin-x-framework/src/utils/api/hooks.ts (2 hunks)
  • apps/admin-x-framework/src/utils/stats-config.ts (1 hunks)
  • apps/admin-x-framework/test/.eslintrc.cjs (1 hunks)
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx (4 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts (5 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (6 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts (29 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx (13 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts (3 hunks)
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx (10 hunks)
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx (1 hunks)
  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts (1 hunks)
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts (1 hunks)
  • apps/admin-x-settings/src/components/providers/global-data-provider.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/advanced/integrations/zapier-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/general/users/staff-token.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-preview.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-settings.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/utils/is-custom-theme-settings-visible.ts (1 hunks)
  • apps/admin-x-settings/test/acceptance/general/users/profile.test.ts (1 hunks)
  • apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts (1 hunks)
  • apps/admin/src/App.tsx (1 hunks)
  • apps/admin/src/hooks/user-preferences.ts (1 hunks)
  • apps/admin/src/layout/AdminLayout.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavContent.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavMain.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/NavSettings.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/UserMenu.tsx (1 hunks)
  • apps/admin/src/layout/app-sidebar/UserMenuAvatar.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • apps/admin/src/layout/app-sidebar/NavContent.tsx
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
🚧 Files skipped from review as they are similar to previous changes (45)
  • apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx
  • apps/admin-x-framework/src/providers/framework-provider.tsx
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-setting.tsx
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx
  • apps/admin-x-framework/src/utils/api/fetch-api.ts
  • apps/admin-x-framework/src/api/tiers.ts
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-preview.tsx
  • apps/activitypub/src/components/layout/Layout.tsx
  • apps/admin-x-framework/src/test/acceptance.ts
  • apps/admin/src/hooks/user-preferences.ts
  • apps/admin-x-settings/src/components/settings/advanced/integrations/custom-integration-modal.tsx
  • apps/admin-x-framework/src/api/newsletters.ts
  • apps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.ts
  • apps/admin-x-framework/src/api/integrations.ts
  • apps/admin-x-framework/src/utils/api/hooks.ts
  • apps/admin-x-framework/src/hooks/use-handle-error.ts
  • apps/admin-x-framework/src/test/test-utils.tsx
  • apps/admin-x-settings/src/components/settings/advanced/integrations/zapier-modal.tsx
  • apps/admin-x-framework/src/api/current-user.ts
  • apps/admin-x-settings/src/components/settings/general/users/staff-token.tsx
  • apps/admin-x-framework/src/api/offers.ts
  • apps/admin-x-framework/src/hooks/use-filterable-api.ts
  • apps/admin-x-framework/src/hooks/use-permissions.ts
  • apps/admin/src/layout/AdminLayout.tsx
  • apps/admin/src/layout/app-sidebar/NavSettings.tsx
  • apps/admin-x-framework/src/api/users.ts
  • apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx
  • apps/admin/src/layout/app-sidebar/UserMenu.tsx
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts
  • apps/admin-x-settings/src/utils/is-custom-theme-settings-visible.ts
  • apps/admin/src/layout/app-sidebar/UserMenuAvatar.tsx
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
  • apps/admin-x-framework/src/providers/app-provider.tsx
  • apps/admin-x-framework/src/api/themes.ts
  • apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx
  • apps/admin-x-settings/src/components/settings/site/design-and-branding/theme-settings.tsx
  • apps/admin-x-framework/src/test/render-shade.tsx
  • apps/admin-x-settings/test/acceptance/general/users/profile.test.ts
  • apps/admin-x-framework/src/api/invites.ts
  • apps/admin-x-framework/test/unit/utils/stats-config.test.ts
  • apps/admin/src/layout/app-sidebar/NavMain.tsx
  • apps/admin-x-settings/test/unit/api/custom-theme-settings.test.ts
  • apps/admin-x-framework/src/hooks/use-tinybird-query.ts
  • apps/admin-x-framework/test/.eslintrc.cjs
  • apps/admin-x-framework/src/api/automated-emails.ts
🧰 Additional context used
🧠 Learnings (30)
📓 Common learnings
Learnt from: sagzy
Repo: TryGhost/Ghost PR: 24673
File: ghost/i18n/lib/i18n.js:34-35
Timestamp: 2025-11-24T11:12:15.712Z
Learning: In the Ghost i18n package (ghost/i18n/lib/i18n.js), changing existing locale codes requires backwards compatibility handling for users who have already configured those locales. Such changes should be done in a separate PR with migration logic rather than included in feature PRs.
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Applies to ghost/i18n/locales/en/{portal,comments,signup-form,search}.json : Add UI translations to namespace-specific files in `ghost/i18n/locales/en/` for public UI apps (portal.json for Portal, comments.json for Comments UI, etc.)
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.

Applied to files:

  • apps/activitypub/package.json
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in Ghost's ActivityPub module are thoroughly tested in `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`, which covers `generatePendingActivityId`, `isPendingActivity`, and `generatePendingActivity` functions.

Applied to files:

  • apps/activitypub/package.json
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use the `@` alias for internal imports (e.g., `@/lib/utils`)

Applied to files:

  • apps/admin/src/App.tsx
  • apps/admin-x-framework/src/providers/router-provider.tsx
  • apps/admin-x-framework/src/api/actions.ts
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/src/hooks.ts
  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-10-27T11:59:33.968Z
Learnt from: peterzimon
Repo: TryGhost/Ghost PR: 25261
File: apps/admin/src/layout/app-sidebar/UserMenu.tsx:24-29
Timestamp: 2025-10-27T11:59:33.968Z
Learning: In apps/admin/src/layout/app-sidebar/UserMenu.tsx, the hardcoded placeholder data (avatar URL, initials "US", name "User Name", email "userexample.com") is a known limitation and should not be flagged for replacement with real user data.

Applied to files:

  • apps/admin/src/App.tsx
  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Ember admin uses `AdminXComponent` to dynamically import React apps with Suspense and error boundaries

Applied to files:

  • apps/admin/src/App.tsx
  • apps/admin-x-framework/src/test/render.tsx
📚 Learning: 2025-11-10T17:07:54.169Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25377
File: apps/admin/src/ember-bridge/EmberBridge.test.tsx:146-174
Timestamp: 2025-11-10T17:07:54.169Z
Learning: In apps/admin/src/ember-bridge/EmberBridge.tsx, the useEmberAuthSync hook invalidates all React Query caches whenever an emberAuthChange event is emitted, regardless of the isAuthenticated field value in the event payload. The isAuthenticated field exists in the event type but is not currently used by the handler.

Applied to files:

  • apps/admin/src/App.tsx
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts
  • apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
  • apps/admin-x-framework/src/test/render.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use factory pattern for all test data creation instead of hard-coded data or direct database manipulation

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.

Applied to files:

  • apps/admin-x-settings/src/components/providers/global-data-provider.tsx
  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/hooks/**/*.{ts,tsx} : Custom React hooks should be placed in `src/hooks/*`

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts
  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts
  • apps/admin-x-framework/src/hooks.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Admin apps should use `tanstack/react-query` for data fetching

Applied to files:

  • apps/admin-x-framework/src/api/actions.ts
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Use `getByTestId()` only when semantic locators are unavailable, and suggest adding `data-testid` to Ghost codebase when needed

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx
  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-10T11:30:41.316Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25357
File: apps/admin/test-utils/test-helpers.ts:6-12
Timestamp: 2025-11-10T11:30:41.316Z
Learning: In apps/admin/test-utils/test-helpers.ts, the waitForQuerySettled helper is intentionally designed to timeout for idle/disabled queries. It should only treat queries as settled when they reach a terminal state (isSuccess or isError) and are not fetching. This ensures tests properly wait for active queries to complete.

Applied to files:

  • apps/admin-x-framework/test/unit/api/tinybird.test.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Follow ESLint and `tailwindcss/*` plugin rules when writing styles

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test suite names should follow the format 'Ghost Admin - Feature' or 'Ghost Public - Feature'

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names

Applied to files:

  • apps/admin-x-framework/.eslintrc.cjs
  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Applies to ghost/i18n/locales/en/ghost.json : Add UI translations to `ghost/i18n/locales/en/ghost.json` for Admin UI features

Applied to files:

  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
📚 Learning: 2025-11-24T11:12:15.712Z
Learnt from: sagzy
Repo: TryGhost/Ghost PR: 24673
File: ghost/i18n/lib/i18n.js:34-35
Timestamp: 2025-11-24T11:12:15.712Z
Learning: In the Ghost i18n package (ghost/i18n/lib/i18n.js), changing existing locale codes requires backwards compatibility handling for users who have already configured those locales. Such changes should be done in a separate PR with migration logic rather than included in feature PRs.

Applied to files:

  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
📚 Learning: 2025-11-06T05:35:41.162Z
Learnt from: danielraffel
Repo: TryGhost/Ghost PR: 25366
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:13-23
Timestamp: 2025-11-06T05:35:41.162Z
Learning: In apps/admin/src/layout/app-sidebar/NavHeader.tsx, the React component dispatches a synthetic KeyboardEvent to trigger the Ember keymaster.js search modal shortcut. This approach is known to have cross-browser reliability issues but was deferred for architectural refactoring in a separate PR. The recommended fix is to expose a global function or custom DOM event from the Ember app instead of relying on synthetic keyboard events with keymaster.js.

Applied to files:

  • apps/admin/src/layout/app-sidebar/NavGhostPro.tsx
  • apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Use `admin-x-framework` for API hooks (useBrowse, useEdit, etc.) in Admin apps

Applied to files:

  • apps/admin-x-framework/src/hooks.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Always follow ADRs in `../adr/` folder (ADR-0001: AAA pattern, ADR-0002: Page Objects)

Applied to files:

  • apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/test/unit/**/*.test.{ts,tsx,js} : Vitest unit tests should be located in `test/unit/*` with pattern `test/unit/**/*.(test).(ts|tsx|js)` and use the `render` helper from `test/unit/utils/test-utils.tsx`

Applied to files:

  • apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/index.ts : Place new UI components under `src/components/ui` and export them from `src/index.ts`

Applied to files:

  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-25T11:58:51.652Z
Learnt from: ibalosh
Repo: TryGhost/Ghost PR: 25525
File: apps/shade/src/shade-app.tsx:4-4
Timestamp: 2025-11-25T11:58:51.652Z
Learning: In apps/shade, the app wrapper file should be named `src/shade-app.tsx` (kebab-case) while the component itself is exported as `ShadeApp` (PascalCase). Context providers should be placed in `src/providers/*` using kebab-case filenames.

Applied to files:

  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use CVA (Class Variance Authority) for component variants when useful instead of heavy prop configuration

Applied to files:

  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/features/**/*.{ts,tsx} : Higher-level, opinionated components (e.g., PostShareModal, SourceTabs) should be placed in `src/components/features/*`

Applied to files:

  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.{ts,tsx} : Prefer less comments and give things clear names

Applied to files:

  • apps/admin-x-framework/src/index.ts
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/lib/utils.ts : Shared utilities (class merging, formatting, chart helpers) should be centralized in `src/lib/utils.ts`

Applied to files:

  • apps/admin-x-framework/src/index.ts
🧬 Code graph analysis (1)
apps/admin-x-framework/test/unit/api/tinybird.test.tsx (2)
apps/admin-x-framework/src/index.ts (1)
  • getTinybirdToken (48-48)
apps/admin-x-framework/src/api/tinybird.ts (1)
  • getTinybirdToken (27-32)
⏰ 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: Build & Push Docker Image
  • GitHub Check: Setup
🔇 Additional comments (23)
apps/activitypub/package.json (1)

3-3: Verify the version bump strategy for kebab-case file renaming.

The PR renames files to kebab-case, but this change in package.json uses a patch version bump (3.0.0 → 3.0.1). If the renaming affects the package's public API—such as export paths or distributed module structure—this represents a breaking change and would require a major version bump (4.0.0) to properly communicate this to consumers.

Please verify:

  1. Whether the file renaming changes the structure or paths of distributed files (in dist/)
  2. Whether any public exports from this package are affected
  3. Whether the version bump is necessary at all for purely internal file reorganization
apps/admin/src/App.tsx (1)

1-9: Import path change to kebab-case looks correct

The updated useCurrentUser import path aligns with the new kebab-case file naming convention and does not affect the surrounding logic. No issues from this file’s side as long as the renamed module exists at api/current-user.

apps/admin-x-framework/src/utils/stats-config.ts (1)

1-1: Import path rename aligns with kebab-case convention

The updated StatsConfig import from '../providers/framework-provider' looks consistent with the new kebab-case filename convention and doesn’t affect runtime behavior in this module.

apps/admin-x-framework/src/test/render.tsx (1)

4-4: Import path update correctly matches kebab-case provider filename

The updated import path to ../providers/framework-provider is consistent with the kebab-case filename and keeps the TopLevelFrameworkProps usage unchanged.

apps/admin-x-framework/test/unit/utils/api/update-queries.test.ts (1)

1-1: LGTM! Import path correctly updated to kebab-case.

The import path has been correctly updated to reflect the renamed source file (update-queries instead of updateQueries), aligning with the PR's objective to enforce kebab-case file naming conventions.

apps/admin-x-framework/test/unit/utils/api/hooks.test.tsx (1)

4-6: Kebab-case import paths aligned with filename convention

The updated imports for FrameworkProvider and withMockFetch correctly point to kebab-case module paths and preserve existing test behavior. No further changes needed here.

apps/admin-x-settings/src/components/providers/global-data-provider.tsx (1)

8-8: LGTM! Import path correctly updated to kebab-case.

The import path has been properly updated from currentUser to current-user to align with the kebab-case naming convention. The imported hook name and its usage remain unchanged.

apps/admin-x-framework/test/unit/api/tinybird.test.tsx (1)

5-6: LGTM! Import paths correctly updated to kebab-case.

The import path updates align with the PR objective to standardize filenames to kebab-case. The test functionality remains unchanged.

apps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsx (1)

3-5: Import paths correctly updated to kebab-case. All three imported files exist at their new locations with proper extensions.

apps/admin/src/layout/app-sidebar/AppSidebarHeader.tsx (1)

9-9: Import path correctly updated to kebab-case.

The import path change aligns with the PR's kebab-case naming convention migration and is consistent with the same update in NavGhostPro.tsx.

apps/admin/src/layout/app-sidebar/NavGhostPro.tsx (1)

9-9: Import path correctly updated to kebab-case.

The new module exists at the correct location and all old references have been removed from the codebase.

apps/admin-x-framework/src/providers/routing-provider.tsx (1)

3-3: LGTM!

Import path correctly updated to kebab-case.

apps/admin-x-framework/src/api/actions.ts (1)

2-2: LGTM!

Import path correctly updated to kebab-case.

apps/admin-x-framework/src/hooks/use-active-visitors.ts (1)

2-3: LGTM!

Import paths correctly updated to kebab-case.

apps/admin-x-framework/src/providers/router-provider.tsx (1)

3-4: LGTM!

Import paths correctly updated to kebab-case.

apps/admin-x-framework/test/unit/hooks/use-active-visitors.test.ts (1)

3-3: LGTM!

Import and mock paths correctly updated to kebab-case and are now consistent with each other.

Also applies to: 17-23

apps/admin-x-framework/src/routing.ts (1)

1-2: LGTM!

Export paths correctly updated to kebab-case while maintaining the public API surface.

apps/admin-x-framework/test/unit/hooks/use-filterable-api.test.ts (1)

2-2: LGTM!

Import and mock paths correctly updated to kebab-case and are consistent with each other.

Also applies to: 5-11

apps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsx (1)

3-4: LGTM!

Import paths correctly updated to kebab-case.

apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts (1)

2-2: Import and mock paths now correctly track kebab-case modules

The usePermission import and current-user mock/import are all pointing at the same kebab-case module IDs, so the tests will exercise the renamed hook and use the mocked useCurrentUser implementation as intended. No further changes needed here.

Also applies to: 5-5, 9-9

apps/admin-x-framework/src/hooks.ts (1)

1-5: Re-exports correctly updated to kebab-case hook modules

All hooks and related types are re-exported from the new kebab-case module paths while keeping the public API (names and types) intact. This central hook barrel remains consistent with the rest of the framework exports.

apps/admin-x-framework/src/index.ts (1)

2-3: Public API exports aligned with kebab-case module filenames

The index barrel now re-exports providers, hooks, and related types from kebab-case module paths while preserving all public names. This keeps the external API stable and matches the new filename convention across providers and hooks.

Also applies to: 6-8, 10-18, 37-39

apps/admin-x-framework/.eslintrc.cjs (1)

33-34: Filename regex matches kebab-case intent; confirm scope and exceptions

The regex ^[a-z0-9.-]+$ cleanly enforces filenames made of lowercase letters, digits, dots and hyphens, which aligns with the kebab-case + extension convention and should cover patterns like post-settings.test.tsx and index.d.ts. Just double-check that all existing JS/TS files in apps/admin-x-framework follow this pattern (and that any intentional exceptions, e.g. vendored or generated files, are either excluded or overridden), so enabling this as an error won’t introduce unexpected noise.

Copy link
Member

@mike182uk mike182uk left a comment

Choose a reason for hiding this comment

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

ActivityPub changes look good @ibalosh

package.json will likely need bumping again by the time it comes to merge this in - just an increment on the patch is all that should be needed 👍

@ibalosh ibalosh force-pushed the moved-to-kebab-case-formatting-admin-x-framework branch from bf70f25 to 6f08f12 Compare December 9, 2025 11:35
@ibalosh
Copy link
Contributor Author

ibalosh commented Dec 9, 2025

thanks @mike182uk !

updated version

@ibalosh ibalosh merged commit 5a4170a into main Dec 9, 2025
35 checks passed
@ibalosh ibalosh deleted the moved-to-kebab-case-formatting-admin-x-framework branch December 9, 2025 12:00
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.

2 participants