Conversation
…ly caused error where we couldn't create new listings)
… click out of the menu. additionally fixed user's ability to delete posts by displaying confirmation when they select delete posts
… no items archived), removed inconsistent gray overlay while loading, applied the loading animation to the requests tab.
…on to false when the user hits log out
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughMultiple UI overlay refinements, reactive state property updates, and API encoding adjustments across views and models. Changes include removing visual dimming overlays, adding modal presentation coordination, introducing published state properties, and adjusting JSON key mappings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Resell/Views/ViewModifiers/LoadingView.swift (1)
20-27:⚠️ Potential issue | 🟠 MajorLoading state no longer blocks user interactions.
The overlay that previously absorbed taps whenisLoading == truehas been commented out (lines 20–23). With onlyCustomProgressViewremaining (which hasallowsHitTesting(false)), taps pass through to the underlying content, risking accidental interactions during active requests.Recommend adding a clear tap-blocking overlay:
Color.clear .contentShape(Rectangle()) .ignoresSafeArea() .opacity(isLoading ? 1 : 0) .allowsHitTesting(isLoading)This preserves the visual intent (no dimming) while properly blocking taps across the app's 13+ screens that use
loadingView.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resell/Views/ViewModifiers/LoadingView.swift` around lines 20 - 27, The loading overlay no longer blocks touches because the previous Color overlay was removed and CustomProgressView uses allowsHitTesting(false); restore a hit-blocking transparent overlay when isLoading is true by inserting a full-screen clear background with a Rectangle content shape, ignoring safe area, whose opacity is tied to isLoading and whose allowsHitTesting is set to isLoading so taps are absorbed while loading; update the view that composes CustomProgressView (the loadingView modifier or parent) to include this overlay alongside CustomProgressView so visual appearance is unchanged but interactions are blocked.
🧹 Nitpick comments (2)
Resell/Views/Settings/SettingsView.swift (1)
137-138: Remove commented-out routing code from logout action.
Lines 137–138 leave dead/commented navigation in a critical flow. Prefer removing it or tracking it as an explicit TODO in an issue.Proposed cleanup
- //route to the log in page here? -// router.push(.login)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resell/Views/Settings/SettingsView.swift` around lines 137 - 138, Remove the dead commented routing call inside the logout flow in SettingsView (the commented router.push(.login) lines within the logout action); either delete those commented lines entirely or replace them with a single short TODO referencing an issue ID if navigation still needs to be tracked, and ensure the logout action (in SettingsView / the logout handler) contains only active, purposeful code.Resell/ViewModels/ProductDetailsViewModel.swift (1)
162-169: Remove temporary debug prints from delete flow.
Lines 162, 165, 167, and 169 add console prints in a production code path. Please remove them (or gate under DEBUG) and rely onNetworkManager.shared.loggerfor structured logs.Proposed cleanup
func deletePost() { - print("deletepost was called in productdetailsview") Task { do { - print("went into the task") if let id = item?.id { - print("trying to delete") try await NetworkManager.shared.deletePost(id: id) - print("got back") } didShowDeleteView = false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resell/ViewModels/ProductDetailsViewModel.swift` around lines 162 - 169, Remove the temporary debug prints in the delete flow inside ProductDetailsViewModel (the Task block that checks item?.id and calls NetworkManager.shared.deletePost); either delete the print(...) lines or wrap them with a DEBUG-only compiler flag, and replace ad-hoc prints with structured logging via NetworkManager.shared.logger (include contextual info like the post id and success/failure). Ensure references: ProductDetailsViewModel's Task that uses item?.id and NetworkManager.shared.deletePost and use NetworkManager.shared.logger for any necessary runtime info.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Resell/Views/ProductDetails/ProductDetailsView.swift`:
- Around line 120-122: The delete sheet presentation doesn't close the options
menu if the user dismisses the sheet by swiping; add an onChange observer on the
binding used for the sheet (viewModel.didShowDeleteView) in ProductDetailsView
so that when it becomes true or when it changes to false you explicitly set
viewModel.didShowOptionsMenu = false (synchronizing state regardless of whether
actions in deletePostView were tapped); update the sheet declaration that shows
deletePostView to include this onChange handler to ensure didShowOptionsMenu is
cleared whenever the delete sheet is presented or dismissed.
---
Outside diff comments:
In `@Resell/Views/ViewModifiers/LoadingView.swift`:
- Around line 20-27: The loading overlay no longer blocks touches because the
previous Color overlay was removed and CustomProgressView uses
allowsHitTesting(false); restore a hit-blocking transparent overlay when
isLoading is true by inserting a full-screen clear background with a Rectangle
content shape, ignoring safe area, whose opacity is tied to isLoading and whose
allowsHitTesting is set to isLoading so taps are absorbed while loading; update
the view that composes CustomProgressView (the loadingView modifier or parent)
to include this overlay alongside CustomProgressView so visual appearance is
unchanged but interactions are blocked.
---
Nitpick comments:
In `@Resell/ViewModels/ProductDetailsViewModel.swift`:
- Around line 162-169: Remove the temporary debug prints in the delete flow
inside ProductDetailsViewModel (the Task block that checks item?.id and calls
NetworkManager.shared.deletePost); either delete the print(...) lines or wrap
them with a DEBUG-only compiler flag, and replace ad-hoc prints with structured
logging via NetworkManager.shared.logger (include contextual info like the post
id and success/failure). Ensure references: ProductDetailsViewModel's Task that
uses item?.id and NetworkManager.shared.deletePost and use
NetworkManager.shared.logger for any necessary runtime info.
In `@Resell/Views/Settings/SettingsView.swift`:
- Around line 137-138: Remove the dead commented routing call inside the logout
flow in SettingsView (the commented router.push(.login) lines within the logout
action); either delete those commented lines entirely or replace them with a
single short TODO referencing an issue ID if navigation still needs to be
tracked, and ensure the logout action (in SettingsView / the logout handler)
contains only active, purposeful code.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 91a6d821-9bb5-453a-a841-b5bb7a094357
📒 Files selected for processing (10)
Resell/Models/Listing.swiftResell/Models/Post.swiftResell/ViewModels/MainViewModel.swiftResell/ViewModels/ProductDetailsViewModel.swiftResell/Views/Components/ExpandableAddButton.swiftResell/Views/Components/OptionsMenuView.swiftResell/Views/Home/ProfileView.swiftResell/Views/ProductDetails/ProductDetailsView.swiftResell/Views/Settings/SettingsView.swiftResell/Views/ViewModifiers/LoadingView.swift
Xhether
left a comment
There was a problem hiding this comment.
Good work thank you for fixing so many issues, just added a few comments I'd like you to address and I'll approve quickly after :)
… statements and comments. also applied a suggested fix by coderabbit to turn didShowOptionsMenu to false when deletePostView comes up
See commit messages. Fixed issues #46, #45, #44, #32 and other problems that had no issue (couldn’t create new listing, and inconsistent gray overlays throughout the app).
Summary by CodeRabbit
Bug Fixes
Visual & UI Improvements