mirror of
https://github.com/mudler/LocalAI.git
synced 2026-06-19 14:19:16 -04:00
* feat(ui): restructure sidebar into Create/Recognition/Build tiers Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): preserve exact sidebar gating for agent items and fine-tune/quantize Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * i18n(ui): add nav tier + console keys to all locales Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): add grouped admin console via pathless layout route Wrap the existing admin pages in a pathless AdminConsoleLayout route so they keep their exact flat URLs while gaining a grouped left rail (Inference / Cluster / Observability / Access / System). Rail item gating mirrors the sidebar (adminOnly / authOnly / feature + /api/features). The layout forwards the App-level outlet context (addToast) to the wrapped pages, which read it via useOutletContext(). Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): fold Audio Transform into Studio as a tab Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(ui): update e2e specs for tiered nav + admin console Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): gate embedded Studio transform view on audio_transform feature Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): visual polish + console-ize Build/Recognition tiers Generalize the one-off admin console into a reusable ConsoleLayout driven by a shared consoleConfig (single source of truth for the rail, its gating, and the sidebar entry that opens it — removes the prior rail/sidebar drift). - Promote Install Models to the top menu next to Home. - Build and Operate are now console tiers (secondary rail); Create stays inline. - Fold Recognition (Faces/Voices) into the Build console as a group alongside Automation and Training so it no longer feels split off. - Style the console rail as a panel (header, grouped dividers, rounded active pills) with a hover nudge; sidebar items become inset rounded pills. The rail slide-in plays only when entering a console, not on item-to-item sub-nav (which remounts the layout), so switching no longer flashes the menu. All token-based (light + dark), respects reduced-motion. - Add a delayed RouteFallback loader so lazy routes no longer flash blank; scoped inside ConsoleLayout so the rail stays put while the body loads. - Update e2e specs for the new structure (.console-* classes, console entries). Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): persist console layout across sub-nav + add drop-in endpoint section - Keep the page-transition key stable within a console (derived from the shared console config) so the ConsoleLayout and its rail persist across item-to-item navigation instead of remounting — fixes the submenu flash. Cache /api/features across mounts and play the rail entrance animation only when actually entering a console. - Add a "One endpoint, every API" section to Home: leads with LocalAI's own native API (images, video, realtime voice over WebRTC/WS, depth, object detection, rerank, audio/TTS, face & voice recognition) plus a Full API reference link, then the drop-in compatibility layer (OpenAI, Anthropic, Ollama, OpenAI Responses) with the live copyable base URL. All 7 locales. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ui): revert Middleware nav label rename (keep Middleware in all locales) Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
57 lines
2.5 KiB
JavaScript
57 lines
2.5 KiB
JavaScript
import { test, expect } from './coverage-fixtures.js'
|
|
|
|
test.describe('Navigation', () => {
|
|
test('/ redirects to /app', async ({ page }) => {
|
|
await page.goto('/')
|
|
await expect(page).toHaveURL(/\/app/)
|
|
})
|
|
|
|
test('/app shows the home page', async ({ page }) => {
|
|
await page.goto('/app')
|
|
await expect(page.locator('.sidebar')).toBeVisible()
|
|
await expect(page.locator('.home-page')).toBeVisible()
|
|
})
|
|
|
|
test('top menu exposes Home and Install Models', async ({ page }) => {
|
|
await page.goto('/app')
|
|
await expect(page.locator('.sidebar-nav a.nav-item[href="/app"]')).toBeVisible()
|
|
await expect(page.locator('.sidebar-nav a.nav-item[href="/app/models"]')).toBeVisible()
|
|
})
|
|
|
|
test('Create stays an inline tier with Chat, Studio and Talk', async ({ page }) => {
|
|
await page.goto('/app')
|
|
await expect(page.locator('.sidebar-section-title', { hasText: 'Create' })).toBeVisible()
|
|
await expect(page.locator('.sidebar-nav a.nav-item[href="/app/chat"]')).toBeVisible()
|
|
await expect(page.locator('.sidebar-nav a.nav-item[href="/app/studio"]')).toBeVisible()
|
|
await expect(page.locator('.sidebar-nav a.nav-item[href="/app/talk"]')).toBeVisible()
|
|
})
|
|
|
|
test('Build is a single entry that opens the Build console', async ({ page }) => {
|
|
await page.goto('/app')
|
|
const build = page.locator('.sidebar-nav a.nav-item', { hasText: 'Build' })
|
|
await expect(build).toBeVisible()
|
|
await build.click()
|
|
await expect(page.locator('.console-rail .console-rail-header', { hasText: 'Build' })).toBeVisible()
|
|
})
|
|
|
|
test('Operate is a single entry that opens the admin console', async ({ page }) => {
|
|
await page.goto('/app')
|
|
const operate = page.locator('.sidebar-nav a.nav-item', { hasText: 'Operate' })
|
|
await expect(operate).toBeVisible()
|
|
await operate.click()
|
|
await expect(page.locator('.console-rail .console-rail-header', { hasText: 'Operate' })).toBeVisible()
|
|
})
|
|
|
|
test('Build console groups Automation, Training and Recognition', async ({ page }) => {
|
|
await page.goto('/app/agents')
|
|
const rail = page.locator('.console-rail')
|
|
await expect(rail).toBeVisible()
|
|
for (const group of ['Automation', 'Training', 'Recognition']) {
|
|
await expect(rail.locator('.console-group-title', { hasText: group })).toBeVisible()
|
|
}
|
|
// Recognition (Faces/Voices) and Training (Fine-tune/Quantize) live here now.
|
|
await expect(rail.locator('a.nav-item[href="/app/fine-tune"]')).toBeVisible()
|
|
await expect(rail.locator('a.nav-item[href="/app/face"]')).toBeVisible()
|
|
})
|
|
})
|