-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 글 게시 중 버튼 인터랙션 비활성화 로직 추가 #229
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
Conversation
#Conflicts: # Wable-iOS/Presentation/Home/View/WritePostViewController.swift
WalkthroughThe changes update the Xcode project versioning settings and modify the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WritePostViewController
participant PostService
User->>WritePostViewController: Tap Post Button
WritePostViewController->>WritePostViewController: Check isPosting
alt isPosting == false
WritePostViewController->>WritePostViewController: Set isPosting = true\nDisable UI interactions
WritePostViewController->>PostService: Submit Post
PostService-->>WritePostViewController: Post Success/Failure
WritePostViewController->>WritePostViewController: Set isPosting = false\nEnable UI interactions
else isPosting == true
WritePostViewController-->>User: Ignore tap
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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: 2
🧹 Nitpick comments (6)
Wable-iOS.xcodeproj/project.pbxproj (1)
3173-3174: Versioning duplicated at target level – consider single-source of truth
MARKETING_VERSIONis correctly updated to1.3.0, but it now appears only in the target-level build settings.
Keeping the same key in both project-level and target-level sections leads to drift and accidental inconsistencies later.Optional cleanup:
- MARKETING_VERSION = 1.3.0; + # Remove from target configs and set once at project levelThis reduces noise in future diffs and avoids forgetting to bump one configuration.
Also applies to: 3215-3216
Wable-iOS/Presentation/Home/View/WritePostViewController.swift (5)
21-22:cancelBagdoes not need to bevarThe property is never reassigned after initialization. Prefer
letto communicate immutability and prevent unintended re-assignment.-private var cancelBag = CancelBag() +private let cancelBag = CancelBag()
254-256: Disable interactive-pop gesture while postingAlthough the back button action is short-circuited with
guard !isPosting, users can still swipe from the left edge to pop the view controller.
Consider disabling and re-enabling the gesture around the posting window:navigationController?.interactivePopGestureRecognizer?.isEnabled = false ... navigationController?.interactivePopGestureRecognizer?.isEnabled = true // in success & failure handlers
308-314:updatePostButtonStatecould toggle a loading indicatorRight now the helper only flips
isEnabled. Showing a visual spinner prevents the perception of a frozen button:if isLoading { - postButton.isEnabled = false + postButton.isEnabled = false + postButton.configuration?.showsActivityIndicator = true } else { - updateCharacterCount() + postButton.configuration?.showsActivityIndicator = false + updateCharacterCount() }
367-371: Minor: early-return branch can be collapsedThe
resignFirstResponder()andreturncan be written more concisely:guard !isPosting else { textView.resignFirstResponder(); return }Purely stylistic – feel free to ignore if you prefer the current layout.
396-397:shouldChangeTextInalready handles posting guard – duplication ok but unnecessaryYou have identical
guard !isPostingchecks in multiple delegate methods. Consider extracting them into a small helper or an early-exit extension to reduce repetition, but this is optional.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Wable-iOS.xcodeproj/project.pbxproj(4 hunks)Wable-iOS/Presentation/Home/View/WritePostViewController.swift(7 hunks)
| CURRENT_PROJECT_VERSION = 1; | ||
| DEVELOPMENT_TEAM = ""; |
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.
CFBundleVersion downgrade will be rejected by App Store
CURRENT_PROJECT_VERSION was changed from 5 → 1 in both Debug & Release configs.
Rolling the build number backwards violates CFBundleVersion rules; TestFlight / App Store Connect will refuse the upload and break CI/CD pipelines.
- CURRENT_PROJECT_VERSION = 1;
+ # Bump rather than reset. Minimum safe value is 6.
+ CURRENT_PROJECT_VERSION = 6;Please bump to a value strictly higher than every build that has ever been shipped (internal or external).
If the reset was intentional, create a new bundle identifier instead.
Also applies to: 3198-3199
🤖 Prompt for AI Agents
In Wable-iOS.xcodeproj/project.pbxproj around lines 3156 to 3157 and also lines
3198 to 3199, the CURRENT_PROJECT_VERSION was downgraded from 5 to 1, which
violates CFBundleVersion rules and will cause App Store upload failures. To fix
this, update CURRENT_PROJECT_VERSION to a number strictly higher than any
previously shipped build number in both Debug and Release configurations. If you
intended to reset the version, instead create a new bundle identifier to avoid
conflicts.
| guard let self = self else { return } | ||
|
|
||
| self.isPosting = false | ||
| self.updatePostButtonState(isLoading: false) | ||
|
|
||
| if self.navigationController?.topViewController == self { | ||
| let toast = ToastView(status: .complete, message: "게시물이 작성되었습니다") | ||
| toast.show() | ||
| self.navigationController?.popViewController(animated: true) | ||
| } |
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.
Posting lock never released on failure / cancellation
isPosting is reset only on postSuccess.
If the request fails or is cancelled, the UI will remain permanently locked (post button disabled, text views non-editable, back navigation blocked).
Proposed fix – reset the lock in an error/completion stream as well:
output.postFailure // publisher exposed by the VM
.sink { [weak self] _ in
self?.isPosting = false
self?.updatePostButtonState(isLoading: false)
ToastView(status: .error, message: "게시 실패").show()
}
.store(in: cancelBag)If the view model does not expose a failure publisher, please add one or handle completion on the existing publisher.
🤖 Prompt for AI Agents
In Wable-iOS/Presentation/Home/View/WritePostViewController.swift around lines
206 to 215, the isPosting flag is only reset on successful post completion,
causing the UI to remain locked if posting fails or is cancelled. To fix this,
add a subscriber to the view model's failure publisher (e.g.,
output.postFailure) that resets isPosting to false, updates the post button
state to not loading, and shows an error toast. If no failure publisher exists,
create one or handle the completion event on the existing publisher to ensure
the posting lock is always released regardless of outcome.
[Fix] 글 게시 중 버튼 인터랙션 비활성화 로직 추가
👻 PULL REQUEST
📄 작업 내용
🔗 연결된 이슈