WEB-1099: Strip leading hierarchy dots from report select option names - #3792
WEB-1099: Strip leading hierarchy dots from report select option names#3792Farah-Nahle-FOO wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 54 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Note
|
| Layer / File(s) | Summary |
|---|---|
Normalize option names src/app/reports/common-models/select-option.model.ts |
The constructor strips leading dots from string names and preserves non-string names. It keeps the existing constructor signature and ID handling. |
Estimated code review effort: 1 (Trivial) | ~3 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| 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. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly and concisely describes the change to strip leading hierarchy dots from report select option names. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/reports/common-models/select-option.model.ts (1)
16-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused tests for the normalization contract.
Cover multiple leading dots, names without leading dots, non-string values, and unchanged IDs.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/reports/common-models/select-option.model.ts` around lines 16 - 17, In the tests for the select-option model constructor, add focused cases covering removal of multiple leading dots, preservation of names without leading dots, passthrough of non-string names, and preservation of the supplied ID. Use the existing model construction and assertion patterns without changing the normalization implementation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/app/reports/common-models/select-option.model.ts`:
- Around line 16-17: In the tests for the select-option model constructor, add
focused cases covering removal of multiple leading dots, preservation of names
without leading dots, passthrough of non-string names, and preservation of the
supplied ID. Use the existing model construction and assertion patterns without
changing the normalization implementation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 722ca25b-a388-4c9e-92da-28ba24468154
📒 Files selected for processing (1)
src/app/reports/common-models/select-option.model.ts
7916238 to
9dcaac7
Compare
Description
Office names in report parameter dropdowns (e.g. Reports > Active Loans - Summary > Office) were displayed with leading dots such as
...Fooor........Foo - Dubai Branch. Fineract's report SQL prefixes office names with dots to encode hierarchy depth, and the frontend'sSelectOptionmodel — which backs every report "select" type parameter, not just Office — was passing that raw string through unchanged.Stripped the leading dot prefix when the option name is constructed in
SelectOption(src/app/reports/common-models/select-option.model.ts), so all report select dropdowns render clean names (Foo,Foo - Dubai Branch, etc.) instead of the raw hierarchy-encoded string. No new dependencies required.Related issues and discussion
WEB-1099
Screenshots, if any
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit