Skip to content

Conversation

@thlehmann-ionos
Copy link

== Merge strategy in general

To understand the conflict:

  • looking at history on both branches to understand the change that was made
  • blaming lines of both branches

To solve the conflict:

  • for larger conflicts
    • and little modifications by us: usually picking theirs and replicating our changes
    • and larger modifications by us: usually picking ours and replicating their changes
  • for smaller conflicts usually picking ours and adapting context code to align with new state (i.e. due to refactoring)

== Merge steps

  1. Conflicts solved (see above)
  2. Understanding of changes gathered
  3. TODO Auto-merges spot checked and adapted
  4. TODO Test
  5. TODO Tailwind 4 migration to customized code

== Conflicts and how they were solved

  • backend/open_webui/config.py: chose their format, our text for title generation prompt
  • backend/open_webui/env.py: merge new configs with our additions; move new configs to end of file
  • backend/open_webui/main.py: merge new configs
  • backend/open_webui/routers/auths.py: signout() chose our adaption
  • backend/open_webui/routers/users.py: imports merged to keep new imports
  • backend/open_webui/socket/main.py: removed everything the merge added as we removed it deliberately, adapt identifier name changes in left code (introduced by upstream changes)
  • backend/open_webui/utils/middleware.py: discarded their change as we removed this code deliberately
  • backend/open_webui/utils/webhook.py: imports merged to recard our customization
  • src/app.*: chose ours for everything
  • src/lib/components/chat/Chat.svelte: merged to keep our additions, but also keep their refactorings
  • src/lib/components/chat/MessageInput/InputMenu.svelte: chose theirs as we cloned this component by now and would not use this one
  • src/lib/components/chat/Messages/ResponseMessage.svelte:
    • chose removing obsolete imports from theirs
    • kept our custom model profile
    • chose their refactoring speech loading indicator, but kept changes to our conditions and icons
    • chose their refactoing of button container element, but kept our font and spacing adjustments
  • src/lib/components/chat/Messages/UserMessage.svelte: chose their refactoring, looked at our changes and replicated them afterwards
  • src/lib/components/chat/Navbar.svelte: chose ours, replicated their migrations and fixes
  • src/lib/components/common/FileItem.svelte: chose their fix, kept our restyling
  • src/lib/components/layout/Sidebar.svelte: chose ours, replicated their migrations
  • src/lib/components/layout/Sidebar/ChatItem.svelte: merged their migrations
  • src/lib/components/layout/Sidebar/ChatMenu.svelte: kept our removal of code
  • src/lib/components/layout/Sidebar/SearchInput.svelte: merged their migration
  • src/lib/components/layout/Sidebar/UserMenu.svelte: kept ours as we've implemented signout differently; discarded their "refac"
  • src/lib/stores/index.ts: merged theirs
  • src/routes/(app)/+layout.svelte: merged theirs
  • src/routes/+layout.svelte: kept ours
  • src/routes/auth/+page.svelte:
    • kept our await + return fix, but merge their redirect option
    • discard their new setLogoImage() function (not needed for our customization)
  • tailwind.config.js: kept our colors defs for gray

== Changes discovered

Relevant for our modifications.

  • Tailwind v4 migration

Cached prompts updated after generating in backend/custom_resources.

Refs: PRODAI-143
From latest revision in Phrase

Refs: PRODAI-158
* Prompt suggestions updated
* Agent descriptions updated

Refs: PRODAI-154 PRODAI-158 PRODAI-159
* Agent description changed to German
* Prompt suggestion updated

Refs: PRODAI-154 PRODAI-158 PRODAI-159
Otherwise the test wraps and the card have unequal height.

Refs: PRODAI-159
Add support to enable OIDC code challenge method (PKCE).

Refs: PRODAI-146
The change

   c4b41b0

   c/feat(root layout): route unauthenticated user to /explore

Implemented routing of unauthenticated users to /explore. This however
broke OIDC login success handling in that the /auth route can no longer
handle the passed token.

This is now fixed.

Refs: PRODAI-136 PRODAI-146
Description of "Derek" shortened

Refs: PRODAI-160
* Agent description of Derek shortend to make it fit on the card

Refs: PRODAI-160
Needed for the login/register overlay.

Refs: PRODAI-148
Prepare showing the LoginRegisterOverlay upon click if not
authenticated.

Refs: PRODAI-148
Users will be redirected to this URL when the chose "signup" (register)
on the startpage (explore).

Refs: PRODAI-148
We do not use the login/signup facility provided by Open WebUI because
it has to be integrated into the startpage (explore) and both are
external at different services.

Refs: PRODAI-148
The overlay is presented when the user has no session within Open WebUI.

If the user choses to signup the agent or prompt selection is discarded
and the user is sent to the signup URL as the user would most likely not
remember what they picked.

If the user choses to login, they're sent down the usual auth process
(/auth), which then starts OIDC.

If the user comes back through the OIDC login process it's checked
whether they went through the registration. In that case the user is
sent back to the expore page.

Refs: PRODAI-148
* Send users immediately to the OIDC login if it is configured.
* checkOauthCallback() was refactored to properly validate the
  auth state

Refs: PRODAI-148
I forgot to namespace them in

   f10aea1
   c/feat(components): add custom knowledge base manager component

Refs: PRODAI-167
…t mixup

* The code was way to complicated and indirect by mixing async/await
  and promise handling.
* A clearer exception message is now constructed
* `console.error()` is mostly redundant as an uncatched exception shows
  up in Devtool consoles anyway
* Content-Type was removed as this response (all GETs) does not send
  JSON in the body

Note:

* fetch() only rejects if the request could not be made (offline) or
  the browser is offline [1]

* `err.detail` would have been undefined for errors thrown by
  fetch() itself as there's no `detail` in a `TypeError` [2], [3]

* The function did not return response payload. This is not changed
  here, but will be changed in the next commit.

* Instead of capturing the error in the top scope and throwing it
  conditionally just returning it in `catch()` would suffice if the
  whole chain would be returned

* `console.error()` is mostly redundant as an uncatched exception shows
  up in Devtool consoles anyway

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch
[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError
[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error

Refs: PRODAI-168
== Background

When OIDC is configured, the session in Open WebUI is invalidated and
the user must be redirected to the auth server's end_session_endpoint
to invalidate the session there.

== Problem

With the previous implementation, the end_session_endpoint was sent as a
redirect to the client.

However, since the request is made as Fetch request it has to obey CORS
rules.

This would require the Auth server to set Access-Control-Allow-Origin,
which is not sensible. If this header is not set, the request would fail,
thus the logout would not be completed at the Auth server.

== Fix

Instead of sending a redirect the target URL is sent to the client,
which then can be used to change the user agent's location.

== Discarded approach

The Fetch option `redirect: manual` [1] was not chosen because it would
not change the user agent's location to the OIDC provider's logout page.

With this approach the end_session_endpoint URL would be presented to
the user.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#redirect

Refs: PRODAI-168
…y URL from variables

* Detect failed job too
* Log more infos on failed job
* Pass registry host and path as variables
* Use variable instead of distributing job name as magic strings
Colors not final.

Refs: PRODAI-144
* According to Figma
* Footer added to explore page and chat layout
* The licence text moved from the startpage (expore) to the footer
  because it has to show up on the chat too (rel. PRODAI-145)
* html, body height set to 100% to make the explore page content fit the
  viewport on smaller heights to expand the footer to the bottom

Refs: PRODAI-144 PRODAI-145
* Text and links according to story description
* Links in the license agreement text should be as subtle as possible;
  therefor the Link component has a new mode

Refs: PRODAI-145
To match Figma.

Refs: PRODAI-111
I forgot to add it when building the startpage.

Refs: PRODAI-111
thlehmann-ionos and others added 29 commits June 20, 2025 13:46
Define modules

* $app/navigation
* $app/environment

to mute svelte-check (type check) warnings.
== Problem

Currently no caching rules are defined as headers leaving the caching up
to the browser vendor.

Unless a user makes a hard reload of the page, they may not load the
newest version of the application.

== Solution

To ensure that the entrypoints are always the newest version, caching is
explicitly prevented using Expires and Cache-Control headers.

== Paths

The configured paths are the most common places users end up and
potentially revisit the SPA from.

Refs: PRODAI-51
Change to new argreed-upon algorithm.

Refs: PRODAI-255
Sometimes the Job was successful but the following status check failed.
By analyzing the job status debug output it turned out that the
container status was still running.

Assumption: the container needs a couple of seconds after log following
ended to turn to status "terminated".

We now wait for it no longer be in running status.
…ledge base operations

- Uses central `clean_up_file` and `clean_up_files` functions when removing files from knowledge bases and when deleting/resetting knowledge bases
- Uses central `get_knowledge_by_id_or_raise` and `get_file_by_id_or_raise` functions when loading files or knowledge bases from database
- Standardizes error handling and access checking
- No functional changes for end users
- Fix Error for remove_file_from_knowledge_by_id

Refs: PRODAI-113, PRODAI-114

fix: moved Collection Deletion before DB entry deletion. Also fixed wrong indentation

refac(Refactor chat retrieval logic): (delete_chat_by_id) use a single-line conditional to fetch the chat by ID for admins or by ID and user ID for regular users

feat(PRODAI-114): remove files from storage/ vectordb if uploaded to chat -> on Chat delete / delete_all

feat(PRODAI-113): remove files -> User delete

feat(PRODAI-113): remove files from VectorStore
added Vector Store delete in files API
added Vector Store delete in knowledge API
Resolve NameError by prefixing HTTP_403_FORBIDDEN with status.
… lookup

this commit resolves an issue where duplicate accounts could be created if an email address was provided with upper case characters 

To ensure consistent account retrieval and prevent multiple entries for the same user, email addresses are now converted to lowercase before being used in database lookup
Refs: PRODAI-349

Signed-off-by: Kai Henseler <[email protected]>
Refs: PRODAI-324

Signed-off-by: Kai Henseler <[email protected]>
Refs: PRODAI-349, PRODAI-331

Signed-off-by: Kai Henseler <[email protected]>
Refs: PRODAI-325

Signed-off-by: Kai Henseler <[email protected]>
…descriptions

Refs: PRODAI-349

Signed-off-by: Kai Henseler <[email protected]>
…ter descriptions)

Refs: PRODAI-364, PRODAI-363

Signed-off-by: Kai Henseler <[email protected]>
Refs: PRODAI-363, PRODAI-364

Signed-off-by: Kai Henseler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants