open-webui/backend/open_webui
Your Full Name 89eb880b88 feat: granular webhook events + chat bubble CSS fix
Webhook: Granular event support (closes #1240)

Problem: WEBHOOK_URL accepted only one endpoint that fired for all
events (signup only). No way to route events to different endpoints.

Solution:
- Added WEBHOOK_EVENTS constant (signup, oauth_signup, signin, signout,
  user_deleted, user_role_changed)
- Added _parse_webhook_config() in webhook.py supporting three formats:
  1. Legacy single URL (no admin change needed, backwards-compatible)
  2. Newline/comma-separated JSON objects with optional events filter
  3. Full JSON array format
- Added post_webhook_event() dispatcher with event-scope filtering;
  URLs with events=null act as catch-all (preserves legacy behaviour)
- Updated auths.py: both signup paths now call post_webhook_event
  with event='signup'
- Updated oauth.py: OAuth signup uses post_webhook_event with
  event='oauth_signup' and includes provider name in payload

Example extended config:
  [{"url": "https://slack.com/...", "events": ["signup"]},
   {"url": "https://discord.com/..."}]

Chat Bubbles: Fix widescreen layout overflow (closes #5975)

Problem: In bubble mode, messages with YAML/JSON code blocks stretched
the bubble to full viewport width. The inner wrapper had min-w-full
applied unconditionally, forcing the flex container to full width.

Fix: Changed min-w-full to conditional in UserMessage.svelte:
  - Bubble mode: min-w-0 (lets flex child shrink, bubble hugs content)
  - Classic mode: min-w-full (unchanged, full-width layout preserved)

Tests: Added 15 unit tests in test/util/test_webhook.py covering
_parse_webhook_config (formats, edge cases) and post_webhook_event
(event filtering, catch-all, payload injection, backwards compat).
2026-05-24 18:13:09 +05:30
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-05-21 16:25:25 +04:00
migrations refac 2026-05-21 15:29:49 +04:00
models refac 2026-05-21 17:48:28 +04:00
retrieval refac 2026-05-21 16:44:36 +04:00
routers feat: granular webhook events + chat bubble CSS fix 2026-05-24 18:13:09 +05:30
socket fix: resolve NameError for redis_sentinels in session_cleanup_lock 2026-05-21 13:41:21 +04:00
static refac 2026-05-12 03:04:35 +09:00
storage refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
test/util feat: granular webhook events + chat bubble CSS fix 2026-05-24 18:13:09 +05:30
tools refac 2026-05-21 16:44:36 +04:00
utils feat: granular webhook events + chat bubble CSS fix 2026-05-24 18:13:09 +05:30
__init__.py refac 2026-05-09 02:38:08 +09:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-05-21 16:56:56 +04:00
constants.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
env.py refac 2026-05-20 00:22:27 +04:00
functions.py fix: emit [DONE] for AsyncGenerator pipe returns (#24763) 2026-05-19 22:07:56 +04:00
main.py refac 2026-05-21 16:56:56 +04:00
tasks.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00