feat(nav): consolidate Posts/Artists/Tags into a Browse hub
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 24s
CI / backend-lint-and-test (push) Successful in 37s
CI / integration (push) Successful in 3m13s

Posts, Artists, and Tags are the three 'browse the library by an axis'
surfaces; Subscriptions stays purely management (operator-asked 2026-06-09).
New BrowseView renders them as tabs (?tab=posts|artists|tags); only the active
tab mounts. The old standalone paths become redirects into the matching tab,
preserving deep-link query (/posts?post_id=N → /browse?tab=posts&post_id=N) and
keeping the route names so existing { name: 'posts'|'artists'|'tags' } links and
path pushes still resolve. Nav now reads Showcase · Gallery · Browse · Series ·
Subscriptions, with Settings pinned right.

Test: /browse resolves; /tags and /artists redirect into their tabs; a posts
deep link survives the redirect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 21:18:02 -04:00
parent a50902071a
commit d5d23a92f2
3 changed files with 86 additions and 16 deletions
+18 -2
View File
@@ -17,13 +17,29 @@ describe('router', () => {
expect(router.resolve('/gallery').name).toBe('gallery')
})
it('showcase, tags, artist resolve to named routes', () => {
it('showcase, artist resolve to named routes', () => {
expect(router.resolve('/showcase').name).toBe('showcase')
expect(router.resolve('/tags').name).toBe('tags')
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('series-read is an immersive route', () => {
const r = router.resolve('/series/5/read')
expect(r.name).toBe('series-read')