Skip to content

Conversation

@lukasz-hycom
Copy link
Collaborator

@lukasz-hycom lukasz-hycom commented Dec 2, 2025

What does this PR do?

  • removed React.FC type annotations

Key Changes

  • removed React.FC type annotations from components in ui, blocks, apps/frontend, apps/docs, packages/modules/surveyjs, packages/utils/frontend and templates

Summary by CodeRabbit

  • Refactor
    • Updated component type annotations across the codebase for improved code consistency and maintainability. No functional or behavioral changes; all components continue to work as expected.

✏️ Tip: You can customize this high-level summary in your review settings.

@lukasz-hycom lukasz-hycom self-assigned this Dec 2, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

A systematic refactoring removes explicit React.FC<Props> type annotations from approximately 100+ React functional components across docs, frontend, and blocks packages, replacing them with plain arrow functions where props types are annotated directly on destructured parameters. No runtime behavior changes.

Changes

Cohort / File(s) Summary
Docs Accordion & Badge Components
apps/docs/src/components/Accordion/index.tsx, apps/docs/src/components/Badge/index.tsx, apps/docs/src/components/BadgeList/index.tsx
Replaced React.FC<Props> with plain functions; props types moved to parameter destructuring
Docs Section Components
apps/docs/src/components/BenefitsSection/index.tsx, apps/docs/src/components/Card/index.tsx, apps/docs/src/components/ClientsSection/index.tsx, apps/docs/src/components/DXPFeaturesSection/index.tsx, apps/docs/src/components/DXPIntegrationsSection/index.tsx, apps/docs/src/components/DXPUseCasesSection/index.tsx
Removed React.FC generic annotations; added explicit parameter-level type annotations
Docs Feature & Layout Components
apps/docs/src/components/FeatureTile/index.tsx, apps/docs/src/components/FooterSection/index.tsx, apps/docs/src/components/GuidesSection/index.tsx, apps/docs/src/components/HomepageBenefitsSection/index.tsx, apps/docs/src/components/HomepageFeaturesSection/index.tsx, apps/docs/src/components/HomepageStartersSection/index.tsx
Converted React.FC-typed components to plain function declarations with inline prop typing
Docs Utility Components
apps/docs/src/components/HoverCard/index.tsx, apps/docs/src/components/HubspotForm/index.tsx, apps/docs/src/components/SubscribeSection/index.tsx, apps/docs/src/components/Tile/index.tsx
Replaced React.FC<Props> declarations with plain functions; type annotations moved to parameters
Frontend Auth & Layout Containers
apps/frontend/src/containers/Auth/AuthLayout/AuthLayout.tsx, apps/frontend/src/containers/Auth/SignInForm/SignInForm.tsx, apps/frontend/src/containers/Auth/Toolbar/LocaleSwitcher.tsx
Removed React.FC typings; props now typed inline in parameter destructuring
Frontend Header, Footer & Context Components
apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.tsx, apps/frontend/src/containers/Footer/Footer.tsx, apps/frontend/src/containers/Header/Header.tsx
Converted from React.FC<Props> to plain function components with typed parameters
Frontend Page Templates
apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.tsx, apps/frontend/src/templates/PageTemplate/PageTemplate.tsx, apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.tsx
Changed async component signatures from React.FC<Props> to plain async functions with parameter-level type annotations
Blocks: Article Components
packages/blocks/article-list/src/frontend/ArticleList.*.tsx, packages/blocks/article-search/src/frontend/ArticleSearch.*.tsx, packages/blocks/article/src/frontend/Article.*.tsx
Systematically removed React.FC wrappers across client, renderer, and server components
Blocks: Category & Service Components
packages/blocks/category-list/src/frontend/CategoryList.*.tsx, packages/blocks/category/src/frontend/Category*.tsx, packages/blocks/service-details/src/frontend/ServiceDetails.*.tsx, packages/blocks/service-list/src/frontend/ServiceList.*.tsx
Replaced React.FC<Props> with plain functions; applied consistent parameter-level typing
Blocks: Invoice, Notification & Order Components
packages/blocks/invoice-list/src/frontend/InvoiceList.*.tsx, packages/blocks/notification-details/src/frontend/NotificationDetails.*.tsx, packages/blocks/notification-list/src/frontend/NotificationList.*.tsx, packages/blocks/notification-summary/src/frontend/NotificationSummary.*.tsx, packages/blocks/order-details/src/frontend/OrderDetails.*.tsx, packages/blocks/order-list/src/frontend/OrderList.*.tsx
Removed explicit React.FC annotations; added inline parameter type annotations
Blocks: Summary, Payment & Quick Links
packages/blocks/orders-summary/src/frontend/OrdersSummary.*.tsx, packages/blocks/payments-history/src/frontend/PaymentsHistory.*.tsx, packages/blocks/payments-summary/src/frontend/PaymentsSummary.*.tsx, packages/blocks/quick-links/src/frontend/QuickLinks.*.tsx
Converted from React.FC<Props> declarations to plain function components with typed destructuring
Blocks: Featured Services & Survey Components
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.*.tsx, packages/blocks/surveyjs-form/src/frontend/SurveyJs.*.tsx
Removed React.FC wrappers; moved type annotations to function parameters
Blocks: Ticket & User Account Components
packages/blocks/ticket-details/src/frontend/TicketDetails.*.tsx, packages/blocks/ticket-list/src/frontend/TicketList.*.tsx, packages/blocks/ticket-recent/src/frontend/TicketRecent.*.tsx, packages/blocks/ticket-summary/src/frontend/TicketSummary.*.tsx, packages/blocks/user-account/src/frontend/UserAccount.*.tsx
Systematically replaced React.FC<Props> with plain functions; consistent parameter-level prop typing
Modules: SurveyJS Components
packages/modules/surveyjs/src/frontend/Components/Fieldset/Fieldset.tsx, packages/modules/surveyjs/src/frontend/Questions/CustomSurveyQuestionText.tsx, packages/modules/surveyjs/src/frontend/Survey.tsx
Removed FC/React.FC imports and type annotations; converted to plain function signatures

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Areas requiring attention:

  • Pattern consistency: Verify that all ~100+ component conversions follow the same pattern consistently (no exceptions or typos in type annotations)
  • Parameter destructuring accuracy: Spot-check a sample of files to ensure all destructured props are correctly typed and no props were accidentally omitted
  • Import cleanup: Verify that React.FC and FC imports were removed where they are no longer used (particularly in packages/modules/surveyjs/src/frontend/Components/Fieldset/Fieldset.tsx)
  • Async component signatures: Ensure async server components maintained their typing correctly (e.g., in .server.tsx files)
  • Type annotation placement: Confirm that Readonly<Props> wrappers were preserved where they existed (some components use Readonly<>)

Possibly related PRs

Suggested reviewers

  • marcinkrasowski

Poem

🐰 Hops through the code with glee so bright,
Removing FC types, making signatures light,
Plain functions dance where generics once stood,
A hop, skip, and jump—this refactor is good!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description identifies the main change but lacks critical sections from the template (Related Tickets, How to test, Media) and provides minimal detail on rationale or side effects. Add related ticket reference, explain the rationale for replacing React.FC, describe testing approach, and clarify potential side effects such as implicit children prop removal.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor/replacing react fc' accurately describes the main change—removing React.FC type annotations across multiple components.
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 feature/replacing-react-fc

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.

@lukasz-hycom lukasz-hycom changed the title Feature/replacing react fc refactor/replacing react fc Dec 2, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
packages/blocks/ticket-recent/src/frontend/TicketRecent.client.tsx (1)

22-26: Handle undefined case in string concatenation.

If extractedContent is undefined, the optional chaining on line 25 returns undefined, which then concatenates with '...' to produce the string "undefined...".

Apply this diff:

 function extractFirst(content: string) {
     const match = content.match(/<p>([\s\S]*?)<\/p>/);
     const extractedContent = match ? match[1] : content;
-    return extractedContent?.slice(0, 90) + '...';
+    return (extractedContent || '').slice(0, 90) + '...';
 }
🧹 Nitpick comments (11)
packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx (1)

17-17: Change away from React.FC looks good; verify children typing and consider simplifying parameter.

Moving from React.FC<TicketSummaryPureProps> to an inline parameter type is fine and keeps the component’s runtime behavior unchanged, assuming TicketSummaryPureProps already encodes everything you need (including children if it’s ever passed). Also, since you only use component as an object, you could simplify the signature to export const TicketSummaryPure = (component: TicketSummaryPureProps) => { ... } and drop the { ...component } rest spread.

packages/blocks/ticket-list/src/frontend/TicketList.server.tsx (1)

10-17: LGTM! Refactoring correctly removes React.FC.

The function signature correctly implements the refactoring pattern by removing React.FC and applying inline prop typing. All props are properly destructured and type-annotated.

For enhanced API clarity, consider adding an explicit return type annotation:

-export const TicketListServer = async ({
+export const TicketListServer = async ({
     id,
     accessToken,
     locale,
     routing,
     hasPriority,
     isDraftModeEnabled,
-}: TicketListProps) => {
+}: TicketListProps): Promise<JSX.Element | null> => {
packages/blocks/notification-list/src/frontend/NotificationList.renderer.tsx (1)

9-31: React.FC removal looks good; check props surface and consider explicit return type

The refactor to type props on the parameter instead of via React.FC preserves runtime behavior and keeps the component signature clear. One thing to double‑check is that NotificationListRendererProps still matches how this component is used at call sites (especially if anything relied on the implicit children prop from React.FC). You may also optionally add an explicit return type (: JSX.Element) on this exported component to keep its public type stable over time, but inference is fine if you prefer it.

packages/blocks/category/src/frontend/Category.server.tsx (1)

11-45: Return type annotation would add clarity for async server components

The refactor to remove React.FC is correct. Since CategoryProps has never included a children property, this change has no impact on children behavior.

For consistency with async server component patterns, consider adding an explicit return type:

-export const Category = async ({
-    id,
-    slug,
-    accessToken,
-    locale,
-    routing,
-    renderBlocks,
-    hasPriority,
-}: CategoryProps) => {
+export const Category = async ({
+    id,
+    slug,
+    accessToken,
+    locale,
+    routing,
+    renderBlocks,
+    hasPriority,
+}: CategoryProps): Promise<JSX.Element | null> => {

This is optional but improves type clarity.

packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx (1)

18-18: Removal of Readonly wrapper on props.

The Readonly wrapper has been removed from the props type. While this is consistent with the broader refactoring pattern, ensure that the props type definition (NotificationDetailsPureProps) already enforces immutability if needed, or confirm that removing Readonly aligns with the project's type safety standards.

TypeScript Readonly utility type best practices for React props
packages/blocks/notification-summary/src/frontend/NotificationSummary.client.tsx (1)

17-65: NotificationSummaryPure React.FC removal looks correct

Moving the props type to the parameter and dropping React.FC preserves behavior here; the component still only reads from infoCards/layout and returns null when there are no cards. If you still want to enforce immutability at the type level (as with Readonly<NotificationSummaryPureProps> before), you could wrap the parameter type in Readonly<>, but it’s optional.

packages/blocks/payments-history/src/frontend/PaymentsHistory.client.tsx (1)

15-27: Signature refactor is correct; consider simplifying destructuring

The inline props typing matches PaymentsHistoryPureProps and preserves behavior. You can simplify by destructuring directly in the parameter and drop the extra spread/object allocation:

-export const PaymentsHistoryPure = ({ ...component }: PaymentsHistoryPureProps) => {
-    const { chartData, labels, title, currency } = component;
+export const PaymentsHistoryPure = ({ chartData, labels, title, currency }: PaymentsHistoryPureProps) => {
apps/docs/src/components/GuidesSection/index.tsx (1)

34-87: Inline props typing looks good; optional key improvement

The new inline-typed signature is consistent with GuidesSectionProps and keeps behavior unchanged.

As a small follow-up, if guide.title (or another stable identifier) is unique, consider using it instead of index as the React key to avoid potential reordering issues:

-                    {guides.map((guide, index) => (
-                        <li key={index}>
+                    {guides.map((guide) => (
+                        <li key={guide.title}>
packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx (1)

9-52: ArticleListRenderer props typing is correct; verify unused slug prop

The inline-typed signature for ArticleListRenderer is consistent with the props it actually uses (id, accessToken, routing, hasPriority, isDraftModeEnabled), and behavior is unchanged.

Given ArticleListRendererProps also defines a slug: string[] (see ArticleList.types.ts), consider either wiring slug through if it’s needed or removing it from the interface to avoid dead props.

apps/docs/src/components/HomepageBenefitsSection/index.tsx (1)

14-22: Benefit: clean React.FC removal; consider tidying unused prop

The move to const Benefit = ({ ... }: BenefitProps) => ( keeps behavior unchanged and removes the React.FC generic, which is consistent with the PR’s goals.

BenefitProps still declares reverse?: boolean but it isn’t used in the component. If it’s no longer needed, consider removing it from the interface; otherwise, wire it into layout/styles so consumers get the expected effect.

apps/docs/src/components/Tile/index.tsx (1)

9-17: Tile/TileGroup: props typing is surprising; consider separating concerns

The React.FC removal itself is fine, but the current typings are odd:

  • TileProps requires title and constrains children to string.
  • TileGroup reuses TileProps but only needs children, forcing callers to pass an unused title and (by type) string children, even though this wrapper is likely meant to hold <Tile> elements.

To make usage clearer and less restrictive, consider:

 interface TileProps {
-    title: string;
-    icon?: string;
-    children: string;
+    title: string;
+    icon?: string;
+    children: React.ReactNode;
 }
 
+interface TileGroupProps {
+    children: React.ReactNode;
+}
+
-export const Tile = ({ title, children, icon }: TileProps) => (
+export const Tile = ({ title, children, icon }: TileProps) => (
   ...
 );
 
-export const TileGroup = ({ children }: TileProps) => <div className="grid grid-cols-2 gap-4 w-full">{children}</div>;
+export const TileGroup = ({ children }: TileGroupProps) => (
+    <div className="grid grid-cols-2 gap-4 w-full">{children}</div>
+);

This keeps the runtime behavior as-is while aligning the types with expected usage.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c780d5 and 362dd33.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (107)
  • apps/docs/src/components/Accordion/index.tsx (3 hunks)
  • apps/docs/src/components/Badge/index.tsx (1 hunks)
  • apps/docs/src/components/BadgeList/index.tsx (1 hunks)
  • apps/docs/src/components/BenefitsSection/index.tsx (2 hunks)
  • apps/docs/src/components/Card/index.tsx (1 hunks)
  • apps/docs/src/components/ClientsSection/index.tsx (1 hunks)
  • apps/docs/src/components/DXPFeaturesSection/index.tsx (1 hunks)
  • apps/docs/src/components/DXPIntegrationsSection/index.tsx (1 hunks)
  • apps/docs/src/components/DXPUseCasesSection/index.tsx (1 hunks)
  • apps/docs/src/components/FeatureTile/index.tsx (2 hunks)
  • apps/docs/src/components/FooterSection/index.tsx (1 hunks)
  • apps/docs/src/components/GuidesSection/index.tsx (1 hunks)
  • apps/docs/src/components/HomepageBenefitsSection/index.tsx (1 hunks)
  • apps/docs/src/components/HomepageFeaturesSection/index.tsx (2 hunks)
  • apps/docs/src/components/HomepageStartersSection/index.tsx (1 hunks)
  • apps/docs/src/components/HoverCard/index.tsx (1 hunks)
  • apps/docs/src/components/HubspotForm/index.tsx (1 hunks)
  • apps/docs/src/components/SubscribeSection/index.tsx (1 hunks)
  • apps/docs/src/components/Tile/index.tsx (1 hunks)
  • apps/frontend/src/containers/Auth/AuthLayout/AuthLayout.tsx (1 hunks)
  • apps/frontend/src/containers/Auth/SignInForm/SignInForm.tsx (1 hunks)
  • apps/frontend/src/containers/Auth/Toolbar/LocaleSwitcher.tsx (1 hunks)
  • apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.tsx (1 hunks)
  • apps/frontend/src/containers/Footer/Footer.tsx (1 hunks)
  • apps/frontend/src/containers/Header/Header.tsx (1 hunks)
  • apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.tsx (1 hunks)
  • apps/frontend/src/templates/PageTemplate/PageTemplate.tsx (1 hunks)
  • apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.tsx (1 hunks)
  • packages/blocks/article-list/src/frontend/ArticleList.client.tsx (1 hunks)
  • packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx (1 hunks)
  • packages/blocks/article-list/src/frontend/ArticleList.server.tsx (1 hunks)
  • packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx (1 hunks)
  • packages/blocks/article-search/src/frontend/ArticleSearch.renderer.tsx (1 hunks)
  • packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx (1 hunks)
  • packages/blocks/article/src/frontend/Article.client.tsx (1 hunks)
  • packages/blocks/article/src/frontend/Article.renderer.tsx (1 hunks)
  • packages/blocks/article/src/frontend/Article.server.tsx (1 hunks)
  • packages/blocks/category-list/src/frontend/CategoryList.client.tsx (1 hunks)
  • packages/blocks/category-list/src/frontend/CategoryList.renderer.tsx (1 hunks)
  • packages/blocks/category-list/src/frontend/CategoryList.server.tsx (1 hunks)
  • packages/blocks/category/src/frontend/Category.client.tsx (1 hunks)
  • packages/blocks/category/src/frontend/Category.renderer.tsx (1 hunks)
  • packages/blocks/category/src/frontend/Category.server.tsx (1 hunks)
  • packages/blocks/category/src/frontend/CategoryBlocks.tsx (1 hunks)
  • packages/blocks/faq/src/frontend/Faq.client.tsx (1 hunks)
  • packages/blocks/faq/src/frontend/Faq.renderer.tsx (1 hunks)
  • packages/blocks/faq/src/frontend/Faq.server.tsx (1 hunks)
  • packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.client.tsx (1 hunks)
  • packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (1 hunks)
  • packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.server.tsx (1 hunks)
  • packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx (1 hunks)
  • packages/blocks/invoice-list/src/frontend/InvoiceList.renderer.tsx (1 hunks)
  • packages/blocks/invoice-list/src/frontend/InvoiceList.server.tsx (1 hunks)
  • packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx (1 hunks)
  • packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx (1 hunks)
  • packages/blocks/notification-details/src/frontend/NotificationDetails.server.tsx (1 hunks)
  • packages/blocks/notification-list/src/frontend/NotificationList.client.tsx (1 hunks)
  • packages/blocks/notification-list/src/frontend/NotificationList.renderer.tsx (1 hunks)
  • packages/blocks/notification-list/src/frontend/NotificationList.server.tsx (1 hunks)
  • packages/blocks/notification-summary/src/frontend/NotificationSummary.client.tsx (1 hunks)
  • packages/blocks/notification-summary/src/frontend/NotificationSummary.renderer.tsx (1 hunks)
  • packages/blocks/notification-summary/src/frontend/NotificationSummary.server.tsx (1 hunks)
  • packages/blocks/order-details/src/frontend/OrderDetails.client.tsx (2 hunks)
  • packages/blocks/order-details/src/frontend/OrderDetails.renderer.tsx (1 hunks)
  • packages/blocks/order-details/src/frontend/OrderDetails.server.tsx (1 hunks)
  • packages/blocks/order-list/src/frontend/OrderList.client.tsx (1 hunks)
  • packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (1 hunks)
  • packages/blocks/order-list/src/frontend/OrderList.server.tsx (1 hunks)
  • packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx (2 hunks)
  • packages/blocks/orders-summary/src/frontend/OrdersSummary.renderer.tsx (1 hunks)
  • packages/blocks/orders-summary/src/frontend/OrdersSummary.server.tsx (1 hunks)
  • packages/blocks/payments-history/src/frontend/PaymentsHistory.client.tsx (1 hunks)
  • packages/blocks/payments-history/src/frontend/PaymentsHistory.renderer.tsx (1 hunks)
  • packages/blocks/payments-history/src/frontend/PaymentsHistory.server.tsx (1 hunks)
  • packages/blocks/payments-summary/src/frontend/PaymentsSummary.client.tsx (1 hunks)
  • packages/blocks/payments-summary/src/frontend/PaymentsSummary.renderer.tsx (1 hunks)
  • packages/blocks/payments-summary/src/frontend/PaymentsSummary.server.tsx (1 hunks)
  • packages/blocks/quick-links/src/frontend/QuickLinks.client.tsx (1 hunks)
  • packages/blocks/quick-links/src/frontend/QuickLinks.renderer.tsx (1 hunks)
  • packages/blocks/quick-links/src/frontend/QuickLinks.server.tsx (1 hunks)
  • packages/blocks/service-details/src/frontend/ServiceDetails.client.tsx (1 hunks)
  • packages/blocks/service-details/src/frontend/ServiceDetails.renderer.tsx (1 hunks)
  • packages/blocks/service-details/src/frontend/ServiceDetails.server.tsx (1 hunks)
  • packages/blocks/service-list/src/frontend/ServiceList.client.tsx (1 hunks)
  • packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (1 hunks)
  • packages/blocks/service-list/src/frontend/ServiceList.server.tsx (1 hunks)
  • packages/blocks/surveyjs-form/src/frontend/SurveyJs.client.tsx (1 hunks)
  • packages/blocks/surveyjs-form/src/frontend/SurveyJs.renderer.tsx (1 hunks)
  • packages/blocks/surveyjs-form/src/frontend/SurveyJs.server.tsx (1 hunks)
  • packages/blocks/ticket-details/src/frontend/TicketDetails.client.tsx (1 hunks)
  • packages/blocks/ticket-details/src/frontend/TicketDetails.renderer.tsx (1 hunks)
  • packages/blocks/ticket-details/src/frontend/TicketDetails.server.tsx (1 hunks)
  • packages/blocks/ticket-list/src/frontend/TicketList.client.tsx (1 hunks)
  • packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx (1 hunks)
  • packages/blocks/ticket-list/src/frontend/TicketList.server.tsx (1 hunks)
  • packages/blocks/ticket-recent/src/frontend/TicketRecent.client.tsx (1 hunks)
  • packages/blocks/ticket-recent/src/frontend/TicketRecent.renderer.tsx (1 hunks)
  • packages/blocks/ticket-recent/src/frontend/TicketRecent.server.tsx (1 hunks)
  • packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx (1 hunks)
  • packages/blocks/ticket-summary/src/frontend/TicketSummary.renderer.tsx (1 hunks)
  • packages/blocks/ticket-summary/src/frontend/TicketSummary.server.tsx (1 hunks)
  • packages/blocks/user-account/src/frontend/UserAccount.client.tsx (1 hunks)
  • packages/blocks/user-account/src/frontend/UserAccount.renderer.tsx (1 hunks)
  • packages/blocks/user-account/src/frontend/UserAccount.server.tsx (1 hunks)
  • packages/modules/surveyjs/src/frontend/Components/Fieldset/Fieldset.tsx (1 hunks)
  • packages/modules/surveyjs/src/frontend/Questions/CustomSurveyQuestionText.tsx (1 hunks)
  • packages/modules/surveyjs/src/frontend/Survey.tsx (1 hunks)
⛔ Files not processed due to max files limit (33)
  • packages/ui/src/components/ActionList/ActionList.tsx
  • packages/ui/src/components/AppSpinner/AppSpinner.stories.tsx
  • packages/ui/src/components/AppSpinner/AppSpinner.tsx
  • packages/ui/src/components/Author/Author.tsx
  • packages/ui/src/components/Breadcrumbs/Breadcrumbs.tsx
  • packages/ui/src/components/Cards/BlogCard/BlogCard.tsx
  • packages/ui/src/components/Cards/FeatureCard/FeatureCard.tsx
  • packages/ui/src/components/Cards/InfoCard/InfoCard.tsx
  • packages/ui/src/components/Cards/InformativeCard/InformativeCard.tsx
  • packages/ui/src/components/Cards/PricingCard/PricingCard.tsx
  • packages/ui/src/components/Cards/ProductCard/ProductCard.tsx
  • packages/ui/src/components/Carousel/Carousel.tsx
  • packages/ui/src/components/Chart/ChartRoundedBar/ChartRoundedBar.tsx
  • packages/ui/src/components/Chart/ChartTooltip/ChartTooltip.tsx
  • packages/ui/src/components/Chart/DoubleLineChart/DoubleLineChart.tsx
  • packages/ui/src/components/Chart/StackedBarChart/StackedBarChart.tsx
  • packages/ui/src/components/Container/Container.tsx
  • packages/ui/src/components/ContentSection/ContentSection.tsx
  • packages/ui/src/components/DynamicIcon/DynamicIcon.tsx
  • packages/ui/src/components/ErrorPage/ErrorPage.tsx
  • packages/ui/src/components/Image/Image.tsx
  • packages/ui/src/components/LinkList/LinkList.tsx
  • packages/ui/src/components/Loading/Loading.tsx
  • packages/ui/src/components/NoResults/NoResults.tsx
  • packages/ui/src/components/Pagination/Pagination.stories.tsx
  • packages/ui/src/components/Pagination/Pagination.tsx
  • packages/ui/src/components/RichText/RichText.tsx
  • packages/ui/src/elements/link.tsx
  • packages/ui/turbo/generators/templates/component.hbs
  • packages/utils/frontend/src/models/link.ts
  • turbo/generators/templates/block/frontend/client.hbs
  • turbo/generators/templates/block/frontend/renderer.hbs
  • turbo/generators/templates/block/frontend/server.hbs
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-14T14:24:34.907Z
Learnt from: marcinkrasowski
Repo: o2sdev/openselfservice PR: 357
File: packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts:14-16
Timestamp: 2025-11-14T14:24:34.907Z
Learning: In the openselfservice repository, the pattern `Omit<PropsType, ''>` in TypeScript type definitions is intentionally used as a template for future prop omissions, even though it currently does nothing. This convention is preferred for consistency across blocks, making it easier to add omissions when needed later.

Applied to files:

  • packages/blocks/order-list/src/frontend/OrderList.client.tsx
📚 Learning: 2025-11-13T15:35:13.879Z
Learnt from: marcinkrasowski
Repo: o2sdev/openselfservice PR: 348
File: packages/blocks/notification-summary/src/api-harmonization/notification-summary.service.ts:23-27
Timestamp: 2025-11-13T15:35:13.879Z
Learning: In the notification-summary block service (packages/blocks/notification-summary/src/api-harmonization/notification-summary.service.ts), the hardcoded limit of 1000 notifications when calling notificationService.getNotificationList() is intentional, as there is no server-side aggregation API available for fetching notification counts by priority.

Applied to files:

  • packages/blocks/notification-list/src/frontend/NotificationList.server.tsx
🧬 Code graph analysis (33)
apps/frontend/src/containers/Auth/Toolbar/LocaleSwitcher.tsx (1)
apps/frontend/src/containers/Auth/Toolbar/Toolbar.types.ts (1)
  • ToolbarProps (1-6)
packages/blocks/faq/src/frontend/Faq.renderer.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
  • FaqRendererProps (16-18)
packages/blocks/notification-summary/src/frontend/NotificationSummary.server.tsx (2)
packages/blocks/notification-summary/src/frontend/index.ts (1)
  • NotificationSummary (2-2)
packages/blocks/notification-summary/src/frontend/NotificationSummary.types.ts (1)
  • NotificationSummaryProps (5-10)
apps/frontend/src/containers/Auth/SignInForm/SignInForm.tsx (1)
apps/frontend/src/containers/Auth/SignInForm/SignInForm.types.ts (1)
  • SignInFormProps (12-37)
apps/frontend/src/containers/Header/Header.tsx (2)
packages/integrations/strapi-cms/generated/strapi.ts (1)
  • Header (1921-1938)
apps/frontend/src/containers/Header/Header.types.ts (1)
  • HeaderProps (5-11)
apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.tsx (1)
apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.types.ts (1)
  • ContextSwitcherProps (3-5)
packages/blocks/category-list/src/frontend/CategoryList.renderer.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
  • CategoryListProps (5-12)
packages/blocks/faq/src/frontend/Faq.client.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
  • FaqPureProps (14-14)
apps/docs/src/components/Badge/index.tsx (1)
packages/framework/src/utils/models/badge.ts (1)
  • Badge (1-4)
packages/blocks/notification-summary/src/frontend/NotificationSummary.renderer.tsx (2)
packages/blocks/notification-summary/src/frontend/index.ts (1)
  • NotificationSummaryRenderer (3-3)
packages/blocks/notification-summary/src/frontend/NotificationSummary.types.ts (1)
  • NotificationSummaryRendererProps (14-16)
packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
  • ArticleListRendererProps (16-18)
packages/blocks/quick-links/src/frontend/QuickLinks.client.tsx (1)
packages/blocks/quick-links/src/frontend/QuickLinks.types.ts (1)
  • QuickLinksPureProps (14-14)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (2)
packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
  • Renderer (9-17)
  • Renderer (19-19)
packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (1)
  • Renderer (9-34)
packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (1)
  • Renderer (10-31)
packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (1)
  • Renderer (9-34)
packages/blocks/category-list/src/frontend/CategoryList.client.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
  • CategoryListPureProps (14-14)
apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.tsx (1)
apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.types.ts (1)
  • OneColumnTemplateProps (3-6)
packages/blocks/ticket-summary/src/frontend/TicketSummary.server.tsx (2)
packages/blocks/ticket-summary/src/frontend/index.ts (1)
  • TicketSummary (2-2)
packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts (1)
  • TicketSummaryProps (5-10)
packages/blocks/ticket-list/src/frontend/TicketList.server.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
  • TicketListProps (5-12)
apps/frontend/src/templates/PageTemplate/PageTemplate.tsx (1)
apps/frontend/src/templates/PageTemplate/PageTemplate.types.ts (1)
  • PageTemplateProps (3-6)
packages/blocks/quick-links/src/frontend/QuickLinks.renderer.tsx (1)
packages/blocks/quick-links/src/frontend/QuickLinks.types.ts (1)
  • QuickLinksRendererProps (16-18)
packages/blocks/ticket-list/src/frontend/TicketList.client.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
  • TicketListPureProps (14-14)
packages/blocks/article-list/src/frontend/ArticleList.server.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
  • ArticleListProps (5-12)
packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
  • TicketListRendererProps (16-18)
apps/docs/src/components/Accordion/index.tsx (1)
packages/ui/src/elements/accordion.tsx (2)
  • AccordionTrigger (59-59)
  • AccordionContent (59-59)
packages/blocks/category-list/src/frontend/CategoryList.server.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
  • CategoryListProps (5-12)
apps/docs/src/components/HomepageFeaturesSection/index.tsx (1)
packages/ui/src/components/Cards/PricingCard/PricingCard.types.ts (1)
  • FeatureItemProps (19-19)
packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
  • FaqRendererProps (16-18)
packages/blocks/order-details/src/frontend/OrderDetails.client.tsx (1)
packages/framework/src/modules/orders/orders.model.ts (2)
  • Orders (84-84)
  • OrderStatus (5-12)
packages/blocks/article-list/src/frontend/ArticleList.client.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
  • ArticleListPureProps (14-14)
packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (2)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (1)
  • Renderer (10-31)
packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
  • Renderer (9-17)
  • Renderer (19-19)
packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx (2)
packages/blocks/ticket-summary/src/frontend/index.ts (1)
  • TicketSummaryPure (1-1)
packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts (1)
  • TicketSummaryPureProps (12-12)
apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.tsx (1)
apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.types.ts (1)
  • TwoColumnTemplateProps (3-6)
packages/blocks/faq/src/frontend/Faq.server.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
  • FaqProps (5-12)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: deploy-preview

routing,
hasPriority,
}) => {
export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: FaqRendererProps) => {
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Wrong type annotation on component.

The NotificationDetailsRenderer component uses FaqRendererProps as its type, which is inconsistent with the component name and file location. This should use the correct NotificationDetails-related props type.

Apply this diff if the type should be renamed:

-export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: FaqRendererProps) => {
+export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: NotificationDetailsRendererProps) => {

Also update the import on line 8:

-import { FaqRendererProps } from './NotificationDetails.types';
+import { NotificationDetailsRendererProps } from './NotificationDetails.types';

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx
around line 10, the component is incorrectly typed as FaqRendererProps; change
the component props type to the appropriate NotificationDetails props type
(e.g., NotificationDetailsProps) and update the import on line 8 to import that
NotificationDetails props type instead of FaqRendererProps so the component
signature and import match the notification-details domain.

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