[NAE-2452] Pre-release bugfixes#336
Conversation
- Added checks to block actions (add/remove/change) when fields are disabled. - Passed `UserComparatorService` to task panel components for additional checks. - Enhanced tests to validate behavior of disabled fields and tab selections. - Updated input templates to bind `disabled` state to `formControlRef.disabled`.
- Renamed `.search-icon` to `.prefix-icon` in SCSS. - Replaced `mat-icon` with `matPrefix` for input in HTML.
|
Warning Review limit reached
More reviews will be available in 31 minutes and 22 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughDisabled-state guards are added to ChangesDisabled-state guards for data fields
Task panel assignee-based field blocking on tab reload
User-assign search field UI update
Search model Elasticsearch field updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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.
Inline comments:
In
`@projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.spec.ts`:
- Around line 185-198: Add a new regression test case after the existing test
that covers the scenario where a task is assigned to the current user but the
user lacks finish permission. The test should follow the same pattern as the
existing test by setting up spies on isExpanded, initializeTaskDataFields, and
blockFields, setting _canReload to true, and then triggering
tabSelected$.next(true) to verify that blockFields is called with true even when
the task is assigned but finish permission is denied. This ensures
finish-permission precedence is respected during tab-reload field blocking
logic.
In
`@projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.ts`:
- Around line 202-207: The blockFields logic in the initializeTaskDataFields
callback is computing taskShouldBeBlocked based only on assignee ownership,
which overwrites the previous blocking state that was set based on finish
permissions. To fix this, modify the blockFields call within the
initializeTaskDataFields callback in abstract-task-panel.component.ts to ensure
that taskShouldBeBlocked is true not only when the user is not the assignee but
also when they lack the required finish permission. This way, fields will remain
blocked if either the assignee check or the finish permission check requires
blocking, preventing the second computation from inadvertently unblocking
fields.
In
`@projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.html`:
- Around line 9-10: The button element in the user-assign component template
that clears the search control (identified by the click handler
`(click)="searchUserControl.setValue('')"` and the conditional
`*ngIf="searchUserControl.value"`) is missing an explicit type attribute. Add
`type="button"` to this button element to prevent it from defaulting to
type="submit" and accidentally submitting an enclosing form when clicked.
- Around line 5-11: The search input and clear button in the
user-assign.component.html file lack proper accessibility labels. Add an
aria-label attribute to the matInput element within the mat-form-field to
provide an accessible name for the search field (ensure it aligns with the
translated placeholder text). Additionally, add an aria-label attribute to the
button element with the (click)="searchUserControl.setValue('')" handler to
describe its purpose for assistive technologies, making it clear that this
button clears the search input.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6df5fe21-c6d9-4158-8fce-30941665cdf7
📒 Files selected for processing (10)
projects/netgrif-components-core/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.spec.tsprojects/netgrif-components-core/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.tsprojects/netgrif-components-core/src/lib/data-fields/string-collection-field/string-collection-default-field/abstract-string-collection-default-field.component.tsprojects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.spec.tsprojects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.tsprojects/netgrif-components/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/multichoice-autocomplete-field.component.htmlprojects/netgrif-components/src/lib/data-fields/string-collection-field/string-collection-default-field/string-collection-default-field.component.htmlprojects/netgrif-components/src/lib/panel/task-panel/task-panel.component.tsprojects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.htmlprojects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.scss
Refactored the CaseStringId model to include optional dependencies for elastic keyword resolution. Adjusted the CaseSearch.enum to rename the STRING_ID value to 'id' for consistency. This enhances functionality and improves flexibility in dependency management.
- Changed `login` field source from `email` to `username` in `createRequestBody`.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts (1)
33-35:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
duplicate()drops resolver dependencies introduced by the new constructorLine 34 creates a clone without passing
_optionalDependencies. Cloned instances won’t usesearchIndexResolver, causing inconsistent Elasticsearch keyword/index resolution versus the original instance.Proposed fix
duplicate(): CaseStringId { - return new CaseStringId(this._operatorService, this._log); + return new CaseStringId(this._operatorService, this._log, this._optionalDependencies); }🤖 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 `@projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts` around lines 33 - 35, The duplicate() method in the CaseStringId class is not passing the _optionalDependencies parameter when creating a new instance, which causes the cloned object to lose resolver dependencies like searchIndexResolver. Update the duplicate() method to pass _optionalDependencies as a third argument to the CaseStringId constructor so that the cloned instance maintains the same resolver configuration as the original instance.
🤖 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.
Outside diff comments:
In
`@projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts`:
- Around line 33-35: The duplicate() method in the CaseStringId class is not
passing the _optionalDependencies parameter when creating a new instance, which
causes the cloned object to lose resolver dependencies like searchIndexResolver.
Update the duplicate() method to pass _optionalDependencies as a third argument
to the CaseStringId constructor so that the cloned instance maintains the same
resolver configuration as the original instance.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7adaed97-00bc-4758-aac1-fd0aff2e3fef
📒 Files selected for processing (3)
projects/netgrif-components-core/src/lib/forms/change-password/abstract-change-password.component.tsprojects/netgrif-components-core/src/lib/search/models/category/case/case-search.enum.tsprojects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
|



Description
Fixes NAE-2452
Dependencies
No new dependencies were introduced
Third party dependencies
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
This was tested manually and with unit tests.
Test Configuration
Checklist:
Summary by CodeRabbit
Release Notes