Merge branch 'pr2447' into triage/docs-misc

This commit is contained in:
Palash Debnath
2026-10-01 18:43:29 +05:30
3 changed files with 13 additions and 17 deletions
+1
View File
@@ -86,6 +86,7 @@ metadata and the backend fallback mirror it.
- The Twilio guide and integration directory describe the guided setup and in-app integration pages (#2304)
### Fixed
- Home keeps every qualifying contributor visible in its avatar rows instead of dropping the last one behind the All link (#2447) — thanks @nvtoan0201-swe!
- Dub assembly, cached segments and audio tools can read generated WAV files when TorchCodec is missing or cannot load (#2379) — thanks @tokutei58301-boop!
- Remote API-key and share-PIN clients can record and read export history while native filesystem operations stay local (#2383, #2384) — thanks @sedatdagg!
- Concurrent job events receive unique sequence numbers (#2384) — thanks @sedatdagg!
@@ -16,13 +16,13 @@ function openProfile(event: MouseEvent<HTMLAnchorElement>) {
runRendererTask('Open contributor profile', () => bridge.files.openExternal(href));
}
/** Home contributor credits: every qualifying avatar, then the All link. */
export function HomeContributors() {
const { t } = useTranslation();
// Keep three complete tapered rows; All opens the remaining contributors.
const topCount = Math.max(2, Math.floor((homeContributors.length + 4) / 3));
const middleCount = topCount - 1;
const capacity = topCount + middleCount + Math.max(0, topCount - 2);
const items = [...homeContributors.slice(0, capacity - 1), { login: 'all', avatar: '' }];
// Fill three tapered rows from the right edge, ending with All.
const items = [...homeContributors, { login: 'all', avatar: '' }];
const topCount = Math.ceil((items.length + 3) / 3);
const middleCount = Math.ceil((items.length - topCount + 1) / 2);
const starts = [0, topCount, topCount + middleCount];
return (
<ul
@@ -14,7 +14,7 @@ vi.mock('@tanstack/react-router', () => ({
useNavigate: () => vi.fn(),
}));
vi.mock('@tanstack/react-query', async (importOriginal) => ({
...await importOriginal<typeof import('@tanstack/react-query')>(),
...(await importOriginal<typeof import('@tanstack/react-query')>()),
useQuery: () => ({ data: [] }),
}));
vi.mock('@/hooks/use-profiles', () => ({ useProfiles: () => ({ data: [] }) }));
@@ -61,8 +61,10 @@ it('names the feature Dubbing consistently while preserving the existing route',
it('credits qualifying contributors and opens their GitHub profiles externally', () => {
render(<HomePage />);
const credits = screen.getAllByRole('listitem');
expect(credits).toHaveLength(9);
expect([1, 2, 3].map((row) => credits.filter((credit) => credit.style.gridRow === String(row)).length)).toEqual([4, 3, 2]);
expect(credits).toHaveLength(homeContributors.length + 1);
expect(
[1, 2, 3].map((row) => credits.filter((credit) => credit.style.gridRow === String(row)).length),
).toEqual([5, 3, 2]);
expect(homeContributors.every((person) => person.commits > 10)).toBe(true);
const all = screen.getByRole('link', { name: 'homeUi.allContributors' });
expect(all).toHaveAttribute(
@@ -73,15 +75,8 @@ it('credits qualifying contributors and opens their GitHub profiles externally',
expect(files.openExternal).toHaveBeenCalledWith(
'https://github.com/debpalash/VoiceStudio/graphs/contributors',
);
for (const login of [
'kevin9327',
'psiberfunk',
'velixio',
'jaketame',
'paoloantinori',
'Chang-Jin-Lee',
'Shivendra-Coherent',
]) {
for (const { login } of homeContributors) {
if (login === 'debpalash') continue;
const profile = screen.getByRole('link', { name: `GitHub · @${login}` });
expect(profile).toHaveAttribute('href', `https://github.com/${login}`);
expect(profile.querySelector('img')?.src).not.toMatch(/^https?:\/\/(avatars|github)/);