Skip to content

feat: add an option to ignore empty body updates - #60

Merged
snipsnipsnip merged 2 commits into
exteditor:mainfrom
snipsnipsnip:issue-23-workaround
Oct 26, 2026
Merged

snipsnipsnip merged 2 commits into
exteditor:mainfrom
snipsnipsnip:issue-23-workaround

Conversation

@snipsnipsnip

Copy link
Copy Markdown
Member

Workaround for a vscode quirk (see #23).

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b4f0ad8-88d3-4616-bbb9-ec230198c8c3
Commits

Reviewing files that changed from the base of the PR and between 353de99 and e77a759.

Files selected for processing: 2
  • src/ghosttext-adaptor/api.ts
  • src/ghosttext-runner/api.ts

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8c2b42b-da36-4d18-9025-34a87cd29086
Commits

Reviewing files that changed from the base of the PR and between bb5eaeb and 353de99.

Files selected for processing: 8
  • ext/options.css
  • ext/options.html
  • locales.toml
  • src/ghosttext-adaptor/api.ts
  • src/ghosttext-adaptor/client_options_loader.ts
  • src/ghosttext-adaptor/email_editor.ts
  • src/ghosttext-runner/api.ts
  • src/test/testbench/ghostbird.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an option to ignore empty message-body updates received before an editing session closes. When enabled, empty updates are not sent; non-empty updates continue to be sent.
    • The option is off by default and is available in the settings in 28 languages.

The change adds an ignoreEmptyBodyUpdates option to the options form and client options. When enabled, EmailEditor skips sending edits with an exactly empty body. The default is disabled.

Changes: Empty-Body Update Option

Layer / File(s) Summary
Define and deliver the option
src/ghosttext-adaptor/api.ts, src/ghosttext-runner/api.ts, ext/options.html, ext/options.css, locales.toml, src/ghosttext-adaptor/client_options_loader.ts, src/test/testbench/ghostbird.ts
The options form adds a localized checkbox. The option is added to StoredOptions and ClientOptions. ClientOptionsLoader loads the stored value, defaults it to false, and includes it in the returned options.
Apply the option to outgoing edits
src/ghosttext-adaptor/email_editor.ts
EmailEditor skips sending an edit when the option is enabled and the body is empty. Tests cover empty and non-empty bodies with the option enabled or disabled.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant EmailEditor
  participant SendCallback
  Caller->>EmailEditor: applyChange(change)
  EmailEditor->>EmailEditor: Check option and change.body
  alt Option enabled and body is empty
    EmailEditor-->>Caller: Return without sending
  else Option disabled or body is non-empty
    EmailEditor->>SendCallback: Send edit
  end
Loading
Merge Risk: Minimal · up to 353de

No merge-blocking risk was identified in the option wiring or empty-body handling.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description states the workaround and references the VS Code issue, but it does not include the required current behavior, new behavior, manual test steps, license confirmation, or other details. Complete the required template sections. Describe the current behavior, explain the new behavior, add manual verification steps, confirm the dual-license checkbox, and include any relevant additional information.
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding an option to ignore empty body updates.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the message flow,
An empty body need not go.
The setting keeps that choice in view,
Full messages still travel through.
The rabbit hops and calls it done.

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

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.76%. Comparing base (bb5eaeb) to head (e77a759).

Additional details and impacted files
Components Coverage Δ
app 64.33% <ø> (ø)
ghosttext 94.56% <100.00%> (+0.55%) ⬆️
infra 49.07% <ø> (ø)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread src/ghosttext-runner/api.ts Resolved
Comment thread src/ghosttext-adaptor/api.ts Resolved
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@snipsnipsnip
snipsnipsnip added this pull request to the merge queue Oct 26, 2026
Merged via the queue into exteditor:main with commit 155dc03 Oct 26, 2026
9 checks passed
@snipsnipsnip
snipsnipsnip deleted the issue-23-workaround branch October 26, 2026 09:10
@github-project-automation github-project-automation Bot moved this from 📥️Inbox to 🪺Experimental in Ghostbird Issues Oct 26, 2026
@snipsnipsnip snipsnipsnip moved this from 🪺Experimental to ✅Closed in Ghostbird Issues Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Closed

Development

Successfully merging this pull request may close these issues.

1 participant