Skip to content

fix: small fixes - #4156

Merged
tothandras merged 1 commit into
mainfrom
fix/plan-handlers
Apr 16, 2026
Merged

tothandras merged 1 commit into
mainfrom
fix/plan-handlers

Conversation

@tothandras

@tothandras tothandras commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Corrected an internal naming inconsistency in the conversion layer.
    • Standardized error message formatting for improved consistency.
  • Refactor

    • Enhanced configuration validation to ensure all required services are properly initialized.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6d5065e9-f7da-43c1-9b96-a64b1794a0a9

📥 Commits

Reviewing files that changed from the base of the PR and between 4eb7245 and 2b17ec7.

📒 Files selected for processing (3)
  • api/v3/handlers/plans/convert.go
  • api/v3/handlers/plans/convert_test.go
  • api/v3/server/server.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • api/v3/handlers/plans/convert_test.go
  • api/v3/server/server.go
  • api/v3/handlers/plans/convert.go

📝 Walkthrough

Walkthrough

This PR fixes a typo in a billing conversion helper function name, standardizes error message formatting with colons, updates corresponding test calls, and adds a validation check for a required service dependency.

Changes

Cohort / File(s) Summary
Billing Conversion Helper Rename & Error Message Standardization
api/v3/handlers/plans/convert.go
Renamed helper ToAPIBillingRateCardTaxConfi to ToAPIBillingRateCardTaxConfig (typo fix). Standardized three error message strings to include colons before wrapped errors in FromAPIUpsertPlanRequest, FromAPIBillingPlanPhase, and FromAPIBillingRateCard.
Test Updates
api/v3/handlers/plans/convert_test.go
Updated TestFromBillingTaxConfig test cases to call the renamed ToAPIBillingRateCardTaxConfig helper function.
Server Config Validation
api/v3/server/server.go
Added required-dependency validation check for PlanAddonService in Config.Validate() to ensure the service is not nil.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • chrisgacsal
  • turip
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: small fixes' is too vague and generic; it doesn't clearly convey what specific issues are being addressed in the changeset. Make the title more specific by naming the main fix, like 'fix: correct typo in billing tax config helper and validation messages' or 'fix: add PlanAddonService validation check'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plan-handlers

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.

@tothandras tothandras added the release-note/ignore Ignore this change when generating release notes label Apr 16, 2026
Comment thread api/v3/handlers/plans/list.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@api/v3/handlers/plans/list.go`:
- Around line 77-85: The current adjustment computing filteredTotal (using
result.TotalCount, result.Items, and items) only accounts for filtering on the
current page and makes meta.page.total page-dependent; revert to passing the
original result.TotalCount into response.NewPagePaginationResponse (use
result.TotalCount for PageMetaPage.Total) instead of filteredTotal, and remove
the filteredTotal calculation; if you need a true filtered total, move the
filtering into the service/query layer before pagination so the Total reflects
the full filtered dataset.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5e9543c1-9100-428d-8436-552e7c5210ab

📥 Commits

Reviewing files that changed from the base of the PR and between 7b40d30 and 4eb7245.

📒 Files selected for processing (4)
  • api/v3/handlers/plans/convert.go
  • api/v3/handlers/plans/convert_test.go
  • api/v3/handlers/plans/list.go
  • api/v3/server/server.go

Comment thread api/v3/handlers/plans/list.go Resolved
@tothandras
tothandras enabled auto-merge (squash) April 16, 2026 14:10
@rolosp
rolosp self-requested a review April 16, 2026 14:10
@tothandras
tothandras merged commit bc4528f into main Apr 16, 2026
25 checks passed
@tothandras
tothandras deleted the fix/plan-handlers branch April 16, 2026 14:14
@coderabbitai coderabbitai Bot mentioned this pull request Jul 3, 2026

This branch was previously deployed

1 inactive deployment
dev — 2b17ec7e Deployed Apr 16, 2026 by tothandras via Migration Checks #13525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants