Skip to content

Conversation

@youz2me
Copy link
Member

@youz2me youz2me commented Jun 11, 2025

👻 PULL REQUEST

📄 작업 내용

  • 글 게시 버튼을 눌렀을 때부터 글 게시 시점까지의 버튼 인터랙션을 비활성화했어요.
  • 글 게시 뷰를 벗어났을 때 나가기 팝업이 띄워질 수 없도록 코드를 수정했어요.

🔗 연결된 이슈

@youz2me youz2me requested a review from JinUng41 June 11, 2025 09:36
@youz2me youz2me self-assigned this Jun 11, 2025
@youz2me youz2me added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌 labels Jun 11, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 11, 2025

Walkthrough

The changes update the Xcode project versioning settings and modify the WritePostViewController to introduce a posting state lock. This prevents user interactions, such as posting or navigating back, while a post submission is in progress by disabling relevant UI elements and blocking actions.

Changes

File(s) Change Summary
Wable-iOS.xcodeproj/project.pbxproj Updated CURRENT_PROJECT_VERSION from 5 to 1 and MARKETING_VERSION from 1.2.2 to 1.3.0 in both Debug and Release build settings.
Wable-iOS/Presentation/Home/View/WritePostViewController.swift Added isPosting state, updated UI and interaction logic to prevent actions during posting, changed cancelBag to variable, and centralized post button state management.

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
Loading

Assessment against linked issues

Objective Addressed Explanation
Disable back button during post submission (#228)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Update of CURRENT_PROJECT_VERSION and MARKETING_VERSION in project.pbxproj These versioning changes are unrelated to the requirement of disabling the back button during post submission.
Change of cancelBag from let to var in WritePostViewController.swift This change is not directly related to disabling the back button functionality. However, it may be necessary for internal state management; the necessity is unclear from the issue description.

Poem

A post is sent, the bunny waits,
No hopping back through UI gates!
With paws on pause, no double send,
The code ensures one post to end.
Versions rise, the carrot's sweet—
A single click, a bug defeat! 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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_VERSION is correctly updated to 1.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 level

This 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: cancelBag does not need to be var

The property is never reassigned after initialization. Prefer let to communicate immutability and prevent unintended re-assignment.

-private var cancelBag = CancelBag()
+private let cancelBag = CancelBag()

254-256: Disable interactive-pop gesture while posting

Although 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: updatePostButtonState could toggle a loading indicator

Right 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 collapsed

The resignFirstResponder() and return can be written more concisely:

guard !isPosting else { textView.resignFirstResponder(); return }

Purely stylistic – feel free to ignore if you prefer the current layout.


396-397: shouldChangeTextIn already handles posting guard – duplication ok but unnecessary

You have identical guard !isPosting checks 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

📥 Commits

Reviewing files that changed from the base of the PR and between 28e1e5d and 6908427.

📒 Files selected for processing (2)
  • Wable-iOS.xcodeproj/project.pbxproj (4 hunks)
  • Wable-iOS/Presentation/Home/View/WritePostViewController.swift (7 hunks)

Comment on lines +3156 to 3157
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

CFBundleVersion downgrade will be rejected by App Store

CURRENT_PROJECT_VERSION was changed from 51 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.

Comment on lines +206 to +215
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)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

@github-project-automation github-project-automation bot moved this to In Review in Wable-iOS Jun 11, 2025
@youz2me youz2me merged commit 2b30482 into develop Jun 11, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS Jun 11, 2025
@youz2me youz2me deleted the fix/#228-post-progress branch June 11, 2025 10:19
youz2me added a commit that referenced this pull request Oct 26, 2025
[Fix] 글 게시 중 버튼 인터랙션 비활성화 로직 추가
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ fix 기능적 버그나 오류 해결 시 사용 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 글 게시 중 뒤로가기 버튼 비활성화

3 participants