Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/app/cypress/e2e/operatorx.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ it('shows measured and missing GPU coverage, then switches the URL to MoE', () =

cy.visit('/operatorx');
cy.wait('@gemm');
cy.get('[data-testid="operatorx-page"] h1').should('have.text', 'OperatorX (Experimental Beta)');
cy.get('[data-testid="operatorx-coverage"]')
.should('contain.text', 'Coverage of 2 cases')
.and('contain.text', '2/2')
Expand Down Expand Up @@ -117,6 +118,10 @@ for (const prefix of ['', '/zh']) {
cy.intercept('GET', '/api/v1/operatorx/compare?op=gemm*', gemm).as('gemm');
cy.visit(`${prefix}/operatorx`);
cy.wait('@gemm');
cy.get('[data-testid="operatorx-page"] h1').should(
'have.text',
prefix ? 'OperatorX(实验性 Beta)' : 'OperatorX (Experimental Beta)',
);
cy.get('[data-testid="operatorx-viz-distribution"]')
.scrollIntoView()
.within(() => {
Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/components/operatorx/OperatorXView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card } from '@/components/ui/card';
import { Heading } from '@/components/ui/heading';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { useClientSearch } from '@/hooks/useClientSearch';
import { useLocale } from '@/lib/i18n/use-locale';
import { replaceClientSearch } from '@/lib/routing/client-navigation';

import { ComparisonDashboard } from './ComparisonDashboard';
Expand All @@ -28,6 +29,7 @@ function selectCategory(value: string) {
}

export default function OperatorXView() {
const locale = useLocale();
const requested = new URLSearchParams(useClientSearch()).get('op');
const category: Category = isCategory(requested) ? requested : 'gemm';
return (
Expand All @@ -39,7 +41,7 @@ export default function OperatorXView() {
>
<Card>
<Heading as="h1" level="card">
OperatorX
{locale === 'zh' ? 'OperatorX(实验性 Beta)' : 'OperatorX (Experimental Beta)'}
</Heading>
<TabsList className="mt-4">
{CATEGORIES.map((c) => (
Expand Down
Loading