Skip to content

fix(admin): invoice amount filter units, org URL error, search focus#1676

Merged
rohanchkrabrty merged 2 commits into
mainfrom
fix-admin-bug
Jun 8, 2026
Merged

fix(admin): invoice amount filter units, org URL error, search focus#1676
rohanchkrabrty merged 2 commits into
mainfrom
fix-admin-bug

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Convert the invoice amount filter value from dollars to cents before sending the SearchOrganizationInvoices RQL query — the backend stores amounts in cents, but the filter input was sending dollars, so number filters never matched
  • Fix misleading duplicate-org error in the create organization panel: the AlreadyExists error now says "Organization URL is already taken" instead of "name already exists", matching the field's label ("Organization URL")
  • Auto-focus the organizations list search input when it's opened

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jun 8, 2026 4:27am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Fixed organization invoice amount filters to process correctly on the server
    • Corrected error message when creating duplicate organizations
  • Improvements

    • Enhanced organization search input with automatic focus on display

Walkthrough

PR updates organization administration views with three independent improvements: a helper to convert invoice amount filters from dollars to cents before server queries, corrected error messaging when organization URLs conflict during creation, and automatic focus on the organizations search field.

Changes

Organization Admin UI Improvements

Layer / File(s) Summary
Invoice amount filter conversion
web/sdk/admin/views/organizations/details/invoices/index.tsx
Added convertAmountFiltersToCents helper to detect and round amount filter inputs from dollars to cents, then integrated it into computedQuery to pass converted values to transformDataTableQueryToRQLRequest.
Organization creation error message
web/sdk/admin/views/organizations/list/create.tsx
Updated Code.AlreadyExists error handling to report the organization URL is already taken, not the organization name.
Search field auto-focus
web/sdk/admin/views/organizations/list/navbar.tsx
Added autoFocus prop to DataTable.Search to automatically focus the search input when shown.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • raystack/frontier#1549: Moves invoice search RPC wiring in the same OrganizationInvoicesView file, affecting the query construction pipeline this PR integrates with.
  • raystack/frontier#1553: Introduces the RQL query transformation pipeline that this PR's amount filter conversion feeds into for infinite-loading invoices.

Suggested reviewers

  • rsbh
  • paanSinghCoder
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7fa59d45-ef1c-42a6-842a-c0326577ded3

📥 Commits

Reviewing files that changed from the base of the PR and between bd6a145 and fb0a83f.

📒 Files selected for processing (3)
  • web/sdk/admin/views/organizations/details/invoices/index.tsx
  • web/sdk/admin/views/organizations/list/create.tsx
  • web/sdk/admin/views/organizations/list/navbar.tsx

Comment thread web/sdk/admin/views/organizations/list/navbar.tsx
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 5, 2026

Coverage Report for CI Build 27116010617

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 43.224%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 38044
Covered Lines: 16444
Line Coverage: 43.22%
Coverage Strength: 12.14 hits per line

💛 - Coveralls

@rohanchkrabrty rohanchkrabrty enabled auto-merge (squash) June 8, 2026 04:28
@rohanchkrabrty rohanchkrabrty merged commit 367c75f into main Jun 8, 2026
8 checks passed
@rohanchkrabrty rohanchkrabrty deleted the fix-admin-bug branch June 8, 2026 04:32
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.

3 participants