Skip to content

Commit 6962078

Browse files
Move GPU Reliability link to footer (#157)
* Move GPU Reliability link to footer * Update Cypress specs for footer reliability link * simplify: inline footer link, move TAB_LINKS back into tab-nav --------- Co-authored-by: adibarra <93070681+adibarra@users.noreply.github.com>
1 parent efee12a commit 6962078

4 files changed

Lines changed: 25 additions & 8 deletions

File tree

packages/app/cypress/e2e/csv-export.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('CSV Export', () => {
2727
});
2828

2929
it('reliability chart has CSV export option', () => {
30-
cy.get('[data-testid="tab-trigger-reliability"]').click();
30+
cy.visit('/reliability');
3131
cy.get('[data-testid="reliability-chart-display"]').should('exist');
3232

3333
cy.get('[data-testid="export-button"]').first().click();

packages/app/cypress/e2e/tabs.cy.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ describe('Chart Section Tabs — E2E', () => {
1616
cy.get('[data-testid="tab-trigger-calculator"]').click();
1717
cy.url().should('include', '/calculator');
1818

19-
cy.get('[data-testid="tab-trigger-reliability"]').click();
20-
cy.url().should('include', '/reliability');
21-
2219
cy.get('[data-testid="tab-trigger-gpu-specs"]').click();
2320
cy.url().should('include', '/gpu-specs');
2421

2522
cy.get('[data-testid="tab-trigger-inference"]').click();
2623
cy.url().should('include', '/inference');
2724
});
2825

26+
it('opens GPU Reliability from the footer link', () => {
27+
cy.get('[data-testid="tab-trigger-reliability"]').should('not.exist');
28+
29+
cy.get('[data-testid="footer-link-reliability"]').scrollIntoView().click();
30+
cy.url().should('include', '/reliability');
31+
cy.get('[data-testid="reliability-chart-display"]').should('exist');
32+
});
33+
2934
it('shows mobile chart select dropdown on small viewport', () => {
3035
cy.viewport(375, 812);
3136
cy.visit('/inference');

packages/app/src/components/footer/footer.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Footer = ({ starCount }: { starCount?: number | null }) => {
4141
</div>
4242

4343
{/* Center — Links */}
44-
<div data-testid="footer-links" className="flex justify-evenly gap-6">
44+
<div data-testid="footer-links" className="grid grid-cols-3 gap-x-6 gap-y-8">
4545
<div data-testid="footer-links-semianalysis" className="flex flex-col gap-2.5">
4646
<span className="text-sm font-medium text-foreground">SemiAnalysis</span>
4747
<a
@@ -114,6 +114,16 @@ export const Footer = ({ starCount }: { starCount?: number | null }) => {
114114
Frontend
115115
</a>
116116
</div>
117+
<div data-testid="footer-links-more" className="flex flex-col gap-2.5">
118+
<span className="text-sm font-medium text-foreground">More</span>
119+
<Link
120+
data-testid="footer-link-reliability"
121+
href="/reliability"
122+
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
123+
>
124+
GPU Reliability
125+
</Link>
126+
</div>
117127
</div>
118128

119129
{/* Right — CTA + Social */}

packages/app/src/components/tab-nav.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ const TAB_LINKS = [
6969
{ href: '/evaluation', label: 'Accuracy Evals', testId: 'tab-trigger-evaluation' },
7070
{ href: '/historical', label: 'Historical Trends', testId: 'tab-trigger-historical' },
7171
{ href: '/calculator', label: 'TCO Calculator', testId: 'tab-trigger-calculator' },
72-
{ href: '/reliability', label: 'GPU Reliability', testId: 'tab-trigger-reliability' },
7372
{ href: '/gpu-specs', label: 'GPU Specs', testId: 'tab-trigger-gpu-specs' },
7473
{ href: '/gpu-metrics', label: 'PowerX', testId: 'tab-trigger-gpu-metrics', gated: true },
7574
{ href: '/submissions', label: 'Submissions', testId: 'tab-trigger-submissions', gated: true },
7675
] as const;
7776

77+
const TAB_VALUES = new Set(TAB_LINKS.map((t) => t.href.slice(1)));
78+
7879
function activeTab(pathname: string): string {
7980
const seg = pathname.split('/').filter(Boolean)[0] || 'inference';
8081
return seg;
@@ -85,6 +86,7 @@ export function TabNav() {
8586
const router = useRouter();
8687
const featureGateUnlocked = useFeatureGate();
8788
const current = activeTab(pathname);
89+
const selectedTab = TAB_VALUES.has(current) ? current : '';
8890

8991
const handleMobileChange = (value: string) => {
9092
window.dispatchEvent(new CustomEvent('inferencex:tab-change'));
@@ -105,9 +107,9 @@ export function TabNav() {
105107
<Card>
106108
<div className="space-y-2">
107109
<Label htmlFor="chart-select">Select Chart</Label>
108-
<Select value={current} onValueChange={handleMobileChange}>
110+
<Select value={selectedTab} onValueChange={handleMobileChange}>
109111
<SelectTrigger id="chart-select" data-testid="mobile-chart-select" className="w-full">
110-
<SelectValue />
112+
<SelectValue placeholder="Select Chart" />
111113
</SelectTrigger>
112114
<SelectContent>
113115
{TAB_LINKS.map((tab) => {

0 commit comments

Comments
 (0)