Conversation
📝 WalkthroughWalkthroughFive files across models and views receive updates: a JSON key rename in the Post model, layout padding adjustments in ProfileView, visual styling enhancements in ProductDetailsView, a structural refactor from VStack to ScrollView with keyboard handling in EditProfileView, and text label corrections in SettingsView. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
Resell/Views/ProductDetails/ProductDetailsView.swift (1)
84-92: Chevron icon may appear off-center within the circular background.The
.offset(x: -10)on line 89 shifts the chevron image visually but doesn't change the 44×44 layout bounds. The.background(.ultraThinMaterial, in: Circle())on the Button is sized to those bounds, so the icon will render 10 points left of center within the circle.If this offset compensates for asymmetric padding in the
"chevron.left.white"asset, consider adjusting the asset instead for consistent centering. Otherwise, if intentional, this is fine to keep.💡 Option: Remove offset if asset is symmetric
Image("chevron.left.white") .resizable() .frame(width: 36, height: 24) .frame(width: 44, height: 44) .contentShape(Rectangle()) - .offset(x: -10) } .background(.ultraThinMaterial, in: Circle())🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resell/Views/ProductDetails/ProductDetailsView.swift` around lines 84 - 92, The chevron Image("chevron.left.white") is being visually shifted inside its circular background by .offset(x: -10), causing it to be off-center; remove the .offset(x: -10) from the Image (or from the Button content) so the .frame(width: 44, height: 44) and .background(.ultraThinMaterial, in: Circle()) can center the icon correctly, and if the asset itself is asymmetric, fix the "chevron.left.white" asset or adjust its internal padding instead of using .offset.
🤖 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/Settings/EditProfileView.swift`:
- Around line 29-44: The view registers two tap handlers (the local
.onTapGesture that calls proxy.scrollTo("bioField", anchor: .center) and the
EndEditingOnTap modifier which also uses .onTapGesture), causing one to swallow
the other; fix this by combining them into a single gesture so both actions run:
replace the separate .onTapGesture and EndEditingOnTap usage with a single
gesture (e.g., use .simultaneousGesture(TapGesture().onEnded { ... }) or a
combined custom tap modifier) that calls proxy.scrollTo(...) and also triggers
the end-editing/dismiss-keyboard behavior (the same work EndEditingOnTap
performs). Reference the scroll action proxy.scrollTo("bioField", anchor:
.center) and the EndEditingOnTap modifier when implementing the combined
handler.
- Around line 41-43: The scrollTo call uses the string ID "bioField" but no view
has that ID, causing the scroll to fail; add .id("bioField") to the TextEditor
(the bio field) so proxy.scrollTo("bioField", anchor: .center) can find it, and
move or restrict the .onTapGesture from the surrounding VStack to only the bio
section (or the specific bio label/row) so taps on the profile image/username
don't trigger scrolling unexpectedly; reference the TextEditor for the .id and
the VStack/.onTapGesture and proxy.scrollTo usages to locate and update the
code.
---
Nitpick comments:
In `@Resell/Views/ProductDetails/ProductDetailsView.swift`:
- Around line 84-92: The chevron Image("chevron.left.white") is being visually
shifted inside its circular background by .offset(x: -10), causing it to be
off-center; remove the .offset(x: -10) from the Image (or from the Button
content) so the .frame(width: 44, height: 44) and
.background(.ultraThinMaterial, in: Circle()) can center the icon correctly, and
if the asset itself is asymmetric, fix the "chevron.left.white" asset or adjust
its internal padding instead of using .offset.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a57c7c21-f120-41a2-b7e2-e36b4f43ae22
📒 Files selected for processing (5)
Resell/Models/Post.swiftResell/Views/Home/ProfileView.swiftResell/Views/ProductDetails/ProductDetailsView.swiftResell/Views/Settings/EditProfileView.swiftResell/Views/Settings/SettingsView.swift
| ScrollViewReader { proxy in | ||
| ScrollView { | ||
| VStack { | ||
| profileImageView | ||
| .padding(.bottom, 40) | ||
|
|
||
| nameView | ||
|
|
||
| editFieldsView | ||
|
|
||
| Spacer() | ||
| } | ||
| .onTapGesture { | ||
| proxy.scrollTo("bioField", anchor: .center) | ||
| } | ||
| } |
There was a problem hiding this comment.
Potential gesture conflict between tap handlers.
The .onTapGesture at lines 41-43 and .endEditingOnTap() at line 74 both register tap gestures. The EndEditingOnTap modifier (from the relevant code snippet) also uses .onTapGesture to dismiss the keyboard. When both are present, SwiftUI may only execute one of them, leading to either:
- Keyboard not dismissing when expected, or
- Scrolling not happening when expected
Consider combining these behaviors into a single tap handler, or use .simultaneousGesture() if both actions should execute on tap.
Also applies to: 74-74
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Resell/Views/Settings/EditProfileView.swift` around lines 29 - 44, The view
registers two tap handlers (the local .onTapGesture that calls
proxy.scrollTo("bioField", anchor: .center) and the EndEditingOnTap modifier
which also uses .onTapGesture), causing one to swallow the other; fix this by
combining them into a single gesture so both actions run: replace the separate
.onTapGesture and EndEditingOnTap usage with a single gesture (e.g., use
.simultaneousGesture(TapGesture().onEnded { ... }) or a combined custom tap
modifier) that calls proxy.scrollTo(...) and also triggers the
end-editing/dismiss-keyboard behavior (the same work EndEditingOnTap performs).
Reference the scroll action proxy.scrollTo("bioField", anchor: .center) and the
EndEditingOnTap modifier when implementing the combined handler.
| .onTapGesture { | ||
| proxy.scrollTo("bioField", anchor: .center) | ||
| } |
There was a problem hiding this comment.
Missing .id("bioField") causes scroll to fail silently.
The proxy.scrollTo("bioField", anchor: .center) call references an ID that is never assigned to any view. The TextEditor at line 167 needs an .id("bioField") modifier for the scroll to work.
Additionally, placing this tap gesture on the entire VStack creates confusing UX—tapping anywhere (profile image, username field, etc.) will attempt to scroll to the bio field. This is likely not the intended behavior.
🐛 Proposed fix: Add the missing ID to TextEditor
At line 167, add the .id("bioField") modifier:
TextEditor(text: $editedBio)
.font(Constants.Fonts.body1)
.foregroundColor(Constants.Colors.black)
.padding(.horizontal, 16)
.padding(.vertical, 8)
.scrollContentBackground(.hidden)
.background(Constants.Colors.wash)
.cornerRadius(10)
.frame(height: 100)
+ .id("bioField")
.onChange(of: editedBio) { newText inConsider also restricting the tap gesture to only the bio section if that's the intended trigger, rather than the entire content area.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .onTapGesture { | |
| proxy.scrollTo("bioField", anchor: .center) | |
| } | |
| TextEditor(text: $editedBio) | |
| .font(Constants.Fonts.body1) | |
| .foregroundColor(Constants.Colors.black) | |
| .padding(.horizontal, 16) | |
| .padding(.vertical, 8) | |
| .scrollContentBackground(.hidden) | |
| .background(Constants.Colors.wash) | |
| .cornerRadius(10) | |
| .frame(height: 100) | |
| .id("bioField") | |
| .onChange(of: editedBio) { newText in |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Resell/Views/Settings/EditProfileView.swift` around lines 41 - 43, The
scrollTo call uses the string ID "bioField" but no view has that ID, causing the
scroll to fail; add .id("bioField") to the TextEditor (the bio field) so
proxy.scrollTo("bioField", anchor: .center) can find it, and move or restrict
the .onTapGesture from the surrounding VStack to only the bio section (or the
specific bio label/row) so taps on the profile image/username don't trigger
scrolling unexpectedly; reference the TextEditor for the .id and the
VStack/.onTapGesture and proxy.scrollTo usages to locate and update the code.
See commit messages for specific bug fixes by number; not in github issues but before the “back” and “report” arrows couldn’t be properly seen on white backgrounds so I modified them to be visible.
Summary by CodeRabbit
Improvements
Style Updates