-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix!: remove todo macro #84
Conversation
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ActivityHandler
participant Database
User->>ActivityHandler: Create or Update Note
ActivityHandler->>ActivityHandler: Check if CreateType
alt CreateType
ActivityHandler->>Database: Insert new Note
else UpdateType
ActivityHandler->>ActivityHandler: TODO
end
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
🧹 Outside diff range and nitpick comments (3)
crates/cron/src/tasks/check_feed_item.rs (1)
26-26
: LGTM! Consider enhancing the comment for clarity.The empty block is an appropriate replacement for the
todo!()
macro, as no action is needed when the modification dates match.Consider making the comment more explicit about why there's nothing to do:
- _ => {}, // there is nothing to do + _ => {}, // dates are equal, no update neededcrates/apub/src/activities/create_or_update/note.rs (2)
Line range hint
77-82
: Consider documenting the remaining verification requirements.While this TODO is separate from the PR's focus on removing todo!() macros, it would be helpful to document what additional verification is needed here.
Would you like me to help create a GitHub issue to track the remaining verification requirements?
Line range hint
52-58
: Consider implementing UpdateType handling or document why it's intentionally skipped.There's an architectural inconsistency where the struct provides an
update()
method to create UpdateType activities, but thereceive()
method doesn't handle them. This could lead to confusion or potential issues.Consider either:
- Implementing the UpdateType handling in the receive method
- Documenting why UpdateType activities don't need to be handled
- Marking the
update()
method as deprecated if UpdateType support is not intendedAlso applies to: 106-108
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
crates/apub/src/activities/create_or_update/note.rs
(1 hunks)crates/cron/src/tasks/check_feed_item.rs
(1 hunks)
🔇 Additional comments (1)
crates/apub/src/activities/create_or_update/note.rs (1)
106-108
: Implementation looks good, but UpdateType handling remains unimplemented.
The refactoring from todo!()
macro to an explicit if let
pattern is a good improvement. However, there's still work needed to implement the UpdateType case.
Let's verify if there are any UpdateType activities in the codebase that would be affected:
Summary by CodeRabbit
These changes enhance the overall functionality and reliability of note management and feed item checks within the application.