[PR #22849] [CLOSED] fix: use SvelteKit client-side navigation for Playground and Admin Panel menu items #42516

Closed
opened 2026-04-25 14:23:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22849
Author: @voidborne-d
Created: 3/19/2026
Status: Closed

Base: mainHead: fix/user-menu-spa-navigation


📝 Commits (1)

  • b357274 fix: use SvelteKit goto() for Playground and Admin Panel navigation

📊 Changes

1 file changed (+2 additions, -6 deletions)

View changed files

📝 src/lib/components/layout/Sidebar/UserMenu.svelte (+2 -6)

📄 Description

Summary

Fixes #22733 — Full Page Reload on User Menu Playground and Admin Panel Navigation.

Problem

The Playground and Admin Panel buttons in the user dropdown menu use DropdownMenu.Item with as="a" and href="/playground" / href="/admin". This renders native <a> tags that trigger full-page navigation instead of SvelteKit client-side routing.

Fix

Removed as="a", href, and draggable attributes from both menu items and added goto() calls (already imported) inside the existing on:click handlers. This ensures client-side SPA navigation without full page reloads.

Changes

  • Playground button: Replaced <a href="/playground"> with goto('/playground') in click handler
  • Admin Panel button: Replaced <a href="/admin"> with goto('/admin') in click handler

Testing

  1. Log in as admin
  2. Click user avatar → Playground — should navigate without page reload
  3. Click user avatar → Admin Panel — should navigate without page reload
  4. Verify mobile behavior (sidebar closes + navigates correctly)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22849 **Author:** [@voidborne-d](https://github.com/voidborne-d) **Created:** 3/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/user-menu-spa-navigation` --- ### 📝 Commits (1) - [`b357274`](https://github.com/open-webui/open-webui/commit/b3572741a463f944efdb3cd8c3e72fb9b4454170) fix: use SvelteKit goto() for Playground and Admin Panel navigation ### 📊 Changes **1 file changed** (+2 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/layout/Sidebar/UserMenu.svelte` (+2 -6) </details> ### 📄 Description ## Summary Fixes #22733 — Full Page Reload on User Menu `Playground` and `Admin Panel` Navigation. ## Problem The `Playground` and `Admin Panel` buttons in the user dropdown menu use `DropdownMenu.Item` with `as="a"` and `href="/playground"` / `href="/admin"`. This renders native `<a>` tags that trigger full-page navigation instead of SvelteKit client-side routing. ## Fix Removed `as="a"`, `href`, and `draggable` attributes from both menu items and added `goto()` calls (already imported) inside the existing `on:click` handlers. This ensures client-side SPA navigation without full page reloads. ### Changes - **Playground button**: Replaced `<a href="/playground">` with `goto('/playground')` in click handler - **Admin Panel button**: Replaced `<a href="/admin">` with `goto('/admin')` in click handler ## Testing 1. Log in as admin 2. Click user avatar → Playground — should navigate without page reload 3. Click user avatar → Admin Panel — should navigate without page reload 4. Verify mobile behavior (sidebar closes + navigates correctly) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 14:23:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42516