Skip to content

fix(new-channels): prevent empty message send#2103

Merged
synoet merged 1 commit intomainfrom
synoet/new-channels-prevent-empty-message
Mar 22, 2026
Merged

fix(new-channels): prevent empty message send#2103
synoet merged 1 commit intomainfrom
synoet/new-channels-prevent-empty-message

Conversation

@synoet
Copy link
Copy Markdown
Contributor

@synoet synoet commented Mar 22, 2026

No description provided.

@synoet synoet requested a review from a team as a code owner March 22, 2026 02:32
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 22, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

These changes add validation to prevent sending empty or whitespace-only messages. A new utility function hasSendableInputContent determines whether input has non-empty trimmed text or attachments. The send button now disables when there are pending attachments or insufficient sendable content. The send command gate checks for sendable content before proceeding with the send operation. Tests verify that whitespace-only messages return false without invoking callbacks, while messages with attachments return true regardless of text content.

Poem

🐰 Hoppy code hops along,
No empty words sent wrong—
Trim the space, check attachments too,
Send only when there's substance true!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the rationale and implementation details of the empty message prevention feature.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: preventing empty messages from being sent, which aligns with the changes across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch synoet/new-channels-prevent-empty-message

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

@synoet synoet merged commit 56df7b9 into main Mar 22, 2026
23 of 24 checks passed
@synoet synoet deleted the synoet/new-channels-prevent-empty-message branch March 22, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant