iachat/spec/controllers
Cayo P. R. Oliveira c6f9e814c2
feat: add customizable signature position and separator options (#78)
* feat: add customizable signature position and separator options

* fix: correct default value note for signatureSeparator and ensure reactivity

* fix: correct watcher boolean conversion and add immediate ui_settings updates

- Fix watchers to convert string props to boolean values for reactive refs
- Add immediate event handlers for switch changes to update ui_settings in real-time
- Ensure proper synchronization between switch states and user.ui_settings

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: split signature content and ui_settings updates to resolve persistence bug

- Use updateUISettings store action for signature_position and signature_separator
- Keep updateProfile for message_signature content only
- Fixes FormData serialization issue that corrupted nested ui_settings object
- Add diagnostic logging to verify data flow

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* clean: remove diagnostic console logging from updateSignature method

- Remove temporary console.log statements added for verification
- Keep core implementation that splits signature content and ui_settings updates
- Keep console.error for proper error handling with eslint-disable comment
- Implementation now ready for production use

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: updateUISettings call in updateSignature method

* chore: move signature application to send-time and add button highlighting (#79)

* fix: move signature application from editor manipulation to send-time

- Remove addSignature/removeSignature/toggleSignatureInEditor from WootWriter
- Remove signature logic from draft handling and canned response insertion
- Apply signatures only in getMessagePayload during message sending
- Add button highlighting for signature toggle when activated
- Prevents signature duplication and persistence in editor content
- Fixes signature position toggle bug

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: escape signature separator to prevent markdown setext heading interpretation

- Escape '--' separator as '\--' in appendSignature to prevent H2 heading creation
- Update removeSignature to handle escaped separators correctly
- Fixes signature separator being rendered as markdown instead of plain text
- Refactor nested ternary to fix ESLint error

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: prevent signature separator markdown interpretation in message processing

- Add fix_signature_separator_markdown method to escape '--' separators
- Update ensure_processed_message_content to fix separators before saving
- Prevents signature separators from being interpreted as setext headings
- Ensures correct message display in channels and email notifications

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: update separator format to use \n--\n instead of escaping

- Change separator delimiter from '\--' to '\n--\n' format
- Update removeSignature function to handle new separator format correctly
- Simplify message processing since separators are already properly formatted
- Ensures consistent separator handling across frontend and backend

Co-Authored-By: cayo@fazer.ai <cayoproliveira@gmail.com>

* fix: update signature delimiter format to include extra new lines

* chore: remove comment about signature application logic

* refactor: remove unused method and comments related to signature separator markdown processing

* chore: simplify slash command detection by using updatedMessage directly

* refactor: remove signature logic from draft message handling

* refactor: simplify body empty check by removing signature manipulation logic

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: cayo@fazer.ai <cayoproliveira@gmail.com>

* refactor: extract signature settings logic into a separate method

* fix: handle nil ui_settings in signature position and separator methods

* fix: update return value of findSignatureInBody to include position information

* fix: update signature handling in findSignatureInBody and related methods

* fix: adjust delimiter length handling in removeSignature function

* test: add cases for appending, removing, and replacing signatures with various separators

* test: add cases for signature position and separator handling

* test: add cases for updating signature position and separator in ui_settings

* fix: correct typo in comment for findSignatureInBody function

* refactor: simplify translation function calls in MessageSignature component

* chore: refactoring

* chore: refactor

* feat: switch -> select

* chore: refactor and undo changes

* chore: refactor and undo changes

* chore: refactor

* fix: remove old select component usage

* chore: remove useless style

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
2025-08-17 23:01:41 -03:00
..
api feat: add customizable signature position and separator options (#78) 2025-08-17 23:01:41 -03:00
concerns feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
devise feat: move Slack config to installation settings (#11548) 2025-05-23 01:07:35 -07:00
google refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
instagram feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
installation chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
linear feat: Linear OAuth 2.0 (#10851) 2025-02-27 18:15:53 +05:30
microsoft refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
notion feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
platform/api/v1 feat: Ability to access user tokens via Platform API (#11537) 2025-05-22 11:30:04 +05:30
public/api/v1 Merge branch 'main' into chatwoot/develop 2025-07-16 09:37:08 -03:00
service chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
shopify feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
super_admin Merge branch 'main' into chatwoot/develop 2025-07-16 09:37:08 -03:00
twilio chore: Move Twilio event processing to background job (#11094) 2025-03-15 13:51:08 -07:00
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
webhooks test: fix spec 2025-04-25 17:16:50 -03:00
.keep Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
android_assetlinks_spec.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller_spec.rb feat: add chatwoot instance status in superadmin (#6045) 2023-01-30 18:37:51 +05:30
apple_app_spec.rb chore: Configure iOS universal linking (#10651) 2025-01-08 21:25:11 +05:30
dashboard_controller_spec.rb fix: Avoid throwing 406 for non-json requests (#11701) 2025-06-10 15:12:32 -04:00
microsoft_controller_spec.rb fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
slack_uploads_controller_spec.rb fix: Set avatar for users(agent/contact) in slack channels (#7960) 2023-09-26 09:38:14 +05:30
swagger_controller_spec.rb Chore: Swagger Docs V1 (#546) 2020-02-23 12:54:29 +05:30
widget_tests_controller_spec.rb [Feature] Email collect message hooks (#331) 2020-01-09 13:06:40 +05:30
widgets_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30