Build images / sign-extension (push) Successful in 4s
CI / lint (push) Successful in 4s
CI / extension-version (push) Successful in 5s
Build images / build-ml (push) Successful in 6s
Build images / build-agent (push) Successful in 8s
CI / frontend-build (push) Successful in 22s
CI / backend-lint-and-test (push) Successful in 35s
Build images / build-web (push) Successful in 54s
Build images / smoke-web (push) Skipped
Build images / promote (push) Skipped
CI / integration (push) Successful in 1m47s
The surface shipped at /system with no nav entry, reachable only by clicking the health dot beside the brand — a target you have to already suspect something is wrong to go looking for. Operator-flagged: it needs a path someone can walk to. Settings is where you go to ask the instance about itself, so the view becomes a tab there, beside Activity — Activity answers "what is the queue doing", System answers "is anything left to do it". - SystemView.vue moves to components/settings/SystemHealthTab.vue; the content is unchanged apart from shedding its own container and h1. - SettingsView adopts useTabQuery (the composable Browse and Subscriptions already use) so a tab can be linked TO. The health dot now points at ?tab=system, and /system redirects there so the previous build's link and any bookmark still land. - The tab drops its own 10s poll. v-window keeps a visited item mounted rather than destroyed, so that timer would have gone on firing behind Maintenance — and TopNav already polls the same store every 15s for the dot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTjbZZ6JirCMSaJzQV1RhA
57 lines
2.1 KiB
JavaScript
57 lines
2.1 KiB
JavaScript
import { describe, it, expect } from 'vitest'
|
|
import router, { FRONT_DOOR } from '../src/router.js'
|
|
|
|
describe('router', () => {
|
|
it('FRONT_DOOR defaults to /showcase', () => {
|
|
expect(FRONT_DOOR).toBe('/showcase')
|
|
})
|
|
|
|
it('/ redirects to FRONT_DOOR', async () => {
|
|
// resolve() does not follow redirects (they apply on navigation), so
|
|
// actually navigate and assert the resulting route.
|
|
await router.push('/')
|
|
expect(router.currentRoute.value.path).toBe(FRONT_DOOR)
|
|
})
|
|
|
|
it('gallery is reachable at /gallery', () => {
|
|
expect(router.resolve('/gallery').name).toBe('gallery')
|
|
})
|
|
|
|
it('showcase, artist resolve to named routes', () => {
|
|
expect(router.resolve('/showcase').name).toBe('showcase')
|
|
expect(router.resolve('/artist/some-slug').name).toBe('artist')
|
|
expect(router.resolve('/artist/some-slug').params.slug).toBe('some-slug')
|
|
})
|
|
|
|
it('browse hub is reachable and old axis paths redirect into its tabs', async () => {
|
|
expect(router.resolve('/browse').name).toBe('browse')
|
|
|
|
await router.push('/tags')
|
|
expect(router.currentRoute.value.name).toBe('browse')
|
|
expect(router.currentRoute.value.query.tab).toBe('tags')
|
|
|
|
await router.push('/artists')
|
|
expect(router.currentRoute.value.query.tab).toBe('artists')
|
|
|
|
// A posts deep link survives the redirect into the hub tab.
|
|
await router.push({ path: '/posts', query: { post_id: '7' } })
|
|
expect(router.currentRoute.value.name).toBe('browse')
|
|
expect(router.currentRoute.value.query.tab).toBe('posts')
|
|
expect(router.currentRoute.value.query.post_id).toBe('7')
|
|
})
|
|
|
|
it('/system redirects into the Settings System tab', async () => {
|
|
// It shipped as a standalone page for one build; the health dot and any
|
|
// bookmark from it must still land on the surface, which is now a tab.
|
|
await router.push('/system')
|
|
expect(router.currentRoute.value.name).toBe('settings')
|
|
expect(router.currentRoute.value.query.tab).toBe('system')
|
|
})
|
|
|
|
it('series-read is an immersive route', () => {
|
|
const r = router.resolve('/series/5/read')
|
|
expect(r.name).toBe('series-read')
|
|
expect(r.meta.immersive).toBe(true)
|
|
})
|
|
})
|