Skip to content

Conversation

@toger5
Copy link
Contributor

@toger5 toger5 commented Nov 27, 2025

The overwrite option currently can brick your element call and you need to update the local store manually. This PR automatically resets the overwrite url if it errored once while trying to get the livekit focus. (auto fallback to nen dev overwrite)

Screenshot 2025-11-27 at 15 08 25 Screenshot 2025-11-27 at 15 08 29 Screenshot 2025-11-27 at 15 08 34

@toger5 toger5 added the PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository. label Nov 27, 2025
Copy link
Member

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do better UX here.

@toger5 toger5 requested a review from Half-Shot December 8, 2025 08:56
@toger5 toger5 marked this pull request as ready for review December 8, 2025 08:56
@toger5 toger5 requested a review from a team as a code owner December 8, 2025 08:56
@toger5
Copy link
Contributor Author

toger5 commented Dec 11, 2025

@Half-Shot I updated this PR so it now checks before setting the value.

}

try {
logger.debug("try setting");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume all these debug logs will go before merge?

customLivekitUrlTextBuffer === null
) {
setCustomLivekitUrl(null);
return Promise.resolve();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to return an explicit resolve in an async function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time I did not have the async call below this was needed i suspect ;) thanks for catching it.

await getSFUConfigWithOpenID(
client,
customLivekitUrlTextBuffer,
"Test-room-alias-" + Date.now().toString() + client.getUserId(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Test-room-alias-" + Date.now().toString() + client.getUserId(),
`Test-room-alias-${Date.now()}${client.getUserId()}`,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the room alias thing about, btw?

Copy link
Contributor Author

@toger5 toger5 Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be any id lk should use. But I am not sure the jwt service will use it for checking if we are part of the room. its saver to set this to the actual roomId.

} catch (e) {
logger.error("failed setting", e);
setCustomLivekitUrlUpdateError("invalid URL (did not update)");
// automatically unset the error after 4 seconds (2 seconds will be for the save label)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an unusual thing to do? Usually inputs change the error state when the value changes, 4 seconds isn't even enough time to understand the error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since you're not cancelling the timeout, you'll have these stack up if you try to save within that 2 second window.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it should be fine to just show the error until the user has actually entered sth reasonable.
I was worried it might be confusing what is actually set right now if the control shows an error. But probably users will change it until they have set it to sth that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants