Files
calendar/packages
25f7381393 fix: add ensureProtocol helper to handle URLs without protocol (#26667)
* fix(event-types): keep slug in sync with title until manually edited

Changed from checking `touchedFields` to `dirtyFields` when deciding
whether to sync the slug with the title. This fixes the issue where
merely focusing on the slug field would stop the sync, even if the
user didn't actually edit it.

Now the slug stays in sync with the title until the user actually
modifies the slug value.

Note: The hardcoded "Slug" label for platform users was preserved from
the original code. Localizing it would be a separate enhancement.

Fixes #26265

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add ensureProtocol helper to handle URLs without protocol

Some container orchestration tools (like Coolify) strip the protocol
from URL environment variables. This causes `new URL()` to throw
`ERR_INVALID_URL` because strings like "sub.domain.com" are invalid
without a protocol prefix.

This fix adds an `ensureProtocol` helper function that:
- Returns empty string for null/undefined URLs
- Preserves URLs that already have http:// or https://
- Prepends https:// to URLs missing the protocol

Applied to WEBAPP_URL, WEBSITE_URL, and CAL_URL env var parsing.

Fixes #25774

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Clarify URL protocol handling in comments

Updated comment to clarify handling of URLs.

* Refactor slug handling in CreateEventTypeForm

---------

Co-authored-by: simiondolha <simiondolha@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2026-01-16 16:03:32 +00:00
..
2026-01-16 13:29:25 +00:00
2026-01-15 16:46:09 +00:00