iachat/enterprise
Gabriel Jablonski 05e0d355dd
fix(captain): prevent clamp ArgumentError when captain limits are negative (#242)
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>
2026-03-19 20:51:04 -03:00
..
app fix(captain): prevent clamp ArgumentError when captain limits are negative (#242) 2026-03-19 20:51:04 -03:00
config feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
lib fix: Captain not responding to campaign conversations (#13489) 2026-02-12 10:07:56 +05:30
LICENSE chore: update EE LICENCE year (#11344) 2025-04-21 15:29:55 +05:30
tasks_railtie.rb fix: Search rake task causing Rails boot error (#12416) 2025-09-15 22:21:59 +05:30