Skip to content
Open
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
71 changes: 67 additions & 4 deletions src/pages/Tracker/Tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
Link,
CircularProgress,
Alert,
Skeleton,
Tabs,
Tab,
Select,
Expand Down Expand Up @@ -279,10 +280,72 @@ const Home: React.FC = () => {
)}

{loading ? (
<Box display="flex" justifyContent="center" my={4}>
<CircularProgress />
</Box>
) : (
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>

<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>

<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>

<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>

<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>

<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
) : (
Comment on lines +283 to +348
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep loading and loaded table containers structurally consistent.

The loading branch omits the scroll wrapper and pagination area used in the loaded branch, so the page height shifts when data arrives. Add matching container/pagination placeholders to keep layout stable.

Proposed patch
-      {loading ? (
-  <TableContainer component={Paper}>
+      {loading ? (
+  <Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
+  <TableContainer component={Paper}>
     <Table size="small">
@@
       <TableBody>
@@
       </TableBody>
     </Table>
+    <TablePagination
+      component="div"
+      count={0}
+      page={0}
+      onPageChange={() => {}}
+      rowsPerPage={ROWS_PER_PAGE}
+      rowsPerPageOptions={[ROWS_PER_PAGE]}
+      labelDisplayedRows={() => " "}
+      backIconButtonProps={{ disabled: true }}
+      nextIconButtonProps={{ disabled: true }}
+    />
   </TableContainer>
+  </Box>
 ) : (
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>
<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>
<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>
<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
) : (
<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>
<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>
<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>
<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
<TablePagination
component="div"
count={0}
page={0}
onPageChange={() => {}}
rowsPerPage={ROWS_PER_PAGE}
rowsPerPageOptions={[ROWS_PER_PAGE]}
labelDisplayedRows={() => " "}
backIconButtonProps={{ disabled: true }}
nextIconButtonProps={{ disabled: true }}
/>
</TableContainer>
</Box>
) : (
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Tracker/Tracker.tsx` around lines 283 - 348, The loading branch
that renders the placeholder rows (the [...Array(6)].map(...) block inside
TableContainer) must include the same scroll wrapper and pagination area used in
the loaded branch so layout doesn't shift; wrap the TableContainer or the Table
in the same scroll container component (the same Box/div with the scrolling
styles) and add a stub pagination component or placeholder element matching the
real pagination (e.g., same height and structure as the TablePagination used
when data is loaded) so spacing is identical between loading and loaded states.
Ensure you modify the loading branch where TableContainer and the skeleton rows
are rendered to reuse the same scroll wrapper and pagination placeholders as the
loaded branch.

<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>

<TableContainer component={Paper}>
Expand Down
Loading