fix(tables): header "T…" flicker — emcn barrel Table component shadowed the Table icon in loading fallbacks#5007
Conversation
…ed the Table icon in loading fallbacks
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Import changes: Breadcrumb loading UX: The table detail page shows a terminal Cleanup: Removes unused Reviewed by Cursor Bugbot for commit 7b44f9f. Configure here. |
Greptile SummaryThis PR fixes a visual flicker on the Tables tab header where a truncated "T…" appeared briefly during route transitions — caused by a naming collision in the emcn barrel where
Confidence Score: 5/5Safe to merge — the changes are narrowly scoped to fixing the icon import, aligning loading breadcrumbs, and removing a confirmed dead component. The root cause (barrel collision between the data-table Table and the icon Table) is correctly identified and fixed via an explicit named re-export that ES modules prioritise over wildcards. Both loading fallbacks now import the icon from the same subpath already used by 20+ other files, so no new pattern is introduced. The breadcrumb change in table.tsx is logically sound — the disabled: !tableData guard is only removed in the branch where tableData is always truthy. The KnowledgeHeader deletion is safe (grep confirms zero callers). No edge cases or regressions were found. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant Next.js Router
participant loading.tsx
participant emcn/index.ts
participant emcn/icons
Note over Browser,emcn/icons: Before fix
Browser->>Next.js Router: Navigate to /tables
Next.js Router->>loading.tsx: Render loading fallback
loading.tsx->>emcn/index.ts: "import { Table as TableIcon }"
emcn/index.ts-->>loading.tsx: data-table element (collision!)
loading.tsx-->>Browser: Renders empty table as icon → T… flicker
Note over Browser,emcn/icons: After fix
Browser->>Next.js Router: Navigate to /tables
Next.js Router->>loading.tsx: Render loading fallback
loading.tsx->>emcn/icons: "import { Table as TableIcon }"
emcn/icons-->>loading.tsx: SVG icon glyph
loading.tsx-->>Browser: Renders Tables header correctly
Reviews (1): Last reviewed commit: "fix(tables): header "T…" flicker — emcn ..." | Re-trigger Greptile |
Summary
Tabledata-table component, which shadows theTableicon fromexport * from './icons'— sotables/loading.tsxandtables/[tableId]/loading.tsxwere rendering an empty<table>(with aw-fullwrapper) as the header icon, squeezing the "Tables" label to one clipped character for the duration of the route-transition fallback. Only visible in prod builds, where the prefetched loading shell actually displays.@/components/emcn/iconsin both fallbacks (matching the live pages) and document theTablename collision in the barrel so it doesn’t recur.…crumb as its loading.tsx while the table query resolves (previously an empty label with an orphaned chevron dropdown), and the files detail loading crumb uses…+terminalinstead of a literal....KnowledgeHeadercomponent (only referenced by its barrel export).Type of Change
Testing
Reproduced and verified against a local production build with Playwright (throttled network, per-frame DOM sampling of the header): pre-fix the fallback renders an empty
<table>+ clipped label (matches the reported screenshot pixel-for-pixel); post-fix all frames render the svg icon with an unclipped label. Typecheck passes.Checklist