Skip to content

Conversation

@knutties
Copy link
Collaborator

@knutties knutties commented Jan 6, 2026

  • Renamed 121 component functions from snake_case to PascalCase
  • Improves consistency between function definitions and component usage in JSX
  • Makes component functions easier to search and identify
  • All component definitions now match their usage in view! macros
  • Build verified successfully with no errors

Examples of changes:

  • experiment_list -> ExperimentList
  • button -> Button
  • side_nav -> SideNav
  • experiment_form -> ExperimentForm

fixes #821

Summary by CodeRabbit

  • Refactor

    • Standardized component naming conventions across the frontend to improve code consistency and maintainability.
    • Enhanced several components with additional configuration options for improved flexibility.
  • Chores

    • Added automated validation to enforce component naming standards.
    • Updated build system to include new validation checks.

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

…scalCase

- Renamed 121 component functions from snake_case to PascalCase
- Improves consistency between function definitions and component usage in JSX
- Makes component functions easier to search and identify
- All component definitions now match their usage in view! macros
- Build verified successfully with no errors

Examples of changes:
- experiment_list -> ExperimentList
- button -> Button
- side_nav -> SideNav
- experiment_form -> ExperimentForm
@knutties knutties requested a review from a team as a code owner January 6, 2026 05:14
@semanticdiff-com
Copy link

semanticdiff-com bot commented Jan 6, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  crates/frontend/src/pages/experiment.rs  79% smaller
  crates/frontend/src/pages/experiment_list.rs  79% smaller
  crates/frontend/src/pages/variables_list.rs  77% smaller
  crates/frontend/src/pages/function/function_list.rs  74% smaller
  crates/frontend/src/components/experiment.rs  72% smaller
  crates/frontend/src/components/metrics_form.rs  71% smaller
  crates/frontend/src/pages/function/publish_form.rs  71% smaller
  crates/frontend/src/pages/compare_overrides.rs  71% smaller
  crates/frontend/src/pages/default_config.rs  70% smaller
  crates/frontend/src/components/change_form.rs  67% smaller
  crates/frontend/src/components/delete_modal.rs  67% smaller
  crates/frontend/src/components/monaco_editor.rs  67% smaller
  crates/frontend/src/pages/config_version.rs  67% smaller
  crates/frontend/src/providers/editor_provider.rs  67% smaller
  crates/frontend/src/components/condition_pills.rs  67% smaller
  crates/frontend/src/pages/experiment_groups.rs  66% smaller
  crates/frontend/src/pages/variable.rs  64% smaller
  crates/frontend/src/components/drawer.rs  63% smaller
  crates/frontend/src/pages/default_config_list/utils.rs  62% smaller
  crates/frontend/src/pages/type_templates.rs  62% smaller
  crates/frontend/src/components/function_form.rs  62% smaller
  crates/frontend/src/pages/webhook.rs  61% smaller
  crates/frontend/src/pages/dimension.rs  61% smaller
  crates/frontend/src/components/modal.rs  58% smaller
  crates/frontend/src/components/variant_form.rs  57% smaller
  crates/frontend/src/components/context_form.rs  57% smaller
  crates/frontend/src/components/experiment_ramp_form.rs  57% smaller
  crates/frontend/src/components/button.rs  56% smaller
  crates/frontend/src/pages/type_template.rs  55% smaller
  crates/frontend/src/pages/experiment_group_listing.rs  54% smaller
  crates/frontend/src/components/badge.rs  51% smaller
  crates/frontend/src/components/experiment_action_form.rs  51% smaller
  crates/frontend/src/hoc/layout.rs  49% smaller
  crates/frontend/src/pages/variables_list/filter.rs  48% smaller
  crates/frontend/src/components/context_card.rs  46% smaller
  crates/frontend/src/components/cohort_schema.rs  46% smaller
  crates/frontend/src/components/experiment_conclude_form.rs  46% smaller
  crates/frontend/src/pages/function/function_create.rs  44% smaller
  crates/frontend/src/pages/home.rs  43% smaller
  crates/frontend/src/components/description.rs  41% smaller
  crates/frontend/src/pages/config_version_list.rs  41% smaller
  crates/frontend/src/pages/default_config_list.rs  41% smaller
  crates/frontend/src/components/side_nav.rs  40% smaller
  crates/frontend/src/components/webhook_form.rs  36% smaller
  crates/frontend/src/components/change_summary.rs  33% smaller
  crates/frontend/src/pages/function.rs  31% smaller
  crates/frontend/src/components/datetime.rs  30% smaller
  crates/frontend/src/components/type_template_form.rs  29% smaller
  crates/frontend/src/components/info_modal.rs  26% smaller
  crates/frontend/src/components/default_config_form.rs  23% smaller
  crates/frontend/src/components/experiment_group_form.rs  19% smaller
  crates/frontend/src/components/input.rs  18% smaller
  crates/frontend/src/components/override_form.rs  15% smaller
  crates/frontend/src/pages/context_override.rs  10% smaller
  crates/frontend/src/app.rs  0% smaller
  crates/frontend/src/components/alert.rs  0% smaller
  crates/frontend/src/components/dimension_form.rs  0% smaller
  crates/frontend/src/components/dropdown.rs  0% smaller
  crates/frontend/src/components/experiment_form.rs  0% smaller
  crates/frontend/src/components/form/label.rs  0% smaller
  crates/frontend/src/components/menu.rs  0% smaller
  crates/frontend/src/components/pagination.rs  0% smaller
  crates/frontend/src/components/skeleton.rs  0% smaller
  crates/frontend/src/components/stat.rs  0% smaller
  crates/frontend/src/components/table.rs  0% smaller
  crates/frontend/src/components/tip.rs  0% smaller
  crates/frontend/src/components/toast.rs  0% smaller
  crates/frontend/src/components/tooltip.rs  0% smaller
  crates/frontend/src/components/variable_form.rs  0% smaller
  crates/frontend/src/components/workspace_form.rs  0% smaller
  crates/frontend/src/pages/audit_log/filter.rs  0% smaller
  crates/frontend/src/pages/context_override/filter.rs  0% smaller
  crates/frontend/src/pages/dimensions.rs  0% smaller
  crates/frontend/src/pages/not_found.rs  0% smaller
  crates/frontend/src/pages/organisations.rs  0% smaller
  crates/frontend/src/pages/webhooks.rs  0% smaller
  crates/frontend/src/pages/workspace.rs  0% smaller
  crates/frontend/src/providers/alert_provider.rs  0% smaller
  crates/frontend/src/providers/condition_collapse_provider.rs  0% smaller
  crates/frontend/src/providers/csr_provider.rs  0% smaller
  makefile Unsupported file format
  scripts/check_component_names.sh Unsupported file format

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Systematic refactoring of Leptos component function names across the frontend codebase from snake_case to PascalCase convention, affecting 60+ component, page, and provider files. Includes addition of a validation script to enforce the new naming standard and scattered functional enhancements (new props, callbacks, context provision) in several components.

Changes

Cohort / File(s) Summary
App & Core Layout
crates/frontend/src/app.rs, crates/frontend/src/hoc/layout.rs
Renamed appApp, common_layoutCommonLayout, layoutLayout, providersProviders. CommonLayout now renders toast UI; Layout provides additional workspace/org context.
UI Components: General
crates/frontend/src/components/alert.rs, crates/frontend/src/components/badge.rs, crates/frontend/src/components/button.rs, crates/frontend/src/components/delete_modal.rs, crates/frontend/src/components/info_modal.rs, crates/frontend/src/components/pagination.rs, crates/frontend/src/components/skeleton.rs, crates/frontend/src/components/stat.rs, crates/frontend/src/components/tip.rs, crates/frontend/src/components/toast.rs, crates/frontend/src/components/tooltip.rs
Renamed public functions to PascalCase: alertAlert, badge/gray_pill/list_pills/glassy_pillsBadge/GrayPill/ListPills/GlassyPills, button/button_anchorButton/ButtonAnchor, etc. No functional changes.
UI Components: Forms & Inputs
crates/frontend/src/components/form/label.rs, crates/frontend/src/components/input.rs, crates/frontend/src/components/datetime.rs, crates/frontend/src/components/monaco_editor.rs, crates/frontend/src/components/dropdown.rs, crates/frontend/src/components/menu.rs, crates/frontend/src/components/description.rs
Renamed form-related components: labelLabel, toggle/select/monaco_input/date_input/input/number_array_input/string_array_inputToggle/Select/MonacoInput/DateInput/Input/NumberArrayInput/StringArrayInput, datetime/datetime_str/datetime_conversion_scriptDatetime/DatetimeStr/DatetimeConversionScript, etc.
UI Components: Layout & Navigation
crates/frontend/src/components/drawer.rs, crates/frontend/src/components/modal.rs, crates/frontend/src/components/context_card.rs, crates/frontend/src/components/side_nav.rs
Renamed drawer/modal components: drawer_btn/drawer/portal_drawerDrawerBtn/Drawer/PortalDrawer, modal/portal_modalModal/PortalModal. DrawerBtn gains on_click default; Drawer and PortalDrawer gain handle_close callbacks. side_nav components (workspace_selector, nav_item, nav_component, side_nav) renamed to PascalCase.
UI Components: Conditional & Summary
crates/frontend/src/components/condition_pills.rs, crates/frontend/src/components/change_summary.rs
Renamed: condition_expression/conditionConditionExpression/Condition, change_summary/json_change_summary/change_log_popupChangeSummary/JsonChangeSummary/ChangeLogPopup.
Form Components with Props Expansion
crates/frontend/src/components/change_form.rs, crates/frontend/src/components/context_form.rs, crates/frontend/src/components/cohort_schema.rs, crates/frontend/src/components/default_config_form.rs, crates/frontend/src/components/dimension_form.rs, crates/frontend/src/components/experiment_form.rs, crates/frontend/src/components/type_template_form.rs, crates/frontend/src/components/variable_form.rs
Renamed form components to PascalCase (change_formChangeForm, context_formContextForm, etc.). default_config_form, dimension_form, type_template_form, and variable_form expand their signatures with new props (type_schema, validation, config_value, handle_submit). ChangeLogSummary variants across files gain on_close: Callback<()> and inprogress: Signal<bool>.
Complex Form & Data Components
crates/frontend/src/components/table.rs, crates/frontend/src/components/experiment_action_form.rs, crates/frontend/src/components/experiment_conclude_form.rs, crates/frontend/src/components/experiment_group_form.rs, crates/frontend/src/components/experiment_ramp_form.rs, crates/frontend/src/components/function_form.rs, crates/frontend/src/components/override_form.rs, crates/frontend/src/components/variant_form.rs, crates/frontend/src/components/webhook_form.rs
Renamed form/action components to PascalCase. Table gains new styling props (class, cell_class, head_class, body_class) and pagination support; ExpandableText gains class_name and is_expandable parameters.
Page Components
crates/frontend/src/pages/compare_overrides.rs, crates/frontend/src/pages/config_version.rs, crates/frontend/src/pages/config_version_list.rs, crates/frontend/src/pages/context_override.rs, crates/frontend/src/pages/default_config.rs, crates/frontend/src/pages/default_config_list.rs, crates/frontend/src/pages/dimension.rs, crates/frontend/src/pages/dimensions.rs, crates/frontend/src/pages/experiment.rs, crates/frontend/src/pages/experiment_group_listing.rs, crates/frontend/src/pages/experiment_groups.rs, crates/frontend/src/pages/experiment_list.rs, crates/frontend/src/pages/function.rs, crates/frontend/src/pages/home.rs, crates/frontend/src/pages/not_found.rs, crates/frontend/src/pages/organisations.rs, crates/frontend/src/pages/type_template.rs, crates/frontend/src/pages/type_templates.rs, crates/frontend/src/pages/variable.rs, crates/frontend/src/pages/variables_list.rs, crates/frontend/src/pages/webhook.rs, crates/frontend/src/pages/webhooks.rs, crates/frontend/src/pages/workspace.rs
Renamed all page components from snake_case to PascalCase (e.g., compare_overridesCompareOverrides, experiment_pageExperimentPage, config_version_listConfigVersionList, etc.). Internal logic unchanged.
Filter & Utility Pages
crates/frontend/src/pages/audit_log/filter.rs, crates/frontend/src/pages/context_override/filter.rs, crates/frontend/src/pages/default_config_list/utils.rs, crates/frontend/src/pages/variables_list/filter.rs, crates/frontend/src/pages/function/function_create.rs, crates/frontend/src/pages/function/function_list.rs, crates/frontend/src/pages/function/publish_form.rs
Renamed filter and utility components: filter_summaryFilterSummary, audit_log_filter_widgetAuditLogFilterWidget, context_filter_summary/context_filter_drawerContextFilterSummary/ContextFilterDrawer (latter gains filter_node_ref parameter), bread_crumsBreadCrums, variable_filter_widgetVariableFilterWidget.
Provider Components
crates/frontend/src/providers/alert_provider.rs, crates/frontend/src/providers/condition_collapse_provider.rs, crates/frontend/src/providers/csr_provider.rs, crates/frontend/src/providers/editor_provider.rs
Renamed provider components to PascalCase: alert_providerAlertProvider, condition_collapse_providerConditionCollapseProvider, client_side_ready_providerClientSideReadyProvider, editor_providerEditorProvider.
Build & Validation
makefile, scripts/check_component_names.sh
Updated Makefile: consolidated PHONY targets, added check-component-names target. New Bash script check_component_names.sh validates PascalCase naming for Leptos component functions, scanning for snake_case violations in pub fn annotations and reporting violations with line numbers and suggested fixes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~45 minutes

The refactoring is predominantly systematic rename operations with a highly repetitive pattern, lowering per-file complexity. However, the sheer scope (60+ files) and scattered functional enhancements in key components (drawer.rs, table.rs, layout.rs, form components with expanded props) require careful verification that all call sites are correctly updated and new props are properly integrated. The validation script is straightforward.

Possibly related PRs

  • feat(UI): use browser locale time #815: Modifies crates/frontend/src/app.rs alongside this PR (main PR renames the app component to App while PR #815 adds DatetimeConversionScript rendering within the same file), indicating concurrent frontend structural updates.

Poem

🐰 Components once in snake now dance in Pascal grace,
Consistency reformed throughout this frontend space,
With props expanded wide and checks to validate,
The rabbit hops through 60 files—refactored, first-rate!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: converting Leptos component function names from snake_case to PascalCase across the frontend crate.
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #821 by converting 121 Leptos component functions to PascalCase and adding a linter script to enforce this convention.
Out of Scope Changes check ✅ Passed Changes are focused on component naming refactoring. Minor additions include Makefile consolidation and a new linter script, both supporting the primary objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

@ayushjain17
Copy link
Collaborator

ayushjain17 commented Jan 6, 2026

Should we consider adding some lint check to force PascalCase for functions with component macro?

@knutties knutties requested a review from ayushjain17 January 6, 2026 05:18
- Created scripts/check_component_names.sh to enforce PascalCase naming
- Integrated linter into `make check` target
- Automatically runs in CI via existing check workflow
- Prevents regression to snake_case component names

The linter scans all Leptos component functions and ensures they use
PascalCase naming convention for consistency with JSX usage.

Also fixed makefile syntax issues:
- Corrected .PHONY declaration format
- Fixed tab/space inconsistency in ifeq block
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (4)
crates/frontend/src/pages/type_template.rs (1)

25-25: Complete the refactoring: Rename private component to PascalCase.

The private component function type_info should be renamed to TypeInfo to maintain consistency with the PR's objective of converting all Leptos component function names to PascalCase. While Line 149 uses <TypeInfo /> in the view macro (which works due to Leptos's macro transformation), the PR aims to align function definitions with their usage for better searchability and consistency.

🔎 Proposed fix
 #[component]
-fn type_info(type_template: TypeTemplate) -> impl IntoView {
+fn TypeInfo(type_template: TypeTemplate) -> impl IntoView {
     view! {
         <div class="card bg-base-100 max-w-screen shadow">
crates/frontend/src/pages/organisations.rs (1)

68-68: Fix typo in heading text.

The heading text contains a typo: "Oraganisations" should be "Organisations".

🔎 Proposed fix
-                        <Stat
-                            heading="Oraganisations"
-                            icon="ri-building-fill"
-                            number=organisations.len().to_string()
-                        />
+                        <Stat
+                            heading="Organisations"
+                            icon="ri-building-fill"
+                            number=organisations.len().to_string()
+                        />
crates/frontend/src/components/webhook_form.rs (1)

266-266: Fix typo in label text.

Line 266 contains a typo: "Paylaod Version" should be "Payload Version".

🔎 Proposed fix
-                <Label title="Paylaod Version" />
+                <Label title="Payload Version" />
crates/frontend/src/components/experiment_form.rs (1)

379-385: Inconsistent naming: change_log_summary should be ChangeLogSummary.

This internal component function is still using snake_case, which contradicts the PR objective of converting all Leptos component function names to PascalCase. While Leptos's #[component] macro does auto-convert the usage, the function definition itself should be renamed for consistency with the rest of the refactor.

🔎 Proposed fix
 #[component]
-fn change_log_summary(
+fn ChangeLogSummary(
     experiment_id: String,
     update_request: OverrideKeysUpdateRequest,
     #[prop(into)] on_confirm: Callback<()>,
     #[prop(into)] on_close: Callback<()>,
 ) -> impl IntoView {
🧹 Nitpick comments (7)
scripts/check_component_names.sh (1)

30-30: Use portable sed flag for broader compatibility.

The -r flag is GNU sed-specific. On BSD/macOS systems, you should use -E instead for extended regex. Consider using a portable approach.

🔎 Proposed fix for portability
-                pascal_name=$(echo "$func_name" | sed -r 's/(^|_)([a-z])/\U\2/g')
+                pascal_name=$(echo "$func_name" | sed -E 's/(^|_)([a-z])/\U\2/g')

Note: Both -r (GNU) and -E (BSD/GNU) enable extended regex, but -E is more portable as it's supported by both GNU sed and BSD sed (macOS).

crates/frontend/src/pages/webhook.rs (1)

26-26: Consider renaming private component for consistency.

The private component function webhook_info at Line 26 wasn't renamed to PascalCase, though it's used as <WebhookInfo /> at Line 200. While private components may have been intentionally excluded from this refactor, renaming it to WebhookInfo would ensure all component definitions match their JSX usage, as stated in the PR objectives.

🔎 Proposed refactor
 #[component]
-fn webhook_info(webhook: Webhook) -> impl IntoView {
+fn WebhookInfo(webhook: Webhook) -> impl IntoView {
crates/frontend/src/components/info_modal.rs (1)

4-4: Consider renaming private component for consistency.

Similar to other private components in the codebase, info_section is used as <InfoSection /> (line 52), creating a definition/usage mismatch. Renaming to InfoSection would provide complete consistency with the PR's stated goal of matching component definitions to their usage in view macros.

🔎 Proposed refactor
 #[component]
-fn info_section(
+fn InfoSection(
     title: &'static str,
     icon: &'static str,
     content: String,
 ) -> impl IntoView {
crates/frontend/src/pages/experiment_groups.rs (1)

130-130: Rename private component to match linter's scope expectations (optional).

The private component experiment_group_info is used as <ExperimentGroupInfo /> (line 270), but the added linter script (scripts/check_component_names.sh) only enforces PascalCase naming for public components (those with pub fn). Since this is a private component, it is not caught by the linter. Renaming to ExperimentGroupInfo would improve consistency with the usage pattern, though it remains optional.

crates/frontend/src/pages/variable.rs (1)

20-20: Consider renaming private component to PascalCase for consistency.

While the public Variable component was correctly renamed to PascalCase, the private variable_info component remains in snake_case. For consistency within the file and alignment with the Leptos component convention, consider renaming it to VariableInfo.

crates/frontend/src/components/experiment.rs (1)

29-29: Consider renaming private components for consistency.

While Leptos automatically converts snake_case component names to PascalCase in view! macros, renaming these private components (experiment_info, create_actions, inprogress_actions, conclude_actions, discard_actions, pause_actions) to PascalCase would improve consistency with the refactoring goal and make the component definitions match their usage patterns.

Also applies to: 148-148, 181-181, 222-222, 237-237, 242-242

crates/frontend/src/components/context_card.rs (1)

20-44: Rename private components to PascalCase for consistency with JSX usage.

The option and context_options functions are private components but are used in the view as <Option> and <ContextOptions>. While the linter script only enforces PascalCase on public components, these private components should still follow PascalCase naming for consistency with how they appear in JSX templates. Rename them to Option and ContextOptions respectively.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 450b010 and 852edac.

📒 Files selected for processing (82)
  • crates/frontend/src/app.rs
  • crates/frontend/src/components/alert.rs
  • crates/frontend/src/components/badge.rs
  • crates/frontend/src/components/button.rs
  • crates/frontend/src/components/change_form.rs
  • crates/frontend/src/components/change_summary.rs
  • crates/frontend/src/components/cohort_schema.rs
  • crates/frontend/src/components/condition_pills.rs
  • crates/frontend/src/components/context_card.rs
  • crates/frontend/src/components/context_form.rs
  • crates/frontend/src/components/datetime.rs
  • crates/frontend/src/components/default_config_form.rs
  • crates/frontend/src/components/delete_modal.rs
  • crates/frontend/src/components/description.rs
  • crates/frontend/src/components/dimension_form.rs
  • crates/frontend/src/components/drawer.rs
  • crates/frontend/src/components/dropdown.rs
  • crates/frontend/src/components/experiment.rs
  • crates/frontend/src/components/experiment_action_form.rs
  • crates/frontend/src/components/experiment_conclude_form.rs
  • crates/frontend/src/components/experiment_form.rs
  • crates/frontend/src/components/experiment_group_form.rs
  • crates/frontend/src/components/experiment_ramp_form.rs
  • crates/frontend/src/components/form/label.rs
  • crates/frontend/src/components/function_form.rs
  • crates/frontend/src/components/info_modal.rs
  • crates/frontend/src/components/input.rs
  • crates/frontend/src/components/menu.rs
  • crates/frontend/src/components/metrics_form.rs
  • crates/frontend/src/components/modal.rs
  • crates/frontend/src/components/monaco_editor.rs
  • crates/frontend/src/components/override_form.rs
  • crates/frontend/src/components/pagination.rs
  • crates/frontend/src/components/side_nav.rs
  • crates/frontend/src/components/skeleton.rs
  • crates/frontend/src/components/stat.rs
  • crates/frontend/src/components/table.rs
  • crates/frontend/src/components/tip.rs
  • crates/frontend/src/components/toast.rs
  • crates/frontend/src/components/tooltip.rs
  • crates/frontend/src/components/type_template_form.rs
  • crates/frontend/src/components/variable_form.rs
  • crates/frontend/src/components/variant_form.rs
  • crates/frontend/src/components/webhook_form.rs
  • crates/frontend/src/components/workspace_form.rs
  • crates/frontend/src/hoc/layout.rs
  • crates/frontend/src/pages/audit_log/filter.rs
  • crates/frontend/src/pages/compare_overrides.rs
  • crates/frontend/src/pages/config_version.rs
  • crates/frontend/src/pages/config_version_list.rs
  • crates/frontend/src/pages/context_override.rs
  • crates/frontend/src/pages/context_override/filter.rs
  • crates/frontend/src/pages/default_config.rs
  • crates/frontend/src/pages/default_config_list.rs
  • crates/frontend/src/pages/default_config_list/utils.rs
  • crates/frontend/src/pages/dimension.rs
  • crates/frontend/src/pages/dimensions.rs
  • crates/frontend/src/pages/experiment.rs
  • crates/frontend/src/pages/experiment_group_listing.rs
  • crates/frontend/src/pages/experiment_groups.rs
  • crates/frontend/src/pages/experiment_list.rs
  • crates/frontend/src/pages/function.rs
  • crates/frontend/src/pages/function/function_create.rs
  • crates/frontend/src/pages/function/function_list.rs
  • crates/frontend/src/pages/function/publish_form.rs
  • crates/frontend/src/pages/home.rs
  • crates/frontend/src/pages/not_found.rs
  • crates/frontend/src/pages/organisations.rs
  • crates/frontend/src/pages/type_template.rs
  • crates/frontend/src/pages/type_templates.rs
  • crates/frontend/src/pages/variable.rs
  • crates/frontend/src/pages/variables_list.rs
  • crates/frontend/src/pages/variables_list/filter.rs
  • crates/frontend/src/pages/webhook.rs
  • crates/frontend/src/pages/webhooks.rs
  • crates/frontend/src/pages/workspace.rs
  • crates/frontend/src/providers/alert_provider.rs
  • crates/frontend/src/providers/condition_collapse_provider.rs
  • crates/frontend/src/providers/csr_provider.rs
  • crates/frontend/src/providers/editor_provider.rs
  • makefile
  • scripts/check_component_names.sh
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2026-01-03T13:25:35.248Z
Learnt from: ayushjain17
Repo: juspay/superposition PR: 816
File: crates/frontend/src/pages/webhook.rs:136-137
Timestamp: 2026-01-03T13:25:35.248Z
Learning: In crates/frontend/src/pages/webhook.rs, Workspace and OrganisationId are newtypes that implement Deref to &str, enabling implicit coercion of &Workspace and &OrganisationId to &str when passed to functions expecting &str. Reviewers should verify this coercion behavior is intentional and documented, and avoid unnecessary manual .0 dereferencing in this file. If similar newtypes exist elsewhere, consider consistent Deref implementations and explicitness of API boundaries.

Applied to files:

  • crates/frontend/src/pages/webhook.rs
📚 Learning: 2026-01-05T12:37:05.828Z
Learnt from: ayushjain17
Repo: juspay/superposition PR: 815
File: crates/frontend/src/components/datetime.rs:70-95
Timestamp: 2026-01-05T12:37:05.828Z
Learning: Documentation should reflect build-target dependent behavior. For functions that differ between wasm32 and non-wasm32 (e.g., datetime parsing/normalization), explicitly document the intent and the platform-specific logic in the code and/or a nearby comment. Prefer using cfg attributes to clearly separate implementations for wasm32 vs non-wasm32 and add tests that cover both builds. In this case, the function should be noted as: wasm32 -> local midnight interpreted then converted to UTC; non-wasm32 (SSR) -> UTC midnight directly. Ensure any related behavior is consistent with the SSR/CSR architecture and that downstream code relies on the clarified semantics.

Applied to files:

  • crates/frontend/src/components/experiment_form.rs
  • crates/frontend/src/components/workspace_form.rs
  • crates/frontend/src/components/alert.rs
  • crates/frontend/src/components/experiment_conclude_form.rs
  • crates/frontend/src/components/skeleton.rs
  • crates/frontend/src/components/tip.rs
  • crates/frontend/src/components/experiment_ramp_form.rs
  • crates/frontend/src/components/dropdown.rs
  • crates/frontend/src/components/input.rs
  • crates/frontend/src/components/pagination.rs
  • crates/frontend/src/components/menu.rs
  • crates/frontend/src/components/delete_modal.rs
  • crates/frontend/src/components/tooltip.rs
  • crates/frontend/src/components/context_form.rs
  • crates/frontend/src/components/experiment_action_form.rs
  • crates/frontend/src/components/button.rs
  • crates/frontend/src/components/variant_form.rs
  • crates/frontend/src/components/experiment.rs
  • crates/frontend/src/components/override_form.rs
  • crates/frontend/src/components/datetime.rs
  • crates/frontend/src/components/description.rs
  • crates/frontend/src/components/context_card.rs
  • crates/frontend/src/components/metrics_form.rs
  • crates/frontend/src/components/dimension_form.rs
  • crates/frontend/src/components/change_form.rs
  • crates/frontend/src/components/function_form.rs
  • crates/frontend/src/components/side_nav.rs
  • crates/frontend/src/components/change_summary.rs
  • crates/frontend/src/components/toast.rs
  • crates/frontend/src/components/modal.rs
  • crates/frontend/src/components/experiment_group_form.rs
  • crates/frontend/src/components/monaco_editor.rs
  • crates/frontend/src/components/drawer.rs
  • crates/frontend/src/components/form/label.rs
  • crates/frontend/src/components/type_template_form.rs
  • crates/frontend/src/components/stat.rs
  • crates/frontend/src/components/webhook_form.rs
  • crates/frontend/src/components/variable_form.rs
  • crates/frontend/src/components/info_modal.rs
  • crates/frontend/src/components/condition_pills.rs
  • crates/frontend/src/components/badge.rs
  • crates/frontend/src/components/default_config_form.rs
  • crates/frontend/src/components/cohort_schema.rs
  • crates/frontend/src/components/table.rs
📚 Learning: 2026-01-03T13:27:14.072Z
Learnt from: ayushjain17
Repo: juspay/superposition PR: 816
File: crates/frontend/src/pages/type_template.rs:82-87
Timestamp: 2026-01-03T13:27:14.072Z
Learning: In the frontend crate, both `Workspace` and `OrganisationId` types implement `Deref` trait (via `#[derive(Deref)]`), allowing automatic coercion from `&Workspace` to `&str` and `&OrganisationId` to `&str`. When passing these types to functions expecting `&str`, use `&workspace` or `&org` directly instead of `&workspace.0` or `&org.0`.

Applied to files:

  • crates/frontend/src/pages/organisations.rs
  • crates/frontend/src/components/workspace_form.rs
  • crates/frontend/src/pages/config_version.rs
  • crates/frontend/src/pages/dimensions.rs
  • crates/frontend/src/pages/home.rs
  • crates/frontend/src/pages/type_templates.rs
  • crates/frontend/src/pages/workspace.rs
  • crates/frontend/src/pages/type_template.rs
  • crates/frontend/src/pages/variable.rs
📚 Learning: 2026-01-03T13:25:40.584Z
Learnt from: ayushjain17
Repo: juspay/superposition PR: 816
File: crates/frontend/src/pages/webhook.rs:136-137
Timestamp: 2026-01-03T13:25:40.584Z
Learning: In the superposition codebase (Rust frontend), the `Workspace` and `OrganisationId` newtype wrappers implement `Deref`, which allows `&Workspace` and `&OrganisationId` to be automatically coerced to `&str` when passed to functions expecting `&str` parameters. Manual `.0` dereferencing is not needed.

Applied to files:

  • crates/frontend/src/components/workspace_form.rs
  • crates/frontend/src/pages/config_version.rs
  • crates/frontend/src/pages/home.rs
  • crates/frontend/src/pages/workspace.rs
  • crates/frontend/src/pages/variable.rs
🧬 Code graph analysis (8)
crates/frontend/src/components/dimension_form.rs (5)
crates/frontend/src/components/default_config_form.rs (1)
  • ChangeLogSummary (536-700)
crates/frontend/src/components/experiment_group_form.rs (1)
  • ChangeLogSummary (433-568)
crates/frontend/src/components/type_template_form.rs (1)
  • ChangeLogSummary (215-325)
crates/frontend/src/components/variable_form.rs (1)
  • ChangeLogSummary (212-316)
crates/frontend/src/components/webhook_form.rs (1)
  • ChangeLogSummary (365-529)
crates/frontend/src/components/toast.rs (1)
crates/frontend/src/components/alert.rs (1)
  • Alert (60-70)
crates/frontend/src/pages/audit_log/filter.rs (1)
crates/frontend/src/pages/variables_list/filter.rs (1)
  • FilterSummary (17-156)
crates/frontend/src/components/experiment_group_form.rs (5)
crates/frontend/src/components/default_config_form.rs (1)
  • ChangeLogSummary (536-700)
crates/frontend/src/components/dimension_form.rs (1)
  • ChangeLogSummary (614-767)
crates/frontend/src/components/type_template_form.rs (1)
  • ChangeLogSummary (215-325)
crates/frontend/src/components/variable_form.rs (1)
  • ChangeLogSummary (212-316)
crates/frontend/src/components/webhook_form.rs (1)
  • ChangeLogSummary (365-529)
crates/frontend/src/pages/variables_list/filter.rs (1)
crates/frontend/src/pages/audit_log/filter.rs (1)
  • FilterSummary (20-169)
crates/frontend/src/components/webhook_form.rs (5)
crates/frontend/src/components/default_config_form.rs (1)
  • ChangeLogSummary (536-700)
crates/frontend/src/components/dimension_form.rs (1)
  • ChangeLogSummary (614-767)
crates/frontend/src/components/experiment_group_form.rs (1)
  • ChangeLogSummary (433-568)
crates/frontend/src/components/type_template_form.rs (1)
  • ChangeLogSummary (215-325)
crates/frontend/src/components/variable_form.rs (1)
  • ChangeLogSummary (212-316)
crates/frontend/src/components/variable_form.rs (5)
crates/frontend/src/components/default_config_form.rs (1)
  • ChangeLogSummary (536-700)
crates/frontend/src/components/dimension_form.rs (1)
  • ChangeLogSummary (614-767)
crates/frontend/src/components/experiment_group_form.rs (1)
  • ChangeLogSummary (433-568)
crates/frontend/src/components/type_template_form.rs (1)
  • ChangeLogSummary (215-325)
crates/frontend/src/components/webhook_form.rs (1)
  • ChangeLogSummary (365-529)
crates/frontend/src/components/default_config_form.rs (5)
crates/frontend/src/components/dimension_form.rs (1)
  • ChangeLogSummary (614-767)
crates/frontend/src/components/experiment_group_form.rs (1)
  • ChangeLogSummary (433-568)
crates/frontend/src/components/type_template_form.rs (1)
  • ChangeLogSummary (215-325)
crates/frontend/src/components/variable_form.rs (1)
  • ChangeLogSummary (212-316)
crates/frontend/src/components/webhook_form.rs (1)
  • ChangeLogSummary (365-529)
🪛 checkmake (0.2.2)
makefile

[warning] 52-52: Missing required phony target "all"

(minphony)


[warning] 52-52: Missing required phony target "clean"

(minphony)


[warning] 52-52: Missing required phony target "test"

(minphony)


[warning] 298-298: Target "check" should be declared PHONY.

(phonydeclared)

⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Testing
🔇 Additional comments (107)
crates/frontend/src/pages/function/function_list.rs (1)

28-28: LGTM! Component rename aligns with PascalCase convention.

The rename from function_list to FunctionList successfully aligns the component definition with JSX usage conventions and improves searchability.

crates/frontend/src/pages/default_config_list/utils.rs (1)

11-11: LGTM! Component rename follows PascalCase convention.

The rename from bread_crums to BreadCrums is consistent with the PR's standardization effort and matches the BreadCrums type being used.

crates/frontend/src/pages/function/function_create.rs (1)

17-17: LGTM! Component rename aligns with PascalCase standard.

The rename from create_function_view to CreateFunctionView is consistent with the broader refactoring effort and improves component naming consistency.

crates/frontend/src/pages/context_override/filter.rs (3)

33-33: LGTM! Component rename follows PascalCase convention.

The rename from context_filter_summary to ContextFilterSummary aligns with the PR's standardization effort.


234-234: LGTM! Component rename follows PascalCase convention.

The rename from context_filter_drawer to ContextFilterDrawer is consistent with the broader refactoring effort.


37-37: Parameter addition verified at all call sites.

The filter_node_ref: NodeRef<html::Div> parameter is properly passed at the only call site of ContextFilterSummary in crates/frontend/src/pages/context_override.rs (line 649).

crates/frontend/src/components/side_nav.rs (1)

89-89: LGTM! PascalCase component naming is consistent.

All four public component functions are correctly renamed from snake_case to PascalCase (WorkspaceSelector, NavItem, NavComponent, SideNav), matching their usage in view macros and improving consistency across the codebase.

Also applies to: 216-216, 252-252, 314-314

crates/frontend/src/pages/audit_log/filter.rs (1)

20-20: LGTM! Component naming is consistent with codebase patterns.

Both components (FilterSummary, AuditLogFilterWidget) are correctly renamed to PascalCase, maintaining consistency with similar components elsewhere (e.g., FilterSummary in variables_list/filter.rs).

Also applies to: 172-172

crates/frontend/src/pages/workspace.rs (1)

29-29: LGTM! Clean component rename.

The public component function is correctly renamed from workspace to Workspace, aligning with PascalCase conventions.

crates/frontend/src/pages/webhook.rs (1)

114-114: LGTM! Public component renamed correctly.

The public component function Webhook is correctly renamed from webhook to PascalCase, consistent with the PR's refactoring goals.

crates/frontend/src/pages/dimensions.rs (1)

26-26: LGTM! Component renamed correctly.

The public component function Dimensions is correctly renamed from dimensions to PascalCase, maintaining consistency with the refactoring pattern across the codebase.

crates/frontend/src/pages/config_version_list.rs (1)

24-24: LGTM! Function rename aligns with PascalCase convention.

The rename from config_version_list to ConfigVersionList is correct and consistent with the PR's objective to standardize component naming.

crates/frontend/src/components/toast.rs (1)

6-6: LGTM! Clean rename to PascalCase.

The rename from toast to Toast correctly implements the PR's naming standardization objective.

crates/frontend/src/components/tip.rs (1)

4-4: LGTM! Function name correctly updated.

The rename from tip to Tip aligns with the PascalCase naming standard established in this PR.

crates/frontend/src/pages/variables_list.rs (1)

155-155: LGTM! Rename implements the standardization objective.

The rename from variables_list to VariablesList is correct and aligns with the PR-wide PascalCase convention.

crates/frontend/src/pages/type_template.rs (1)

60-60: LGTM! Public component renamed correctly.

The rename from type_page to TypePage is correct and aligns with the PR's PascalCase naming convention.

crates/frontend/src/components/delete_modal.rs (1)

6-6: LGTM: Component rename aligns with PascalCase convention.

The function rename from delete_modal to DeleteModal is consistent with the PR's objective to standardize Leptos component naming.

crates/frontend/src/pages/webhooks.rs (1)

39-39: LGTM: Component rename aligns with PascalCase convention.

The function rename from webhooks to Webhooks is consistent with the PR's objective to standardize Leptos component naming.

crates/frontend/src/pages/experiment_list.rs (1)

49-49: LGTM: Component rename aligns with PascalCase convention.

The function rename from experiment_list to ExperimentList is consistent with the PR's objective to standardize Leptos component naming.

crates/frontend/src/pages/function.rs (1)

91-91: LGTM: Component rename aligns with PascalCase convention.

The function rename from function_page to FunctionPage is consistent with the PR's objective to standardize Leptos component naming.

crates/frontend/src/components/cohort_schema.rs (1)

71-71: LGTM: Component rename aligns with PascalCase convention.

The function rename from cohort_schema to CohortSchema at line 71 is consistent with the PR's objective to standardize Leptos component naming. All call sites in dimension.rs and dimension_form.rs have been updated to use the new PascalCase name, and no missed snake_case component usages were detected.

crates/frontend/src/pages/experiment_groups.rs (1)

157-157: LGTM! Public component renamed to PascalCase.

The rename from experiment_groups to ExperimentGroups successfully aligns the function definition with its usage in view macros, improving consistency and searchability.

crates/frontend/src/pages/config_version.rs (1)

13-13: LGTM! Clean PascalCase conversion.

The rename from config_version to ConfigVersion properly aligns the component definition with its usage convention.

crates/frontend/src/pages/experiment.rs (1)

50-50: LGTM! Component renamed correctly.

The rename from experiment_page to ExperimentPage maintains consistency with the PascalCase convention for component functions.

crates/frontend/src/components/experiment_conclude_form.rs (1)

17-17: LGTM! Function naming updated correctly.

The rename from experiment_conclude_form to ExperimentConcludeForm properly follows the PascalCase convention for component functions.

crates/frontend/src/components/info_modal.rs (1)

23-23: LGTM! Public component properly renamed.

The rename from info_modal to InfoModal correctly implements the PascalCase naming convention.

crates/frontend/src/components/pagination.rs (1)

11-11: LGTM! Component rename follows Leptos conventions.

The rename from pagination to Pagination aligns with PascalCase naming for Leptos components, improving consistency with JSX usage patterns.

crates/frontend/src/components/change_form.rs (1)

6-6: LGTM! Component rename aligns with naming standards.

The rename from change_form to ChangeForm is consistent with the broader refactoring effort and Leptos best practices.

crates/frontend/src/components/override_form.rs (1)

119-119: LGTM! Public component renamed to PascalCase.

The rename from override_form to OverrideForm is appropriate for the public API. Note that private helper components (type_badge, override_input) correctly remain in snake_case, as this refactoring focuses on public component APIs.

crates/frontend/src/pages/default_config.rs (1)

125-125: LGTM! Page component rename follows conventions.

The rename from default_config to DefaultConfig is consistent with the PascalCase convention for public page components. Private helper config_info appropriately remains in snake_case.

makefile (2)

52-52: Good: Consolidated PHONY declarations.

Consolidating all PHONY targets into a single declaration improves maintainability and reduces duplication.


298-301: LGTM! Linter integration enforces PascalCase convention.

The new check-component-names target properly integrates the validation script into the build workflow. The script correctly identifies Leptos components with snake_case naming violations and suggests the appropriate PascalCase alternative, helping prevent future violations of the naming convention.

crates/frontend/src/components/workspace_form.rs (1)

23-23: LGTM! Component rename follows PascalCase convention.

The function rename from workspace_form to WorkspaceForm aligns with the PR's objective to standardize Leptos component naming. The signature and implementation remain unchanged.

crates/frontend/src/pages/organisations.rs (1)

17-17: LGTM! Component rename follows PascalCase convention.

The function rename from organisations to Organisations correctly implements the PR's naming standardization objective.

crates/frontend/src/components/stat.rs (1)

4-4: LGTM! Component rename follows PascalCase convention.

The function rename from stat to Stat correctly standardizes the component naming with PascalCase.

crates/frontend/src/pages/context_override.rs (1)

383-383: LGTM! Public component rename follows PascalCase convention.

The rename of the public component from context_override to ContextOverride aligns with the PR's standardization objective. Note that private component functions (such as form, autofill_form, autofill_experiment_form, and change_log_summary) appropriately remain in snake_case.

crates/frontend/src/pages/default_config_list.rs (1)

44-44: LGTM! Component rename follows PascalCase convention.

The function rename from default_config_list to DefaultConfigList successfully implements the PascalCase naming standard for Leptos components.

crates/frontend/src/components/skeleton.rs (1)

12-15: LGTM! Component renamed to PascalCase.

The rename from skeleton to Skeleton aligns with the PR's objective of standardizing Leptos component names to PascalCase, improving consistency with JSX usage conventions.

crates/frontend/src/pages/compare_overrides.rs (1)

107-107: LGTM! Component renamed to PascalCase.

The rename from compare_overrides to CompareOverrides follows the established PascalCase convention for Leptos components.

crates/frontend/src/pages/type_templates.rs (1)

32-32: LGTM! Component renamed to PascalCase.

The rename from types_page to TypesPage is consistent with the PR's standardization effort.

crates/frontend/src/pages/variable.rs (1)

46-46: LGTM! Component renamed to PascalCase.

The rename from variable to Variable follows the established convention.

crates/frontend/src/components/metrics_form.rs (1)

14-17: LGTM! Component renamed to PascalCase.

The rename from metrics_form to MetricsForm is consistent with the PR's standardization of Leptos component naming conventions.

crates/frontend/src/components/function_form.rs (2)

152-152: LGTM! Public component renamed to PascalCase.

The rename from function_editor to FunctionEditor aligns with the PR's objective to standardize Leptos component naming conventions and improve consistency with usage in view! macros.


460-460: LGTM! Public component renamed to PascalCase.

The rename from test_form to TestForm is consistent with the broader refactoring effort and improves component discoverability.

crates/frontend/src/providers/condition_collapse_provider.rs (1)

6-6: LGTM! Provider component renamed to PascalCase.

The rename from condition_collapse_provider to ConditionCollapseProvider is consistent with the project-wide naming standardization effort.

crates/frontend/src/pages/experiment_group_listing.rs (1)

234-234: LGTM! Page component renamed to PascalCase.

The rename from experiment_group_listing to ExperimentGroupListing follows the established pattern and improves consistency across the page components.

crates/frontend/src/components/experiment.rs (1)

292-292: LGTM! Public component renamed to PascalCase.

The rename from experiment to Experiment aligns with the project-wide refactoring effort and improves naming consistency.

crates/frontend/src/pages/function/publish_form.rs (1)

12-12: LGTM! Form component renamed to PascalCase.

The rename from publish_form to PublishForm is consistent with the standardization effort and improves clarity.

crates/frontend/src/components/dropdown.rs (1)

26-42: LGTM! Component rename aligns with Leptos conventions.

The rename from dropdown to Dropdown follows the standard PascalCase convention for Leptos components, improving consistency between the function definition and its usage in view! macros. The function signature, generic bounds, and all internal logic remain unchanged.

crates/frontend/src/providers/csr_provider.rs (1)

8-14: LGTM! Correct distinction between component and hook naming.

The rename from client_side_ready_provider to ClientSideReadyProvider is appropriate for the component function. Notably, use_client_side_ready() on line 16 correctly remains in snake_case since it's a hook function, not a component—this distinction aligns with Leptos conventions.

crates/frontend/src/components/monaco_editor.rs (1)

76-85: LGTM! Component rename follows conventions.

The rename from monaco_editor to MonacoEditor aligns with PascalCase conventions for Leptos components. The function signature and all props remain unchanged, preserving the component's behavior.

crates/frontend/src/components/condition_pills.rs (2)

32-37: LGTM! Consistent component naming.

The rename from condition_expression to ConditionExpression aligns with PascalCase conventions. This consistency is demonstrated at line 151 where the component is used as <ConditionExpression>, matching its PascalCase definition.


125-131: LGTM! Component rename follows conventions.

The rename from condition to Condition follows the standard PascalCase convention for Leptos components, improving searchability and consistency with JSX-style usage.

crates/frontend/src/pages/not_found.rs (1)

4-19: LGTM! Page component rename follows conventions.

The rename from not_found to NotFound aligns with PascalCase conventions for Leptos components. The function behavior and the 404 rendering logic remain unchanged.

crates/frontend/src/pages/variables_list/filter.rs (1)

17-17: LGTM! Component naming aligns with Leptos conventions.

The renaming of filter_summaryFilterSummary and variable_filter_widgetVariableFilterWidget follows the standard PascalCase convention for Leptos components, improving consistency with component usage in view! macros.

Also applies to: 159-159

crates/frontend/src/components/button.rs (1)

13-13: LGTM! Component naming follows conventions.

The renaming of buttonButton and button_anchorButtonAnchor adheres to the PascalCase convention for Leptos components.

Also applies to: 64-64

crates/frontend/src/components/form/label.rs (1)

32-32: LGTM! Component naming follows conventions.

The renaming of labelLabel adheres to the PascalCase convention for Leptos components.

crates/frontend/src/components/webhook_form.rs (1)

62-62: LGTM! Component naming follows conventions.

The renaming of webhook_formWebhookForm and change_log_summaryChangeLogSummary adheres to the PascalCase convention for Leptos components, consistent with similar components across the codebase.

Also applies to: 365-365

crates/frontend/src/components/variable_form.rs (1)

45-45: LGTM! Component naming follows conventions.

The renaming of variable_formVariableForm and change_log_summaryChangeLogSummary adheres to the PascalCase convention for Leptos components, consistent with similar components across the codebase.

Also applies to: 212-212

crates/frontend/src/components/context_form.rs (1)

30-30: LGTM! Clean PascalCase refactor.

The component renames (condition_inputConditionInput and context_formContextForm) successfully align function definitions with JSX usage conventions, improving code consistency and searchability.

Also applies to: 245-245

crates/frontend/src/components/menu.rs (1)

6-6: LGTM! Generic component rename handled correctly.

The rename selection_menu<T>SelectionMenu<T> maintains the generic signature and trait bounds while adopting the PascalCase convention.

crates/frontend/src/components/variant_form.rs (1)

48-48: LGTM! Consistent PascalCase refactor across variant components.

All three component renames (variant_formVariantForm, delete_variantDeleteVariant, delete_variant_formDeleteVariantForm) correctly preserve generic parameters and maintain function signatures while improving naming consistency.

Also applies to: 463-463, 614-614

crates/frontend/src/components/change_summary.rs (1)

89-89: LGTM! Clean component naming refactor.

The renames (change_summaryChangeSummary, json_change_summaryJsonChangeSummary, change_log_popupChangeLogPopup) successfully standardize component naming while preserving all function signatures and logic.

Also applies to: 110-110, 202-202

crates/frontend/src/pages/dimension.rs (2)

272-272: LGTM! Public page components successfully refactored.

The public component renames (dimension_pageDimensionPage, edit_dimensionEditDimension, create_dimensionCreateDimension) align with the PascalCase convention.

Also applies to: 383-383, 430-430


27-27: The linter scripts/check_component_names.sh intentionally enforces PascalCase naming only for public components (those with the pub keyword). Private components, including tree_node, dimension_info, and dimension_data, are correctly left in snake_case by design. This is consistent with the codebase pattern where all private #[component] functions use snake_case while all public ones use PascalCase. No changes needed.

Likely an incorrect or invalid review comment.

crates/frontend/src/components/tooltip.rs (1)

11-15: LGTM! Component rename follows project convention.

The component rename from tooltip to Tooltip is consistent with the PascalCase standardization effort across the frontend codebase.

crates/frontend/src/components/datetime.rs (1)

124-138: LGTM! Component renames align with PascalCase convention.

The component renames (datetimeDatetime, datetime_strDatetimeStr, datetime_conversion_scriptDatetimeConversionScript) are consistent with the project-wide standardization effort. Function signatures and implementations remain unchanged.

crates/frontend/src/components/dimension_form.rs (2)

56-68: LGTM! Component rename follows PascalCase convention.

The component rename from dimension_form to DimensionForm aligns with the project-wide standardization effort. Function signature and implementation remain unchanged.


614-620: LGTM! Component rename and API expansion are consistent with the codebase.

The ChangeLogSummary component is renamed to PascalCase and gains two new props:

  • on_close: Callback<()> for dismissal handling
  • inprogress: Signal<bool> with a default value for loading state

This API expansion is consistent with other ChangeLogSummary variants across the codebase (variable_form.rs, type_template_form.rs, experiment_group_form.rs, webhook_form.rs, and default_config_form.rs all have the same signature). The call site in dimension_form.rs properly provides the required on_close callback.

crates/frontend/src/components/default_config_form.rs (2)

59-70: LGTM! Component rename follows PascalCase convention.

The component rename from default_config_form to DefaultConfigForm aligns with the project-wide standardization effort. The function signature has been updated with additional props while maintaining backward compatibility through defaults.


536-542: LGTM! Component API is consistent across the codebase.

The ChangeLogSummary component rename to PascalCase and API expansion (adding on_close and inprogress props) matches the same changes in dimension_form.rs and is consistent with other ChangeLogSummary variants across the codebase.

crates/frontend/src/components/experiment_action_form.rs (1)

24-29: Component renamed to PascalCase per standardization—all call sites updated.

The rename from experiment_action_form to ExperimentActionForm is complete and correct. Import and usage across call sites (e.g., crates/frontend/src/pages/experiment.rs) properly reference the new PascalCase component name. Module naming follows Rust conventions.

crates/frontend/src/components/experiment_group_form.rs (3)

33-37: LGTM!

The rename from add_experiment_to_group_form to AddExperimentToGroupForm aligns with the PR's PascalCase convention. The component logic and props remain unchanged.


170-180: LGTM!

The rename from experiment_group_form to ExperimentGroupForm follows the established PascalCase pattern. Props and implementation are preserved.


432-439: LGTM!

The ChangeLogSummary component follows the same signature pattern as other ChangeLogSummary implementations in the codebase (e.g., in variable_form.rs, type_template_form.rs, dimension_form.rs). The on_close and inprogress props with their defaults are consistent with the established API across similar components.

crates/frontend/src/components/input.rs (6)

177-184: LGTM!

The Toggle component rename follows PascalCase convention. Props and implementation are unchanged.


197-206: LGTM!

The Select component rename is consistent with the PR's naming convention.


365-375: LGTM!

The MonacoInput component correctly follows PascalCase. All props and editor integration logic remain intact.


552-564: LGTM!

The DateInput component rename is appropriate. The datetime handling with chrono types remains unchanged.


604-617: LGTM!

The Input component rename follows the established pattern. The component correctly dispatches to Toggle, Select, MonacoInput, and BasicInput based on the input type.


731-747: LGTM!

Both NumberArrayInput and StringArrayInput follow PascalCase convention and correctly delegate to the private ArrayInput helper.

crates/frontend/src/components/drawer.rs (3)

26-50: LGTM!

The DrawerBtn component correctly adds an optional on_click callback with a no-op default. The callback is properly invoked after opening the drawer.


52-88: LGTM!

The Drawer component now accepts a handle_close callback that is properly invoked on both overlay click and close button click. The generic constraint NF: Fn() + 'static + Clone is appropriate for this use case.


90-124: LGTM!

The PortalDrawer component follows the same pattern as Drawer with handle_close: Callback<()>. The callback is correctly invoked on overlay and close button interactions.

crates/frontend/src/components/type_template_form.rs (2)

34-41: LGTM!

The TypeTemplateForm component correctly adds handle_submit and description props. The callback pattern for notifying parent components on submission is consistent with other form components in the codebase.


214-221: LGTM!

The ChangeLogSummary component follows the same signature pattern as other ChangeLogSummary implementations across the codebase, with consistent on_confirm, on_close, and inprogress props.

crates/frontend/src/components/table.rs (2)

10-17: LGTM!

The ExpandableText component is enhanced with class_name and is_expandable props, enabling per-cell customization and controlled expand/collapse behavior. The implementation correctly handles the Expandable::Enabled(len) case for text truncation.


61-71: LGTM!

The Table component now exposes flexible styling props (class, cell_class, head_class, body_class) and pagination support. All props have sensible defaults, maintaining backward compatibility.

crates/frontend/src/pages/home.rs (1)

152-153: LGTM!

The Home page component is correctly renamed to follow PascalCase convention. No logic changes.

crates/frontend/src/components/alert.rs (1)

59-70: LGTM!

The Alert component function rename follows PascalCase convention. The function sharing the same name as the Alert struct is a valid pattern in Leptos, as the #[component] macro handles the namespace appropriately.

crates/frontend/src/components/experiment_form.rs (1)

78-92: LGTM!

The ExperimentForm component function is correctly renamed to PascalCase, aligning with the PR objective. The signature and internal logic remain unchanged.

crates/frontend/src/app.rs (1)

30-31: LGTM!

The App component function is correctly renamed to PascalCase. The function signature and internal routing logic remain unchanged.

crates/frontend/src/components/experiment_ramp_form.rs (1)

16-23: LGTM!

The ExperimentRampForm component function is correctly renamed to PascalCase while preserving the generic parameter NF and its trait bounds.

crates/frontend/src/components/description.rs (2)

7-11: LGTM!

The InfoDescription component function is correctly renamed to PascalCase.


48-58: LGTM!

The ContentDescription component function is correctly renamed to PascalCase. The extensive parameter list and view logic remain unchanged.

crates/frontend/src/providers/editor_provider.rs (1)

33-44: LGTM!

The EditorProvider component function is correctly renamed to PascalCase while the use_editor hook appropriately remains in snake_case (hooks are not components).

crates/frontend/src/providers/alert_provider.rs (1)

71-82: LGTM!

The AlertProvider component function is correctly renamed to PascalCase. The helper functions (enqueue, enqueue_alert, enqueue_alert_default) appropriately remain in snake_case as they are not components.

crates/frontend/src/components/modal.rs (2)

3-13: LGTM!

The Modal component function is correctly renamed to PascalCase while preserving the generic parameter NF and its trait bounds.


32-38: LGTM!

The PortalModal component function is correctly renamed to PascalCase.

crates/frontend/src/components/context_card.rs (1)

87-96: LGTM on PascalCase rename.

The public component function is correctly renamed to ContextCard, aligning with the PR's convention standardization goal.

crates/frontend/src/hoc/layout.rs (3)

37-51: LGTM on CommonLayout rename and toast integration.

The rename to PascalCase is correct. The toast rendering logic gracefully handles the case when AlertQueue context is not provided by falling back to an empty alerts list.


54-58: LGTM on Layout rename and context provisioning.

The rename to PascalCase is correct. The added provide_context calls for workspace and org make these signals available to descendant components, which complements the existing workspace_settings context provision at line 94.


103-109: LGTM on Providers rename.

The rename to PascalCase is correct and the component composition structure is unchanged.

crates/frontend/src/components/badge.rs (4)

11-19: LGTM on Badge rename.

Correct PascalCase rename with preserved generic type bounds and props.


59-66: LGTM on GrayPill rename.

Correct PascalCase rename with preserved signature and callback props.


89-98: LGTM on ListPills rename.

Correct PascalCase rename. The internal usage of GrayPill at line 114 correctly references the renamed component.


128-133: LGTM on GlassyPills rename.

Correct PascalCase rename with preserved trait bounds and props.

This commit addresses all coderabbit review feedback:

1. **Fixed sed portability** (scripts/check_component_names.sh:30)
   - Changed `-r` flag to `-E` for BSD/macOS compatibility
   - Extended regex now works on both GNU sed and BSD sed

2. **Renamed all private components to PascalCase** (31 components)
   - webhook_info -> WebhookInfo (pages/webhook.rs:26)
   - info_section -> InfoSection (components/info_modal.rs:4)
   - experiment_group_info -> ExperimentGroupInfo (pages/experiment_groups.rs:6)
   - variable_info -> VariableInfo (pages/variable.rs:20)
   - option and context_options -> Option, ContextOptions (components/context_card.rs:21,38)
   - experiment_info and action components (components/experiment.rs:29,148,181,222,237,242)
   - And 20+ other private components across multiple files

3. **Enhanced linter to check private components**
   - Now enforces PascalCase for both public and private components
   - Fixed false positives on nested helper functions
   - Only matches top-level component function definitions

All changes maintain consistency between component definitions and their
usage in JSX view macros. Build verified successfully.

Resolves all 7 coderabbit nitpick comments on the PR.
test-py-provider
test-kotlin-provider
test-rust-provider
.PHONY: cac check-component-names ci-test clients db-init grafana-local kill local-docs-view node-dependencies run schema-file setup setup-clients smithy-clean smithy-build smithy-clean-build smithy-api-docs smithy-updates validate-aws-connection validate-psql-connection uniffi-bindings test-js-provider test-py-provider test-kotlin-provider test-rust-provider
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can keep this multi-lined as well by adding \ at the end of each line
that will allow us to keep it clean as well as correct

check: fmt leptosfmt lint check-component-names

check-component-names:
@./scripts/check_component_names.sh
Copy link
Collaborator

@ayushjain17 ayushjain17 Jan 8, 2026

Choose a reason for hiding this comment

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

I dont think this is working as intended, because there are 6 more instances in code which are not converted to PascalCase and there is one behind doc comments as well
would have preferred a linter way of achieving this

next_line=$((line_num + offset))
line_content=$(sed -n "${next_line}p" "$file")
# Match fn at start of line or after 'pub ', not indented helper functions
if echo "$line_content" | grep -q "^pub fn [a-z_][a-z0-9_]*\|^fn [a-z_][a-z0-9_]*"; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

this grep is only looking for pub functions or lines which start with fn only
it is not covering all the cases

Copy link
Collaborator

Choose a reason for hiding this comment

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

if we have to regex way only, then I think this would be a better regex, covering both the lines

#\[component\]\n.*fn (.*)\(

without any start or end delimiters

and then what whatever group value is captured, just need to check that the first character is not a lower case alphabet and the entire capture does not include any occurrences of _
which could be represented by a regex like this

^[A-Z][A-Za-z0-9]*$

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.

Refactor leptos component function names

4 participants