Skip to content
Merged
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
139 changes: 63 additions & 76 deletions src/pages/Tracker/Tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Home: React.FC = () => {
const [startDate, setStartDate] = useState("");
const [endDate, setEndDate] = useState("");

// Fetch data when username, tab, or page changes
// Fetch data when tab or page changes
useEffect(() => {
if (username) {
fetchData(username, page + 1, ROWS_PER_PAGE);
Expand Down Expand Up @@ -242,81 +242,68 @@ const Home: React.FC = () => {

return (
<Container maxWidth="lg" sx={{ mt: 4, minHeight: "80vh", color: theme.palette.text.primary }}>
{/* Auth Form */}
{/* Auth Input Controls */}
<Paper elevation={1} sx={{ p: 2, mb: 4, backgroundColor: theme.palette.background.paper }}>
<form onSubmit={handleSubmit}>
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap" }}>
<TextField
label="GitHub Username"
value={username}
onChange={(e) => setUsername(e.target.value)}
required
sx={{ flex: 1, minWidth: 150 }}
/>
<TextField
label="Personal Access Token"
value={token}
onChange={(e) => setToken(e.target.value)}
type="password"
required
sx={{ flex: 1, minWidth: 150 }}
helperText={
<Box
component="span"
sx={{
display: "flex",
alignItems: "center",
gap: 1,
fontSize: "0.75rem",
}}
>
<Link
href="https://github.com/settings/tokens/new"
target="_blank"
rel="noopener noreferrer"
sx={{
fontSize: "0.75rem",
textDecoration: "none",
display: "inline-flex",
alignItems: "center",
gap: 0.5,
}}
>
<KeyIcon size={12} />
Generate new token
</Link>

<Box component="span" sx={{ opacity: 0.6 }}>
</Box>

<Link
href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens"
target="_blank"
rel="noopener noreferrer"
sx={{
fontSize: "0.75rem",
textDecoration: "none",
}}
>
Learn more
</Link>
</Box>
}
/>
<Button
type="submit"
variant="contained"
sx={{
minWidth: "100px",
minHeight: "55px",
alignSelf: "flex-start",
}}
>
Fetch Data
</Button>
</Box>
</form>
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap" }}>
<TextField
label="GitHub Username"
value={username}
onChange={(e) => setUsername(e.target.value)}
required
sx={{ flex: 1, minWidth: 150 }}
/>
<TextField
label="Personal Access Token"
value={token}
onChange={(e) => setToken(e.target.value)}
type="password"
required
sx={{ flex: 1, minWidth: 150 }}
helperText={
<Box
component="span"
sx={{
display: "flex",
alignItems: "center",
gap: 1,
fontSize: "0.75rem",
}}
>
<Link
href="https://github.com/settings/tokens/new"
target="_blank"
rel="noopener noreferrer"
sx={{
fontSize: "0.75rem",
textDecoration: "none",
display: "inline-flex",
alignItems: "center",
gap: 0.5,
}}
>
<KeyIcon size={12} />
Generate new token
</Link>

<Box component="span" sx={{ opacity: 0.6 }}>
</Box>

<Link
href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens"
target="_blank"
rel="noopener noreferrer"
sx={{
fontSize: "0.75rem",
textDecoration: "none",
}}
>
Learn more
</Link>
</Box>
}
/>
</Box>
</Paper>

{/* Filters */}
Expand Down Expand Up @@ -387,7 +374,7 @@ const Home: React.FC = () => {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
borderRadius: "4px",
"& .MuiSelect-select": { padding: "10px" },
& .MuiSelect-select: { padding: "10px" },
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 | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the invalid selector-key pattern in the sx object.
rg -n --fixed-strings '& .MuiSelect-select: { padding: "10px" },' src/pages/Tracker/Tracker.tsx

Repository: GitMetricsLab/github_tracker

Length of output: 132


🏁 Script executed:

#!/bin/bash
sed -n '295,315p' src/pages/Tracker/Tracker.tsx

Repository: GitMetricsLab/github_tracker

Length of output: 928


Fix invalid sx selector-key syntax in Tracker.tsx

src/pages/Tracker/Tracker.tsx has an unquoted sx selector key (& .MuiSelect-select) inside an object literal; it must be quoted to avoid parse errors.

💡 Suggested fix
-              & .MuiSelect-select: { padding: "10px" },
+              "& .MuiSelect-select": { padding: "10px" },
📝 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
& .MuiSelect-select: { padding: "10px" },
"& .MuiSelect-select": { padding: "10px" },
🧰 Tools
🪛 Biome (2.4.15)

[error] 306-306: Expected a property, a shorthand property, a getter, a setter, or a method but instead found '&'.

(parse)


[error] 306-306: Expected an expression but instead found '.'.

(parse)


[error] 306-306: Expected an identifier but instead found '{'.

(parse)


[error] 306-306: expected ... but instead found padding

(parse)


[error] 306-306: expected } but instead found :

(parse)


[error] 306-306: Unexpected token. Did you mean {'}'} or &rbrace;?

(parse)

🤖 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` at line 306, The object literal used in the sx
prop contains an unquoted selector key "& .MuiSelect-select" which is invalid;
update the selector key in the styles object (the entry near the
Select/MuiSelect styling in Tracker.tsx) to a quoted string (e.g., change &
.MuiSelect-select to "& .MuiSelect-select") so the object parses correctly and
the sx styling is applied.

"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderColor: theme.palette.primary.main,
},
Expand Down
Loading