forked from chatwoot/chatwoot
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: version 3.12 #46
Open
jderecho
wants to merge
374
commits into
staging
Choose a base branch
from
master-staging
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Fixes https://linear.app/chatwoot/issue/CW-3497/instagram-outgoing-attachments-are-not-rendering It seems like Instagram outgoing attachment rendering has been broken for a long time. We couldn't identify the issue because the check below only inspects Instagram mentions. ``` metadata[:data_url] = metadata[:thumb_url] = external_url if message.instagram_story_mention? ``` We recently worked on adding the [Instagram CDN URL for attachments.](chatwoot#9287) After that, it started using external URLs as attachment data URLs for both outgoing and incoming attachments. The rendering broken for all the outgoing attachments since there were no external URLs, making the data URL empty. Adding an incoming message check will solve the issue. --------- Co-authored-by: Sojan <[email protected]>
…woot#9871) - Generate SSO URL in Chatwoot, move Captain to the primary tab Co-authored-by: Pranav <[email protected]>
Use `InstallationConfig.where(name: 'CAPTAIN_APP_URL')` instead of `ENV.fetch('CAPTAIN_APP_URL', '')`
# Pull Request Template ## Description This PR adds new eslint rules to the code base. **Error rules** | Rule name | Type | Files updated | | ----------------- | --- | - | | `vue/block-order` | error | ✅ | | `vue/component-name-in-template-casing` | error | ✅ | | `vue/component-options-name-casing` | error | ✅ | | `vue/custom-event-name-casing` | error | ✅ | | `vue/define-emits-declaration` | error | ✅ | | `vue/no-unused-properties` | error | ✅ | | `vue/define-macros-order` | error | ✅ | | `vue/define-props-declaration` | error | ✅ | | `vue/match-component-import-name` | error | ✅ | | `vue/next-tick-style` | error | ✅ | | `vue/no-bare-strings-in-template` | error | ✅ | | `vue/no-empty-component-block` | error | ✅ | | `vue/no-multiple-objects-in-class` | error | ✅ | | `vue/no-required-prop-with-default` | error | ✅ | | `vue/no-static-inline-styles` | error | ✅ | | `vue/no-template-target-blank` | error | ✅ | | `vue/no-this-in-before-route-enter` | error | ✅ | | `vue/no-undef-components` | error | ✅ | | `vue/no-unused-emit-declarations` | error | ✅ | | `vue/no-unused-refs` | error | ✅ | | `vue/no-use-v-else-with-v-for` | error | ✅ | | `vue/no-useless-v-bind` | error | ✅ | | `vue/no-v-text` | error | ✅ | | `vue/padding-line-between-blocks` | error | ✅ | | ~`vue/prefer-prop-type-boolean-first`~ | ~error~ | ❌ (removed this rule, cause a bug in displaying custom attributes) | | `vue/prefer-separate-static-class` | error | ✅ | | `vue/prefer-true-attribute-shorthand` | error | ✅ | | `vue/require-explicit-slots` | error | ✅ | | `vue/require-macro-variable-name` | error | ✅ | **Warn rules** | Rule name | Type | Files updated | | ---- | ------------- | ------------- | | `vue/no-root-v-if` | warn | ❎ | Fixes https://linear.app/chatwoot/issue/CW-3492/vue-eslint-rules ## Type of change - [x] New feature (non-breaking change which adds functionality) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Fayaz Ahmed <[email protected]> Co-authored-by: Muhsin Keloth <[email protected]> Co-authored-by: Shivam Mishra <[email protected]> Co-authored-by: Pranav <[email protected]>
…out (chatwoot#9888) # Pull Request Template ## Description This PR includes UI changes to dynamically add the `Shift` key to the key set `Alt+KeyP` and `Alt+KeyL` in the keyboard shortcut modal for the `QWERTZ` layout. **Context** Previously, the `Alt+L` shortcut for toggling the reply editor conflicted with the `@` symbol on the QWERTZ layout in macOS. The new `useDetectLayout` composable checks the active keyboard layout. If `QWERTZ` is detected, the shortcuts are modified to `Shift+Alt+KeyP` and `Shift+Alt+KeyL`. [PR with the functionality changes](chatwoot#9831 (comment)) Fixes https://linear.app/chatwoot/issue/PR-1095/typing-a-in-private-note-switches-to-reply-tab-with-german-keyboard ## Type of change - [x] Breaking change (fix or feature that would cause existing functionality not to work as expected) ## How Has This Been Tested? **Loom video** https://www.loom.com/share/35b741c5afc64bc58bd4e7dc5dad012d?sid=f66ca0bf-b6a7-40fc-8972-ff0cd0196a16 ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
`requiredIf('isAnEmailInbox')` was not evaluated properly. This PR fixes it by moving it to a method and using the `this.[variable]` pattern.
… correctly (chatwoot#9896) … correctly # Pull Request Template ## Description This PR fixes an issue where the key down handler in the `useKeyboardEvent` composable was not registering correctly. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
- Add a conversation auto-resolution job for the captain integration
This PR updates the design for the team listing page. This PR is part of the design revamp project for all the settings pages. Co-authored-by: Sojan Jose <[email protected]>
…ot#9784) When the chat is viewed, a function `fetchAllAttachments` is run to get all attachments for a particular conversation. This function, before updating the record creates the `attachments` property on the `chat` object in the store. If in any case this function fails, the `attachments` property is not created, and when the code reaches the `dashboard/store/modules/conversations/index.js` the error occurs This PR fixes it by ensuring that `SET_ALL_ATTACHMENTS` is always run. And it handles the default case as well --- Sentry Issue: [CHATWOOT-FRONTEND-APP-5Y](https://chatwoot-p3.sentry.io/issues/5459056982/) ``` TypeError: Cannot read properties of undefined (reading 'some') at forEach(./app/javascript/dashboard/store/modules/conversations/index.js:160:31) at Array.forEach(<anonymous>) at mutations(./app/javascript/dashboard/store/modules/conversations/index.js:159:27) at handler(./node_modules/vuex/dist/vuex.js:771:7) at forEach(./node_modules/vuex/dist/vuex.js:470:9) at Array.forEach(<anonymous>) at fn(./node_modules/vuex/dist/vuex.js:469:13) at Store.prototype._withCommit(./node_modules/vuex/dist/vuex.js:574:5) at Store.prototype.commit(./node_modules/vuex/dist/vuex.js:468:10) at this.commit(./node_modules/vuex/dist/vuex.js:420:21) at call(./app/javascript/dashboard/store/modules/conversations/actions.js:273:7) at tryCatch(./node_modules/videojs-record/dist/videojs.record.js:2868:27) at _invoke(./node_modules/videojs-record/dist/videojs.record.js:3088:32) at prototype[method](./node_modules/videojs-record/dist/videojs.record.js:2921:31) at as(/packs/js/application-cf716bca3c984faeb095.js:4:76) at as(/packs/js/application-cf716bca3c984faeb095.js:4:76) at nrWrapper(/app/accounts/81898/conversations/95:6:17817) ``` --------- Co-authored-by: Sivin Varghese <[email protected]> Co-authored-by: Sojan Jose <[email protected]> Co-authored-by: Pranav <[email protected]>
This is continuation of the design update, updates the design for audit logs listing page. --------- Co-authored-by: Sivin Varghese <[email protected]>
Fix the broken message sending due to the errors in attachment update PR chatwoot#9784 Co-authored-by: Sivin Varghese <[email protected]>
This is the continuation of the design update series. Canned responses listing page is rewritten with the design change. --------- Co-authored-by: Sivin Varghese <[email protected]> Co-authored-by: iamsivin <[email protected]> Co-authored-by: Shivam Mishra <[email protected]> Co-authored-by: Vishnu Narayanan <[email protected]>
…ile update (chatwoot#9910) This PR updates the profile settings page to completely disable the password section, including the heading, if the admin has disabled user profile updates. Previously, the section heading was shown with empty content, which caused confusion.
) # Pull Request Template ## Description This PR will replace the use of `customAttributeMixin` with `shared/helpers/Validators` helper. Fixes https://linear.app/chatwoot/issue/CW-3446/rewrite-customattributemixin-mixin-to-a-composable **Files updated** 1. widget/components/PreChat/Form.vue 2. dashboard/components/CustomAttribute.vue 3. dashboard/routes/dashboard/settings/attributes/EditAttribute.vue ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? Test the custom validation is working or not with the custom attributes. ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
# Pull Request Template ## Description This PR will replace usage of `macroMixin` with the `useMacros` composable. And updated components from option API to composition API. **Files updated** 1. dashboard/routes/dashboard/settings/macros/MacroNode.vue 2. dashboard/routes/dashboard/settings/macros/MacroEditor.vue Fixes https://linear.app/chatwoot/issue/CW-3449/rewrite-macrosmixin-mixin-to-a-composable ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? **Test cases** 1. Check whether we can create a new macro. 2. Check whether validations and error animation are working or not. 3. Ability to drag the macro files 4. Check whether the edit pages and functionality is working or not. ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
This PR is part of the settings design update series. It updates the design for the label management page. I've made a few changes to the SettingsLayout page to reduce boilerplate code.
The payload does not include last_activity_at when the conversation is created. Because of this the frontend is not able to sort the conversations when appending this. Another problem is that the last_activity_at is not always present, it is added only when a message is created, and it updates it. So this can be nil when the conversation is created, so we fallback to created_at only at the presentation layer
…dashboard-app:fetch-info (chatwoot#10342)
- Fix pnpm path in vite docker - Remove webpack files - fFx vite server port
…twoot#10366) - Fix pnpm path in rails - Fix memory issue during vite build Fixes chatwoot#10356
- Force `pnpm install` during vite docker image
The last item in the sidebar top level group has an indicator specified, the problem in our case is that the structure can be nested and have sub groups. So selecting the last item correctly can be tricky. Previous implementation relied on the using DOM queries to find the last item from a flat list of children, it would trigger on a `watch`. This was error-prone as well as non idiomatic. The new approach is CSS-only and reduces the unnecessary compute required. Codepen for reference: https://codepen.io/scmmishra/pen/yLmKNLW --------- Co-authored-by: Sivin Varghese <[email protected]>
<img width="1439" alt="Screenshot 2024-10-30 at 8 58 12 PM" src="https://github.com/user-attachments/assets/26231270-5e73-40fb-9efa-c661585ebe7c"> Fixes https://linear.app/chatwoot/project/campaign-redesign-f82bede26ca7/overview --------- Co-authored-by: Pranav <[email protected]> Co-authored-by: Shivam Mishra <[email protected]>
…text/html part is empty (chatwoot#10379) Some email clients automatically set Content-Disposition to inline for specific content types, such as images. In cases where the email body is empty, inline attachments may not display correctly due to our previous implementation. Our assumption was that these attachments are referenced within text/plain or text/html parts. Customer-reported issues, especially with Apple Mail, show emails with attachments marked as inline but without any corresponding text parts. This leads to missing attachments even though would have processed the attachment. This update introduces a check for the presence of a text part. If none exists, inline attachments are treated as regular attachments and added to the external attachments array, ensuring that all attachments display properly. <details> <summary><b>Script to update the existing emails that are already available in the system</b></summary> ```rb def update_content id message = Message.find id conversation = message.conversation message_id = message.source_id channel = message.inbox.channel authentication_type = 'XOAUTH2' imap_password = Google::RefreshOauthTokenService.new(channel: channel).access_token imap = Net::IMAP.new(channel.imap_address, port: channel.imap_port, ssl: true) imap.authenticate(authentication_type, channel.imap_login, imap_password) imap.select('INBOX') results = imap.search(['HEADER', 'MESSAGE-ID', message_id]) message_content = imap.fetch(results.first, 'RFC822').first.attr['RFC822'] mail = MailPresenter.new(Mail.read_from_string(message_content)) mail_content = if mail.text_content.present? mail.text_content[:reply] elsif mail.html_content.present? mail.html_content[:reply] end attachments = mail.attachments.last(Message::NUMBER_OF_PERMITTED_ATTACHMENTS) inline_attachments = attachments.select { |attachment| attachment[:original].inline? && mail_content.present? } regular_attachments = attachments - inline_attachments regular_attachments.each do |mail_attachment| attachment = message.attachments.new( account_id: conversation.account_id, file_type: 'file' ) attachment.file.attach(mail_attachment[:blob]) end message.save! end ``` </details>
…hatwoot#10384) This fix consists of translating the message when another user is typing on the other side. --- Co-authored-by: Pranav <[email protected]> Co-authored-by: Pranav <[email protected]>
40 % of Chatwoot's current log volume is from state transition logs generated by `rack-timeout`, which are logged at the `INFO` level. This PR reduce the noise in logs and set RACK::TIMEOUT to log at `error` level
--- Co-authored-by: Sojan <[email protected]> Co-authored-by: Pranav <[email protected]>
The proxy method adds an extra slash even if the route param has the character. It’s challenging to check the expected format on each route. The simplest solution is to check if the route param begins with a slash, and if not, append one. NB: The existing tests are sufficient to cover this case. There’s no need for an additional test to specifically test this.
Quick fix for CW-3721 until we work on a better solution
- We observed in prod for certain emails active storage blob objects were getting created with empty file name. The conversations further causes conversation and filter pages to break. This change will fix the mentioned issue. fixes: https://linear.app/chatwoot/issue/CW-3331/missing-file-name-for-some-of-the-uploads-for-emails --------- Co-authored-by: Pranav <[email protected]>
chatwoot#10416) This commit fixes the issue with Line stickers URLs to prevent certain images from failing to display. The problem was due to the use of incorrect URLs. The original URLs pointed to the `iphone` variant, which failed to load properly in some cases. The fix updates the URLs to use the `android` variant, ensuring all images are displayed correctly. ### Example: - Original (failing URL): `https://stickershop.line-scdn.net/stickershop/v1/sticker/17/iphone/sticker.png` - Fixed (working URL): `https://stickershop.line-scdn.net/stickershop/v1/sticker/17/android/sticker.png` ## How Has This Been Tested? 1. Verified the updated URLs by loading multiple Line sticker images to ensure they display correctly. 2. Tested in both local and production-like environments to confirm the fix resolves the issue. 3. Reviewed logs to ensure no additional errors are generated related to Line sticker URLs.
- add judoscaler gem to allow judoscale use in heroku environments - This will allow auto scaling for both web and worker dynos across both standard-1x/2x and performance dynos - This will scaling in response to queue time rather than response time(heroku default) - This also allows you to scale multiple dynos in and out at once, rather than scaling them one at a time, as is the default. Ref ---- 1. https://judoscale.com/ 2. https://devcenter.heroku.com/articles/judoscale
This PR adds dropdown primitives to help compose custom dropdowns across the app. The following the sample usage --------- Co-authored-by: Pranav <[email protected]>
…ot#10437) The following warning occurred since the `ChannelLeaf` component was passed extra props. This PR fixes it by passing only the required props
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.
No description provided.