Repository navigation
Fix: 4 issues (#1518, #1519, #1520, #1521) - #1653
Merged
Mystery-CLI merged 1 commit intoOct 18, 2026
Merged
Conversation
Co-authored-by: Simple Agent <agent@simple.dev>
|
@popsman01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1518
Closes #1519
Closes #1520
Closes #1521
Issues
#1518 backend/src/services/streaming.js: Tool truncation comment and unmatched brace inserted into source
#1519 backend/src/notifications/channels/email.js: CommonJS module.exports syntax used in ES module
#1520 backend/src/notifications/service.js: Duplicate function declaration header sendNotification
#1521 backend/src/notifications/templates.js: Malformed function closing before JSDoc comment in templates
Summary
All four fixes are syntax-level repairs. Run
node --checkon each file after editing. In email.js, note the file currently mixes CommonJS and ESM and contains a partially merged duplicate sendEmail body; consolidate into one ESM implementation rather than only swapping the export line. In templates.js, delete the malformed first getRenderedTemplate rather than trying to close it, since a complete locale-aware version already exists below.Changes
/* … truncated 5126 chars … */and fix the unmatched closing brace so the surrounding function/object nesting is balanced. Verify withnode --check backend/src/services/streaming.js(exit 0) and a smoke import to confirm the streaming payment service initializes. (backend/src/services/streaming.js)require,module.exports) with ESM (export async function sendEmail) and also contains a duplicated/mergedsendEmailimplementation with an unclosed try/catch and a strayt.sendMailblock. Rewrite the module as pure ESM: remove'use strict'/requireusage (use dynamicimport('nodemailer')as already done in createTransport), keep a single coherentsendEmailimplementation using the lazily-created transport, keepsendVerificationEmail, and replace the trailingmodule.exports = { sendEmail, sendVerificationEmail }withexport { sendVerificationEmail }(sendEmail is already exported) orexport default { sendEmail, sendVerificationEmail }. Ensure all braces are balanced. Verify withnode --check backend/src/notifications/channels/email.jsand an import smoke test. (backend/src/notifications/channels/email.js)sendNotificationfunction signature on line 75, keeping only the complete declaration that includesphoneRegionandlocaleparameters (line 74 is the truncated duplicate). Verify withnode --check backend/src/notifications/service.jsand a service initialization smoke test. (backend/src/notifications/service.js)getRenderedTemplatefunction (around line 115) is left unclosed before a JSDoc comment and is immediately followed by a second, completegetRenderedTemplatedefinition. Remove the malformed/duplicate first definition (including its stray body lines and the orphaned JSDoc fragment) so only the locale-awaregetRenderedTemplate(type, channel, data = {}, locale = 'en')remains, and ensure braces are balanced. Verify withnode --check backend/src/notifications/templates.jsand a smoke test rendering text and HTML templates. (backend/src/notifications/templates.js)