From 6c8741b314277531c89ce7cfb8160185bb5e06ac Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Thu, 28 May 2026 12:35:44 +0530 Subject: [PATCH 01/46] fix: increase audit log page size (#14582) Audit logs now return up to 25 records per page instead of 15. This reduces page turns for admins and API consumers while keeping the page size server-defined. Fixes https://linear.app/chatwoot/issue/CW-7172/allow-an-option-to-fetch-more-audit-logs --- app/javascript/dashboard/store/modules/auditlogs.js | 2 +- .../controllers/api/v1/accounts/audit_logs_controller.rb | 2 +- .../api/v1/accounts/audit_logs_controller_spec.rb | 7 +++++-- swagger/paths/application/audit_logs/index.yml | 4 ++-- swagger/swagger.json | 2 +- swagger/tag_groups/application_swagger.json | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/javascript/dashboard/store/modules/auditlogs.js b/app/javascript/dashboard/store/modules/auditlogs.js index c0970cf18..5b355736e 100644 --- a/app/javascript/dashboard/store/modules/auditlogs.js +++ b/app/javascript/dashboard/store/modules/auditlogs.js @@ -7,7 +7,7 @@ const state = { records: [], meta: { currentPage: 1, - perPage: 15, + perPage: 25, totalEntries: 0, }, uiFlags: { diff --git a/enterprise/app/controllers/api/v1/accounts/audit_logs_controller.rb b/enterprise/app/controllers/api/v1/accounts/audit_logs_controller.rb index 29e02c1dd..7c569b3f1 100644 --- a/enterprise/app/controllers/api/v1/accounts/audit_logs_controller.rb +++ b/enterprise/app/controllers/api/v1/accounts/audit_logs_controller.rb @@ -2,7 +2,7 @@ class Api::V1::Accounts::AuditLogsController < Api::V1::Accounts::EnterpriseAcco before_action :check_admin_authorization? before_action :fetch_audit - RESULTS_PER_PAGE = 15 + RESULTS_PER_PAGE = 25 def show @audit_logs = @audit_logs.page(params[:page]).per(RESULTS_PER_PAGE) diff --git a/spec/enterprise/controllers/api/v1/accounts/audit_logs_controller_spec.rb b/spec/enterprise/controllers/api/v1/accounts/audit_logs_controller_spec.rb index 8cf28f93a..7c6c69ec6 100644 --- a/spec/enterprise/controllers/api/v1/accounts/audit_logs_controller_spec.rb +++ b/spec/enterprise/controllers/api/v1/accounts/audit_logs_controller_spec.rb @@ -51,10 +51,13 @@ RSpec.describe 'Enterprise Audit API', type: :request do expect(json_response['audit_logs'][1]['action']).to eql('create') expect(json_response['audit_logs'][1]['audited_changes']['name']).to eql(inbox.name) expect(json_response['audit_logs'][1]['associated_id']).to eql(account.id) - expect(json_response['current_page']).to be(1) # contains audit log for account user as well # contains audit logs for account update(enable audit logs) - expect(json_response['total_entries']).to be(3) + expect(json_response.slice('current_page', 'per_page', 'total_entries')).to eql( + 'current_page' => 1, + 'per_page' => 25, + 'total_entries' => 3 + ) end end end diff --git a/swagger/paths/application/audit_logs/index.yml b/swagger/paths/application/audit_logs/index.yml index 8fcd22256..df7966c57 100644 --- a/swagger/paths/application/audit_logs/index.yml +++ b/swagger/paths/application/audit_logs/index.yml @@ -24,7 +24,7 @@ responses: per_page: type: integer description: Number of items per page - example: 15 + example: 25 total_entries: type: integer description: Total number of audit log entries @@ -49,4 +49,4 @@ responses: content: application/json: schema: - $ref: '#/components/schemas/bad_request_error' \ No newline at end of file + $ref: '#/components/schemas/bad_request_error' diff --git a/swagger/swagger.json b/swagger/swagger.json index 859453d89..8867bf52a 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -1649,7 +1649,7 @@ "per_page": { "type": "integer", "description": "Number of items per page", - "example": 15 + "example": 25 }, "total_entries": { "type": "integer", diff --git a/swagger/tag_groups/application_swagger.json b/swagger/tag_groups/application_swagger.json index 3eb055649..98be4a321 100644 --- a/swagger/tag_groups/application_swagger.json +++ b/swagger/tag_groups/application_swagger.json @@ -192,7 +192,7 @@ "per_page": { "type": "integer", "description": "Number of items per page", - "example": 15 + "example": 25 }, "total_entries": { "type": "integer", From 3b7b94f8d149f86a882a1aafb7ddac2ff4559b16 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 29 May 2026 10:19:41 +0530 Subject: [PATCH 02/46] fix: prevent code block overflow in message bubble (#14583) --- app/javascript/dashboard/components-next/message/Message.vue | 3 +-- .../dashboard/components-next/message/bubbles/Base.vue | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue index d738bfcc6..72477bbd8 100644 --- a/app/javascript/dashboard/components-next/message/Message.vue +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -554,11 +554,10 @@ provideMessageContext({
diff --git a/app/javascript/dashboard/components-next/message/bubbles/Base.vue b/app/javascript/dashboard/components-next/message/bubbles/Base.vue index c40d63363..457b583ea 100644 --- a/app/javascript/dashboard/components-next/message/bubbles/Base.vue +++ b/app/javascript/dashboard/components-next/message/bubbles/Base.vue @@ -95,7 +95,7 @@ const replyToPreview = computed(() => {