fix(ROUTING-0001): repair repo routing and isolate MCP filtering

This commit is contained in:
Giancarmine Salucci
2026-03-27 19:01:47 +01:00
parent da661efc91
commit d1381f7fc0
10 changed files with 252 additions and 644 deletions

View File

@@ -0,0 +1,27 @@
import { page } from 'vitest/browser';
import { describe, expect, it, vi } from 'vitest';
import { render } from 'vitest-browser-svelte';
import RepositoryCard from './RepositoryCard.svelte';
describe('RepositoryCard.svelte', () => {
it('encodes slash-bearing repository ids in the details href', async () => {
render(RepositoryCard, {
repo: {
id: '/facebook/react',
title: 'React',
description: 'A JavaScript library for building user interfaces',
state: 'indexed',
totalSnippets: 1234,
trustScore: 9.7,
stars: 230000,
lastIndexedAt: null
} as never,
onReindex: vi.fn(),
onDelete: vi.fn()
});
await expect
.element(page.getByRole('link', { name: 'Details' }))
.toHaveAttribute('href', '/repos/%2Ffacebook%2Freact');
});
});