Build Comptextv7 enterprise infrastructure showcase#69
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request migrates the Comptextv7 showcase application from a static HTML/CSS project to a React + TypeScript + Vite single-page application. It introduces Netlify support while maintaining Vercel compatibility and updates the showcase copy to reflect an enterprise-grade infrastructure focus. Feedback includes a recommendation to use stable indices for React keys in static tables to avoid duplicate key warnings and a CSS fix to hide DAG node connectors in mobile views to prevent layout overlap.
| <div className="table-scroll"> | ||
| <table> | ||
| <thead><tr>{columns.map((column) => <th key={column}>{column}</th>)}</tr></thead> | ||
| <tbody>{rows.map((row) => <tr key={row.join('-')}>{row.map((cell) => <td key={cell}>{cell}</td>)}</tr>)}</tbody> |
There was a problem hiding this comment.
Using cell as a React key is fragile and can lead to duplicate key warnings if multiple columns in a row contain the same value (e.g., 'PASS' or '0.000'). Similarly, row.join('-') is not a robust key for rows. Since this is a static table, using the array indices is a safer and more standard approach.
| <tbody>{rows.map((row) => <tr key={row.join('-')}>{row.map((cell) => <td key={cell}>{cell}</td>)}</tr>)}</tbody> | |
| <tbody>{rows.map((row, rowIndex) => <tr key={rowIndex}>{row.map((cell, cellIndex) => <td key={cellIndex}>{cell}</td>)}</tr>)}</tbody> |
| nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.2rem; } | ||
| .section-shell { width: min(100% - 1rem, 1480px); padding: 3.5rem 0; } | ||
| h1 { font-size: clamp(2.6rem, 16vw, 4.5rem); } | ||
| .kpi-grid, .ops-grid, .dag, .use-case-grid, .walkthrough-grid { grid-template-columns: 1fr; } |
There was a problem hiding this comment.
The DAG node connectors (::after pseudo-elements) are designed for a 4-column layout. When the layout switches to a single column on mobile devices, these connectors will point into empty space or overlap with other elements. They should be hidden in the mobile media query to maintain a clean vertical list appearance.
.kpi-grid, .ops-grid, .dag, .use-case-grid, .walkthrough-grid { grid-template-columns: 1fr; }
.dag-node::after { display: none; }
Motivation
Description
showcase/app/srcwithmain.tsxandstyles.cssimplementing executive overview, architecture DAG, replay timeline, OpenTelemetry-style traces, artifact registry, CI history, benchmark suite, operations console, use cases, and reviewer walkthroughs.package.json(React/Vite/TypeScript),tsconfig.json,tsconfig.node.json,vite.config.ts, andpackage-lock.json, and remove the oldpublic/static copy-based build path.showcase/app/netlify.toml, preserve SPA routing inshowcase/app/vercel.json, and updateshowcase/app/README.mdto document the new posture and local checks.showcase/app/scripts/validate-static.mjsto assert required enterprise phrases, required dependencies, and responsive breakpoint presence.Testing
npm run validateinshowcase/appand it passed the updated enterprise static checks.npm run typecheck(tsc --noEmit) and the project type checks completed successfully.npm run build(Vite production build) and the site built todist/successfully with assets rendered./tmp/comptextv7-enterprise-showcase.png(file size recorded), indicating the preview served correctly.Codex Task