Conversation
WalkthroughThis 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 Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (71)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (51)
🧰 Additional context used🧠 Learnings (22)📓 Common learnings📚 Learning: 2025-10-27T11:59:33.968ZApplied to files:
📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-11-03T12:33:31.093ZApplied to files:
📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-05T16:42:12.989ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-26T11:05:59.314ZApplied to files:
📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-11-10T17:07:54.169ZApplied to files:
⏰ 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)
🔇 Additional comments (21)
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. Comment |
There was a problem hiding this comment.
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
useTinybirdTokenis imported from../../../src/hooks/use-tinybird-token, butvi.mockstill 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 renamedfetch-apimoduleThe
useFilterableApiimport now targets../../../src/hooks/use-filterable-apiand the API util import targets../../../src/utils/api/fetch-api, but thevi.mockcall still mocks the old camelCase module ID:
- Import used in tests:
../../../src/utils/api/fetch-api- Mocked module ID:
../../../src/utils/api/fetchApiBecause Vitest matches mocks by the exact module string,
fetchApiModule.useFetchApiwill not be a mocked function, and calls likevi.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 inloadInitialValues
return values.map(value => data.find(item => item[key] === value)!);assumes every requested value exists indata. 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 whenfindreturnsundefined).apps/admin-x-framework/src/utils/api/fetch-api.ts (1)
23-36: Clarify Content-Type comment vs actual behaviorThe comment says "By default, we set the Content-Type header to application/json", but the code only sets it when
options.bodyis 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 conventionThe
ghost/filenames/match-regexrule 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
📒 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.tsapps/admin-x-framework/src/hooks.tsapps/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.tsapps/admin-x-framework/src/test/render.tsxapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/admin-x-framework/src/hooks/use-tinybird-query.tsapps/admin-x-framework/src/utils/api/hooks.tsapps/admin-x-framework/src/api/current-user.tsapps/admin-x-framework/test/unit/api/tinybird.test.tsxapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/src/api/actions.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/admin-x-framework/src/providers/framework-provider.tsxapps/admin-x-framework/src/index.tsapps/admin-x-framework/src/test/render-shade.tsxapps/admin-x-framework/src/providers/router-provider.tsxapps/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.tsapps/admin-x-framework/src/test/render.tsxapps/admin-x-framework/src/api/invites.tsapps/admin-x-framework/test/unit/utils/api/update-queries.test.tsapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/admin-x-framework/test/unit/hooks/use-form.test.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/admin-x-framework/src/utils/api/hooks.tsapps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsxapps/admin-x-framework/src/api/tiers.tsapps/admin-x-framework/test/unit/api/tinybird.test.tsxapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/admin-x-framework/src/providers/framework-provider.tsxapps/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.tsapps/admin-x-framework/src/api/invites.tsapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/admin-x-framework/src/hooks/use-tinybird-query.tsapps/admin-x-framework/src/api/users.tsapps/admin-x-framework/src/utils/api/hooks.tsapps/admin-x-framework/src/api/current-user.tsapps/admin-x-framework/src/api/tiers.tsapps/admin-x-framework/src/api/actions.tsapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/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.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/admin-x-framework/src/index.tsapps/admin-x-framework/src/test/render-shade.tsxapps/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.tsxapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/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.tsxapps/admin-x-framework/src/test/test-utils.tsxapps/admin-x-framework/src/index.tsapps/admin-x-framework/src/test/render-shade.tsxapps/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.tsapps/admin-x-framework/src/api/users.tsapps/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.tsapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/admin-x-framework/test/unit/hooks/use-form.test.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/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.tsxapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/admin-x-framework/test/unit/hooks/use-form.test.tsapps/admin-x-framework/src/hooks.tsapps/admin-x-framework/test/unit/hooks/use-permissions.test.tsapps/admin-x-framework/src/utils/api/hooks.tsapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsxapps/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.tsxapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/admin-x-framework/test/unit/hooks/use-form.test.tsapps/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.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/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.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/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.tsapps/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.tsapps/admin-x-framework/test/unit/hooks/use-tinybird-query.test.tsapps/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.tsapps/admin-x-framework/test/.eslintrc.cjsapps/admin-x-framework/.eslintrc.cjsapps/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.tsapps/admin-x-framework/test/.eslintrc.cjsapps/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.cjsapps/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.cjsapps/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.tsxapps/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.tsxapps/admin-x-framework/test/unit/utils/stats-config.test.tsapps/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.tsxapps/admin-x-framework/src/test/render-shade.tsxapps/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.tsxapps/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.tsxapps/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.tsxapps/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.tsxapps/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.tsxapps/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-behavioralThe 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 conventionThe updated import path to
../utils/api/update-queriesmatches 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. TheAPIKeytype 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 (
FrameworkProviderremains PascalCase,withMockFetchremains 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 importedupdateQueryCachefunction 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
updateQueriestoupdate-queriesis 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 symbolcustomThemeSettingsDataTypeis 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
useFrameworkhas 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
ExternalLinkandInternalLinktypes 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
CustomThemeSettingsResponseTypehas 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
insertToQueryCacheandupdateQueryCachehas 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:
FrameworkProviderfrom'../../../src/providers/FrameworkProvider'to'../../../src/providers/framework-provider'withMockFetchfrom'../../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:
StatsConfigfrom'../providers/FrameworkProvider'to'../providers/framework-provider'useTinybirdQueryfrom'./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
useCurrentUserhas 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
StatsConfighas 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
useFrameworknow 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 filenameUpdating
TopLevelFrameworkPropsto come from../providers/framework-provideris 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 renameSwitching to
../utils/api/fetch-apialigns 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 modulesThe imports for
FrameworkProvider,useFetchApi, andwithMockFetchnow referenceframework-provider,fetch-api, andmock-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 pathsBoth
useHandleErrorandapiUrl/useFetchApinow import from kebab-case modules, which aligns with the repo-wide convention without affecting theuseCurrentUserbehavior.apps/admin-x-framework/src/routing.ts (1)
1-2: Re-exports now target kebab-caserouting-providermoduleThe 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
TopLevelFrameworkPropscorrectly comes from./framework-provider, matching the providers-in-src/providerskebab-case pattern used elsewhere. No behavior change toAppProvideroruseAppContext.apps/admin-x-framework/test/unit/hooks/use-form.test.ts (1)
1-506: useForm tests updated to reference kebab-case hook moduleThe test suite now imports
useFormfrom../../../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 ofuseFormbehavior.apps/admin-x-framework/src/utils/api/fetch-api.ts (1)
2-5: Kebab-case import path updates look consistentThe renamed imports for
useFrameworkandhandleResponsecorrectly 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 filenameThe
StatsConfigtype import now correctly targetsframework-providerand 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 correctImports of
queryClientandExternalLinknow 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 consistentlyThe test helper now pulls
TopLevelFrameworkPropsfrom the kebab-caseframework-providermodule, 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 renameThe 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-providerandnavigation-stack-providerimports 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-caseThe
ghost/filenames/match-regexrule 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 changesThe hook now imports from
use-tinybird-tokenandframework-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 filenameSwitching the import to
../providers/framework-provideris 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 importThe test now imports
useTinybirdTokenfromuse-tinybird-tokenwhile continuing to mockgetTinybirdTokenfrom 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 helpersSwitching to
../utils/api/update-queriesand./current-userkeeps the query helpers andusersDataTypeusage 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
invalidateQueriestype 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).
React E2E Tests FailedTo 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" |
React E2E Tests FailedTo 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" |
257d970 to
bf70f25
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/admin-x-framework/.eslintrc.cjs (1)
31-31: Disablingreact/jsx-keymight hide missing-key list bugsTurning this rule off means ESLint will no longer catch missing
keyprops 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
📒 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.jsonapps/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.jsonapps/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.tsxapps/admin-x-framework/src/providers/router-provider.tsxapps/admin-x-framework/src/api/actions.tsapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/src/hooks.tsapps/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.tsxapps/admin/src/layout/app-sidebar/NavGhostPro.tsxapps/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.tsxapps/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.tsapps/admin-x-framework/test/unit/utils/api/fetch-api.test.tsxapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/test/unit/api/tinybird.test.tsxapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/admin-x-framework/test/unit/utils/api/hooks.test.tsxapps/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.tsapps/admin-x-framework/test/unit/hooks/use-filterable-api.test.tsapps/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.tsxapps/admin/src/layout/app-sidebar/NavGhostPro.tsxapps/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.tsapps/admin-x-framework/test/unit/hooks/use-handle-error.test.tsxapps/admin-x-framework/test/unit/hooks/use-permissions.test.tsapps/admin-x-framework/src/hooks.tsapps/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.tsapps/admin-x-framework/test/unit/hooks/use-active-visitors.test.tsapps/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.tsxapps/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.cjsapps/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.cjsapps/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.tsxapps/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.jsonuses 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:
- Whether the file renaming changes the structure or paths of distributed files (in
dist/)- Whether any public exports from this package are affected
- 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 correctThe updated
useCurrentUserimport 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 atapi/current-user.apps/admin-x-framework/src/utils/stats-config.ts (1)
1-1: Import path rename aligns with kebab-case conventionThe updated
StatsConfigimport 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 filenameThe updated import path to
../providers/framework-provideris consistent with the kebab-case filename and keeps theTopLevelFrameworkPropsusage 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-queriesinstead ofupdateQueries), 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 conventionThe updated imports for
FrameworkProviderandwithMockFetchcorrectly 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
currentUsertocurrent-userto 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 modulesThe
usePermissionimport andcurrent-usermock/import are all pointing at the same kebab-case module IDs, so the tests will exercise the renamed hook and use the mockeduseCurrentUserimplementation 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 modulesAll 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 filenamesThe 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 exceptionsThe 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 likepost-settings.test.tsxandindex.d.ts. Just double-check that all existing JS/TS files inapps/admin-x-frameworkfollow this pattern (and that any intentional exceptions, e.g. vendored or generated files, are either excluded or overridden), so enabling this as anerrorwon’t introduce unexpected noise.
bf70f25 to
6f08f12
Compare
|
thanks @mike182uk ! updated version |
ref https://linear.app/ghost/issue/NY-722/migrate-ghost-codebase-to-kebab-case-file-naming-convention
what
why