Fix support ticket creation and add email management#57
Merged
warengonzaga merged 12 commits intodevfrom Jul 15, 2025
Merged
Conversation
Member
Author
|
The only missing piece here is that the view email does not show the dummy email via |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances support ticket creation by integrating email management, standardizing validations, and improving message rendering.
- Introduces email management utilities (
validateEmail,generateDummyEmail, preferences) and adds/setemail&/viewemailcommands. - Refactors support flow to include interactive email setup for first-time users and replaces manual Markdown escaping with a shared utility.
- Adds both advanced (
SmartInputValidator) and simple (SimpleInputValidator) validation modules and robust template rendering with error checks.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/smartValidators.ts | Adds advanced input validator with educational feedback |
| src/utils/simpleValidators.ts | Adds streamlined validator for enterprise users |
| src/utils/markdownEscape.ts | Introduces shared Markdown escaping utilities |
| src/utils/emailManager.ts | Implements email validation, dummy generation, and preference management |
| src/index.ts | Registers new /setemail and /viewemail commands |
| src/handlers/webhookMessage.ts | Replaces inline escaping with escapeMarkdown utility |
| src/config/globalTemplates.ts | Updates ticket_created template content |
| src/commands/support/SupportCommandClean.ts | Streamlines ticket flow, adds email checks |
| src/commands/processors/ConversationProcessors.ts | Refactors summary & confirmation flow, uses simple validator |
| src/commands/processors/CallbackProcessors.ts | Adds callbacks for email setup, temp/upgrade flows |
| src/commands/index.ts | Registers SetEmailCommand and ViewEmailCommand |
| src/commands/basic/ViewEmailCommand.ts | Implements /viewemail command |
| src/commands/basic/SetEmailCommand.ts | Implements /setemail command |
Comments suppressed due to low confidence (2)
src/utils/smartValidators.ts:1
- New utility functions in this file lack accompanying unit tests. Consider adding tests to cover validation logic and quality analysis methods.
/**
src/utils/smartValidators.ts:215
- [nitpick] The property name hasKeywords duplicates hasTechnicalTerms semantically, causing confusion. Consider consolidating to a single property for clarity.
hasKeywords: hasTechnicalTerms,
4b3b595 to
f8f7957
Compare
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.
This pull request introduces significant updates to the WG Code Builder chat mode and adds two new bot commands for managing user email settings. The changes enhance functionality, improve clarity in user interactions, and expand the bot's capabilities for email management.
Updates to WG Code Builder Chat Mode:
.github/chatmodes/WG Code Builder.chatmode.md: Revised the chat mode description and mission to focus on practical development and guidance rather than education. Updated terminology to emphasize implementation and value-driven insights, aligning communication style and principles with practical wisdom.New Commands for Email Management:
src/commands/basic/SetEmailCommand.ts: Added theSetEmailCommandto allow users to set or update their email address. Includes validation, direct email setup, interactive setup, and handling of pending agent messages for improved user experience.src/commands/basic/ViewEmailCommand.ts: Added theViewEmailCommandto display the user's current email settings, including temporary or personal email types, with actionable recommendations.Integration of New Commands:
src/commands/index.ts: Imported theSetEmailCommandandViewEmailCommandinto the command registry and initialized them for use within the bot. [1] [2]