-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "payee is nothing" condition to rule if there is no payee set in a schedule #4267
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
WalkthroughThe pull request modifies the Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
packages/desktop-client/src/components/schedules/ScheduleDetails.tsx (1)
71-74
: LGTM! Consider adding a comment for clarity.The modification correctly handles the case where a payee is not set in a schedule, allowing the creation of a "payee is nothing" condition. This fixes the issue described in #1616.
Consider adding a comment to explain the special handling of the payee field:
+ // Special case: We want to create a condition for payee even when it's null + // to ensure schedules match transactions with no payee set if (value != null || field === 'payee') { return { op, field, value }; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
upcoming-release-notes/4267.md
is excluded by!**/*.md
📒 Files selected for processing (1)
packages/desktop-client/src/components/schedules/ScheduleDetails.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Functional
- GitHub Check: Visual regression
🔇 Additional comments (2)
packages/desktop-client/src/components/schedules/ScheduleDetails.tsx (2)
Line range hint
1-1000
: LGTM! The changes are well integrated.The modification to handle null payee values is well integrated with the existing component. The UI properly supports this case through the PayeeAutocomplete component, and the error handling remains robust.
71-74
: Verify impact on existing schedules.While the change correctly implements the "payee is nothing" condition, we should verify that it doesn't affect existing schedules with null payee values.
✅ Verification successful
Change is safe and consistent with existing null payee handling
The codebase already handles null payee values properly in both schedules and transaction rules, as evidenced by existing test cases and null-safe implementations. The special case for payee field aligns with the established behavior.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for existing schedules with null payee values ast-grep --pattern 'schedule._payee ?? null' # Search for existing rule conditions related to payee rg -A 5 '"field": "payee"'Length of output: 4171
Fixes #1616
Repro instructions copied from the issue:
Caused by the schedule rule creation skipping adding conditions for null fields, but in this case we should retain the payee=null check to avoid accidentally matching other transactions.