iachat/app/models
Gabriel Jablonski 5cc78c7b33
feat(super-admin): hide assignee tabs for basic agents (#279)
* fix(featurable): backport feature_flag_value helper from chatwoot-pro-main

Adds the two's-complement-aware helper that returns a signed bigint-safe
value for SQL queries against the feature_flags column. Mirrors the
existing helper in chatwoot-pro-main so future backports of pro features
that reference it (e.g. kanban filters) compile cleanly on main.

Note: the helper does NOT fix FlagShihTzu's write path; new account-level
toggles should use account.settings jsonb instead of feature_flags
(see AGENTS.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(super-admin): toggle to hide assignee tabs for basic agents

Adds two account-level settings, configurable from the super admin
dashboard, that hide the "Unassigned" and "All" tabs of the conversation
list for users with the basic agent role (admins and custom roles are
unaffected). Hiding "Unassigned" implicitly hides "All", since seeing
the full queue without the unassigned subset is incoherent. The
constraint is enforced both in the backend (before_validation forces
hide_agent_all_tab=true when hide_agent_unassigned_tab is on) and in
the super admin form (the "All" checkbox is disabled and auto-checked
when "Unassigned" is checked).

Storage uses account.settings (jsonb) instead of feature_flags to
sidestep the bigint bit-position overflow that happens once features.yml
crosses 64 entries, and to keep keys stable across the main and
chatwoot-pro-main forks where feature bit positions diverge. AGENTS.md
documents the rationale and the recipe to add future toggles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(chat-list): guard activeAssigneeTabCount against missing tab

When the visibility settings hide the currently selected tab, the
fallback watch resets activeAssigneeTab to ME, but activeAssigneeTabCount
re-evaluates in the same reactive cycle and can read .count on undefined
before the watch flushes. Use optional chaining + nullish fallback so
the count safely returns 0 during the brief inconsistency.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:25:45 -03:00
..
channel feat(whatsapp): convert inbox between WhatsApp providers (#268) 2026-04-18 20:57:27 -03:00
concerns feat(super-admin): hide assignee tabs for basic agents (#279) 2026-04-30 16:25:45 -03:00
integrations Revert "chore: Upgrade Rails to 7.2.2 and update Gemfile dependencies (#11037)" 2026-02-03 21:09:42 -08:00
internal_chat feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
access_token.rb Feature: Access tokens for API access (#604) 2020-03-11 00:02:15 +05:30
account_user.rb feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
account.rb feat(super-admin): hide assignee tabs for basic agents (#279) 2026-04-30 16:25:45 -03:00
agent_bot_inbox.rb Feature: Access tokens for API access (#604) 2020-03-11 00:02:15 +05:30
agent_bot.rb feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
application_record.rb feat(mailer): add i18n support for transactional emails with pt-BR (#255) 2026-04-03 15:48:52 -03:00
article.rb Merge branch 'main' into chore/merge-4.13.0 2026-04-17 16:23:47 -03:00
assignment_policy.rb chore(annotations): sync model annotations with current schema (#12245) 2025-08-20 20:23:42 +02:00
attachment.rb Merge branch 'main' into chore/merge-4.13.0 2026-04-17 16:23:47 -03:00
automation_rule.rb Merge branch 'main' into chore/merge-4.13.0 2026-04-17 16:23:47 -03:00
campaign.rb Merge branch 'main' into chatwoot/develop 2025-07-16 09:37:08 -03:00
canned_response.rb chore: Apply fixes for items in rubocop_todo [CW-1806] (#8864) 2024-02-07 13:36:04 +04:00
category.rb feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
contact_inbox.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
contact.rb feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
conversation_participant.rb chore: Add controllers for conversation participants (#6462) 2023-02-15 16:33:31 -08:00
conversation.rb fix(conversations): enforce NOT NULL on contact_id + cleanup orphans (#273) 2026-04-22 13:57:40 -03:00
csat_survey_response.rb fix: Annotaterb model annotation incomplete migration (#13132) 2026-03-25 17:51:06 -07:00
custom_attribute_definition.rb feat: harden filter service 2026-03-09 21:19:20 +05:30
custom_filter.rb chore: Increase custom filter limit from 50 to 1000 per user (#12603) 2025-10-06 10:41:26 -07:00
dashboard_app.rb feat: dashboard apps on sidebar (#146) 2025-11-19 14:44:18 -03:00
data_import.rb chore: Add delay before running dataimport job (#8039) 2023-10-03 22:18:57 -07:00
email_template.rb chore: upgrade ruby version to 3.4.4 (#11524) 2025-05-21 19:40:07 +05:30
folder.rb feat: Portal endpoint (#4633) 2022-05-16 13:59:59 +05:30
group_member.rb feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
inbox_assignment_policy.rb feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
inbox_member.rb feat: auditlog for team and inbox member updates (#7516) 2023-08-15 19:55:19 -07:00
inbox_signature.rb feat: add per-inbox signature management (#226) 2026-02-26 19:53:03 -03:00
inbox.rb feat: schedule messages recurrence (#240) 2026-03-19 22:51:14 -03:00
installation_config.rb fix(installation_config): restore coder that accepts both jsonb hash and YAML string 2026-04-17 23:48:46 -03:00
integrations.rb Feature: Slack integration (#783) 2020-06-12 23:12:47 +05:30
jsonb_attributes_length_validator.rb Fix: added validation for custom and additional attribute (#4260) 2022-03-24 15:38:28 +05:30
kbase.rb Feature: Knowledge Base APIs (#1002) 2020-09-26 02:32:34 +05:30
label.rb feat: multiple UX improvements to labels (#7358) 2023-06-25 18:49:49 +05:30
macro.rb fix: add explicit remove assignment actions to macros and automations (#12172) 2026-04-16 15:57:41 +05:30
mention.rb fix: Notification page breakages (#5236) 2022-08-10 13:46:46 +02:00
message.rb Merge branch 'main' into chore/merge-4.13.0 2026-04-17 16:23:47 -03:00
note.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
notification_setting.rb fix: Specify external db with non-standard port (#2711) 2021-07-28 19:36:51 +05:30
notification_subscription.rb fix: Change the column identifier from string to text to avoid overflow (#9073) 2024-03-07 11:13:01 +05:30
notification.rb fix: pass serialized data in notification.deleted event to avoid Deserialisation (#13061) 2026-01-12 13:15:40 +05:30
platform_app_permissible.rb fix: SuperAdmin Improvements (#3733) 2022-01-11 19:00:00 -08:00
platform_app.rb Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249) 2021-11-18 10:32:29 +05:30
portal.rb Merge branch 'chatwoot/develop' into chore/merge-upstream-4.12.0 2026-03-20 00:27:45 -03:00
recurring_scheduled_message.rb feat: schedule messages recurrence (#240) 2026-03-19 22:51:14 -03:00
related_category.rb feat: CRUD operation for associated articles to current article (#4912) 2022-07-04 20:29:44 +05:30
reporting_event.rb fix: Annotaterb model annotation incomplete migration (#13132) 2026-03-25 17:51:06 -07:00
reporting_events_rollup.rb feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
scheduled_message.rb feat: schedule messages recurrence (#240) 2026-03-19 22:51:14 -03:00
super_admin.rb feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
team_member.rb feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
team.rb chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -03:00
user.rb fix(mailer): fall back to user account for devise email locale (#267) 2026-04-17 21:58:08 -03:00
webhook.rb Merge branch 'main' into chore/merge-4.13.0 2026-04-17 16:23:47 -03:00
working_hour.rb chore: Replace deprecated functions (#5611) 2022-10-12 14:55:59 -07:00