When creating an inbox, `usage_limits` eagerly computes captain limits even though only the `:inboxes` value is needed. If `total_count` in `get_captain_limits` resolves to a negative number, `clamp(0, negative)` raises `ArgumentError: min argument must be less than or equal to max argument`, causing a 500 on inbox creation. Ensure `total_count` is floored at 0 so the clamp range is always valid. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| account | ||
| audit | ||
| concerns | ||
| account_user.rb | ||
| account.rb | ||
| activity_message_handler.rb | ||
| application_record.rb | ||
| audit_log.rb | ||
| automation_rule.rb | ||
| channelable.rb | ||
| conversation.rb | ||
| inbox_agent_availability.rb | ||
| inbox.rb | ||