Skip to content

Conversation

@ibalosh
Copy link
Contributor

@ibalosh ibalosh commented Dec 2, 2025

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

what

  • Renamed folders to match to kebab-case format

why

  • To match better our working agreement on filenames in Ghost repo

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

This pull request updates import paths across the admin-x-settings app. Changes include switching module path casing/formatting (camelCase → kebab-case), standardizing some relative imports to a project alias (@src/...), and adding trailing newlines to several test files. Affected files include various components for modals, settings pages, and unit tests for social URL utilities. No application logic, control flow, or public API signatures were modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify path-alias/tsconfig and build tooling resolve the updated @src/... imports.
  • Confirm all renamed directories/files (e.g., socialUrlssocial-urls, memberEmailsmember-emails, designAndBrandingdesign-and-branding, etc.) are consistently updated across source and test files.
  • Check modal/component import paths (modals.tsx, growth-settings, design-modal, announcement-bar-modal, member-emails) for typos or missing updates.
  • Run unit tests affected by changed import paths (social URL tests) to ensure no module-resolution failures.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Renamed folders to kebab-case' directly and clearly summarizes the main change across all modified files, which consistently involve updating import paths from camelCase folder names to kebab-case naming conventions.
Description check ✅ Passed The description is directly related to the changeset, referencing a specific issue and explaining both what was changed (folder renaming to kebab-case) and why (to align with repository's filename conventions), matching the import path updates throughout the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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-settings-folders

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.

@ibalosh ibalosh force-pushed the moved-to-kebab-case-formatting-admin-x-settings-folders branch from 905a4d3 to 98b6976 Compare December 2, 2025 10:11
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 (2)
apps/admin-x-settings/test/unit/utils/threads-urls.test.ts (1)

1-39: Switched to @src social-urls import cleanly

Using @src/utils/social-urls/index is consistent with the kebab-case rename and avoids brittle relative paths; the imported symbols match existing test usage.

apps/admin-x-settings/test/unit/utils/youtube-urls.test.ts (1)

1-67: YouTube social-urls import path is correct

../../../src/utils/social-urls/index correctly targets the kebab-case utils module from this test location; rest of tests remain unchanged.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 905a4d3 and 98b6976.

📒 Files selected for processing (17)
  • apps/admin-x-settings/src/components/providers/routing/modals.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/general/social-accounts.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/general/user-detail-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/general/users/social-links-tab.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/growth/growth-settings.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/announcement-bar-modal.tsx (1 hunks)
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx (1 hunks)
  • apps/admin-x-settings/test/unit/utils/bluesky-urls.test.ts (2 hunks)
  • apps/admin-x-settings/test/unit/utils/facebook-urls.test.ts (2 hunks)
  • apps/admin-x-settings/test/unit/utils/instagram-urls.test.ts (1 hunks)
  • apps/admin-x-settings/test/unit/utils/linkedin-urls.test.ts (2 hunks)
  • apps/admin-x-settings/test/unit/utils/mastodon-urls.test.ts (1 hunks)
  • apps/admin-x-settings/test/unit/utils/threads-urls.test.ts (2 hunks)
  • apps/admin-x-settings/test/unit/utils/tiktok.test.ts (1 hunks)
  • apps/admin-x-settings/test/unit/utils/twitter-urls.test.ts (2 hunks)
  • apps/admin-x-settings/test/unit/utils/youtube-urls.test.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (12)
  • apps/admin-x-settings/test/unit/utils/tiktok.test.ts
  • apps/admin-x-settings/src/components/settings/general/users/social-links-tab.tsx
  • apps/admin-x-settings/src/components/settings/site/announcement-bar-modal.tsx
  • apps/admin-x-settings/test/unit/utils/facebook-urls.test.ts
  • apps/admin-x-settings/src/components/settings/general/social-accounts.tsx
  • apps/admin-x-settings/test/unit/utils/twitter-urls.test.ts
  • apps/admin-x-settings/src/components/providers/routing/modals.tsx
  • apps/admin-x-settings/test/unit/utils/linkedin-urls.test.ts
  • apps/admin-x-settings/test/unit/utils/bluesky-urls.test.ts
  • apps/admin-x-settings/src/components/settings/site/design-modal.tsx
  • apps/admin-x-settings/src/components/settings/general/user-detail-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/member-emails.tsx
🧰 Additional context used
🧠 Learnings (9)
📓 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/**/*.{ts,tsx,js} : Use the `@` alias for internal imports (e.g., `@/lib/utils`)
📚 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/utils/mastodon-urls.test.ts
  • apps/admin-x-settings/test/unit/utils/instagram-urls.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-settings/test/unit/utils/mastodon-urls.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 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-settings/test/unit/utils/mastodon-urls.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/lib/utils.ts : Shared utilities (class merging, formatting, chart helpers) should be centralized in `src/lib/utils.ts`

Applied to files:

  • apps/admin-x-settings/test/unit/utils/mastodon-urls.test.ts
📚 Learning: 2025-07-09T18:06:09.856Z
Learnt from: troyciesco
Repo: TryGhost/Ghost PR: 24291
File: apps/admin-x-settings/package.json:45-45
Timestamp: 2025-07-09T18:06:09.856Z
Learning: In Ghost admin-x-settings, webhook URL validation uses {require_tld: false} to allow localhost URLs for local integration testing, while social URL validation uses the default {require_tld: true} since social URLs should be public-facing.

Applied to files:

  • apps/admin-x-settings/test/unit/utils/mastodon-urls.test.ts
  • apps/admin-x-settings/test/unit/utils/threads-urls.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-settings/test/unit/utils/youtube-urls.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 suite names should follow the format 'Ghost Admin - Feature' or 'Ghost Public - Feature'

Applied to files:

  • apps/admin-x-settings/test/unit/utils/youtube-urls.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 : Use factory pattern for all test data creation instead of hard-coded data or direct database manipulation

Applied to files:

  • apps/admin-x-settings/test/unit/utils/threads-urls.test.ts
  • apps/admin-x-settings/test/unit/utils/instagram-urls.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Admin-X Settings tests
  • GitHub Check: Unit tests (Node 22.18.0)
  • GitHub Check: Build & Push
🔇 Additional comments (3)
apps/admin-x-settings/src/components/settings/growth/growth-settings.tsx (1)

1-34: EmbedSignupForm import path update looks correct

The new ./embed-signup/embed-signup-form path matches the kebab-case folder naming and the component usage below; no other issues spotted.

apps/admin-x-settings/test/unit/utils/instagram-urls.test.ts (1)

1-63: Instagram social-urls import now matches kebab-case module

The updated ../../../src/utils/social-urls/index path lines up with the renamed utils folder; tests otherwise remain intact.

apps/admin-x-settings/test/unit/utils/mastodon-urls.test.ts (1)

1-81: Mastodon tests correctly point at social-urls module

Import updated to ../../../src/utils/social-urls/index in line with the folder rename; existing tests continue to target the same helpers.

@ibalosh ibalosh merged commit 0dcbe13 into main Dec 2, 2025
28 of 30 checks passed
@ibalosh ibalosh deleted the moved-to-kebab-case-formatting-admin-x-settings-folders branch December 2, 2025 10:31
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