Skip to content

Fix/issue 44 external apps filter#1424

Open
SnehalTanpure7 wants to merge 3 commits into
Sachinchaurasiya360:mainfrom
SnehalTanpure7:fix/issue-44-external-apps-filter
Open

Fix/issue 44 external apps filter#1424
SnehalTanpure7 wants to merge 3 commits into
Sachinchaurasiya360:mainfrom
SnehalTanpure7:fix/issue-44-external-apps-filter

Conversation

@SnehalTanpure7
Copy link
Copy Markdown
Contributor

@SnehalTanpure7 SnehalTanpure7 commented Jun 5, 2026

Pull Request

Description

Describe your changes.

Related Issue

Fixes #

Type of Change

  • Bug Fix
  • Feature
  • Enhancement
  • Documentation

Testing

Explain how you tested it.

Screenshots / Video

REQUIRED for any UI change. PRs that modify visible UI (layout, components, styles, pages) will be rejected without this.

No UI changes in this PR (delete this line if you are making UI changes)

Checklist

  • Code follows project guidelines
  • No new compile/type errors
  • Tested manually (include steps above)
  • No .env, credentials, or node_modules committed
  • Docs updated (if needed)
  • Screenshot or video attached for every UI change (PR will be rejected if missing)

Summary by CodeRabbit

  • New Features
    • Added filtering controls for external applications on the Applications page.
    • Added action buttons to the completion banner on the Roadmap page, including a "Discover repos" link and "Start over" option.
    • Added empty state message on the Analytics page when no contributions are tracked.

@github-actions github-actions Bot added the gssoc:approved Approved for GSSoC scoring label Jun 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Hi @SnehalTanpure7, thanks for contributing to InternHack! 🎉

I have automatically:

  • 👤 Assigned this PR to you.
  • 🏷️ Applied the gssoc:approved label.

Our workflows will now analyze your changes to classify:

  • 📈 PR Difficulty: level:*
  • 🧩 PR Type: type:*
  • 🌟 PR Quality: quality:*

Tip

Ensure your PR description references the issue it resolves (e.g. Closes #123). This allows the bot to inherit any additional labels from that issue!

Happy coding! 🚀

@github-actions github-actions Bot added scope:frontend Changes to client-side / UI code quality:clean Clean and well-structured contribution level:intermediate Requires moderate project understanding type:bug Bug fixes labels Jun 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds three independent UI enhancements across the student module: filter-driven visibility control for external applications in MyApplicationsPage, an updated completion banner with reset functionality in FirstPRRoadmapPage, and an empty-state display for zero tracked contributions in OpenSourceAnalyticsPage.

Changes

Student UI Enhancements

Layer / File(s) Summary
External application filter visibility
client/src/module/student/applications/MyApplicationsPage.tsx
Introduces activeFilter state and EXTERNAL_VISIBLE_FILTERS allowlist with type guard to conditionally render external applications only when the selected filter permits. Updates pagination reset and memoization dependencies to recompute when filter changes.
Completion banner UI and reset workflow
client/src/module/student/opensource/FirstPRRoadmapPage.tsx
Replaces completion banner text with new congratulatory copy and adds action buttons: a link to the open-source discovery page and a "Start over" button that confirms with user, clears completed state, and removes persisted progress from localStorage.
Zero-contribution empty state
client/src/module/student/opensource/OpenSourceAnalyticsPage.tsx
Adds conditional early return to display a centered empty-state UI with icon and navigation link when the contribution trend query is successful and contributionTotal is zero, preventing blank charts/filters from rendering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • Sachinchaurasiya360/InternHack#44: Directly addressed by the activeFilter type guard and memoization logic that filters external applications based on the selected filter value.

Possibly related PRs

Suggested labels

bug, scope:frontend, level:intermediate, quality:clean

Suggested reviewers

  • Sachinchaurasiya360

Poem

🐰 A filter that whispers and banners so bright,
Empty states comfort when contributions don't light—
Three pages refined with a hopeful reset,
The student experience just got better yet! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete; it uses the template placeholder text without filling in actual details about the changes, related issue number, type of change, or testing information. Replace template placeholders with actual details: describe the changes made, specify the issue number (44), select the appropriate type of change, explain testing steps, and add screenshots if UI was modified.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix/issue 44 external apps filter' is directly related to the main changeset, which introduces filtering logic for external applications in MyApplicationsPage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix/issue-44-external-apps-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SnehalTanpure7
Copy link
Copy Markdown
Contributor Author

SnehalTanpure7 commented Jun 5, 2026

I have submitted a PR for this issue. #245

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
client/src/module/student/applications/MyApplicationsPage.tsx (1)

292-299: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove activeFilter from dependencies or implement status filtering.

activeFilter is included in the dependency array (line 299) but is never used in the memo body. This causes unnecessary recomputation without changing the result.

Additionally, the internal applications are not filtered by status at all - they only filter by search term. This is inconsistent with the external applications logic (line 302) which respects activeFilter. If status-based filtering is intended, it should be implemented for internal applications as well.

♻️ Proposed fix to remove unused dependency
  const filtered = useMemo(() => {
    const base = !debouncedSearch.trim()
      ? applications
      : applications.filter(
        (a) => a.job?.title?.toLowerCase().includes(debouncedSearch.toLowerCase()) || a.job?.company?.toLowerCase().includes(debouncedSearch.toLowerCase())
      );
    return sortApplications(base, sortOption);
- }, [applications, debouncedSearch, sortOption, activeFilter]);
+ }, [applications, debouncedSearch, sortOption]);

Note: If status filtering for internal applications is actually needed to complete this feature, the memo body should filter base by activeFilter before sorting.

🤖 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 `@client/src/module/student/applications/MyApplicationsPage.tsx` around lines
292 - 299, The memo for filtered (the useMemo that builds base, uses
applications, debouncedSearch and calls sortApplications) currently includes
activeFilter in its dependency array but doesn't use it; either remove
activeFilter from the dependency list to avoid unnecessary recomputations, or
implement status filtering by applying activeFilter to base (e.g., filter base
by application status before calling sortApplications) so that activeFilter is
actually used; update the dependency array to match the actual inputs
(applications, debouncedSearch, sortOption and activeFilter only if you
implement the filter).
🤖 Prompt for all review comments with 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.

Inline comments:
In `@client/src/module/student/applications/MyApplicationsPage.tsx`:
- Line 237: EXTERNAL_STATUS is declared in MyApplicationsPage.tsx but never
used; either remove the dead constant or wire it into the application-status
mapping/filtering logic. If external applications should map to "APPLIED",
update the appropriate function that derives or filters application.status
(e.g., wherever internal statuses are normalized or filters are applied) to
reference EXTERNAL_STATUS when source === "external"; otherwise delete the
EXTERNAL_STATUS declaration to eliminate dead code.
- Line 269: The activeFilter state in MyApplicationsPage is never updated, so
filteredExternal remains stuck on "ALL"; wire the setActiveFilter setter into
the UI that renders the external filter controls (or add controls if missing) so
user actions update activeFilter and re-compute filteredExternal. Locate the
activeFilter and setActiveFilter declarations in MyApplicationsPage, find the
component/markup that should present the filter options (buttons, tabs, or a
select) and add onClick/onChange handlers that call
setActiveFilter("ALL"|"IN_PROGRESS"|"APPLIED") as appropriate, or pass
setActiveFilter down to the existing filter component so it can update state.
Ensure the filtering logic that derives filteredExternal reads the activeFilter
state so the view updates when the setter is called.

In `@client/src/module/student/opensource/FirstPRRoadmapPage.tsx`:
- Around line 129-134: Replace the plain <Link> in FirstPRRoadmapPage.tsx with
the reusable Button component composed with the Link via the asChild prop:
import Button from the ui/button component, wrap the existing <Link
to="/student/opensource">Discover repos to contribute to</Link> inside <Button
asChild> so the Button provides the styling and the Link remains the navigation
element, and remove the custom className styling previously applied to the Link
to rely on Button's styles.
- Around line 135-145: The Button instance rendering "Start over" should stop
using a custom className and instead use the Button component's built-in props:
replace the className on the Button in FirstPRRoadmapPage.tsx with appropriate
variant/mode/size props (for example variant="ghost" or "secondary",
mode="button", size="sm" or "md") to match the design system, keep the existing
onClick handler that confirms and calls setCompleted(new Set()) and
localStorage.removeItem(STORAGE_KEY), and remove any inline styling so the
Button styling comes from the component props only.

In `@client/src/module/student/opensource/OpenSourceAnalyticsPage.tsx`:
- Around line 404-409: Replace the inline-styled Link with the shared Button
component using its asChild slot: import Button from the component
(client/src/components/ui/button.tsx), wrap the existing <Link
to="/student/opensource"> with <Button asChild variant="primary" size="md"> (or
the variant/size that matches the current styling) and remove the duplicated
className on the Link; ensure the final structure is Button asChild containing
the Link and that no inline bg/text/padding/rounded classes remain on the Link.

---

Outside diff comments:
In `@client/src/module/student/applications/MyApplicationsPage.tsx`:
- Around line 292-299: The memo for filtered (the useMemo that builds base, uses
applications, debouncedSearch and calls sortApplications) currently includes
activeFilter in its dependency array but doesn't use it; either remove
activeFilter from the dependency list to avoid unnecessary recomputations, or
implement status filtering by applying activeFilter to base (e.g., filter base
by application status before calling sortApplications) so that activeFilter is
actually used; update the dependency array to match the actual inputs
(applications, debouncedSearch, sortOption and activeFilter only if you
implement the filter).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9582ce1d-e1bd-4da0-8ac1-ba78d050dd3c

📥 Commits

Reviewing files that changed from the base of the PR and between e367262 and 4801e9c.

📒 Files selected for processing (3)
  • client/src/module/student/applications/MyApplicationsPage.tsx
  • client/src/module/student/opensource/FirstPRRoadmapPage.tsx
  • client/src/module/student/opensource/OpenSourceAnalyticsPage.tsx

REJECTED: 4,
WITHDRAWN: 5,
};
const EXTERNAL_STATUS = "APPLIED";
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

Remove unused constant or clarify its purpose.

EXTERNAL_STATUS is defined but never referenced. If external applications should always map to an "APPLIED" status for filtering purposes, this logic is missing. Otherwise, remove the dead code.

🧹 Proposed fix to remove unused constant
-const EXTERNAL_STATUS = "APPLIED";
 const EXTERNAL_VISIBLE_FILTERS = ["ALL", "APPLIED", "IN_PROGRESS"] as const;
📝 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
const EXTERNAL_STATUS = "APPLIED";
const EXTERNAL_VISIBLE_FILTERS = ["ALL", "APPLIED", "IN_PROGRESS"] as const;
🤖 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 `@client/src/module/student/applications/MyApplicationsPage.tsx` at line 237,
EXTERNAL_STATUS is declared in MyApplicationsPage.tsx but never used; either
remove the dead constant or wire it into the application-status
mapping/filtering logic. If external applications should map to "APPLIED",
update the appropriate function that derives or filters application.status
(e.g., wherever internal statuses are normalized or filters are applied) to
reference EXTERNAL_STATUS when source === "external"; otherwise delete the
EXTERNAL_STATUS declaration to eliminate dead code.

const [page, setPage] = useState(1);
const [pendingDelete, setPendingDelete] = useState<PendingDelete | null>(null);
const [sortOption, setSortOption] = useState<"newest" | "oldest" | "company" | "status">("newest");
const [activeFilter, setActiveFilter] = useState("ALL");
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 | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Search for filter UI implementation that might set activeFilter

# Search for setActiveFilter calls
rg -n 'setActiveFilter' --type=tsx --type=ts

# Search for potential filter button/tab patterns
rg -n -C3 'IN_PROGRESS|APPLIED|ALL.*filter|filter.*button' client/src/module/student/applications/ --type=tsx --type=ts

Repository: Sachinchaurasiya360/InternHack

Length of output: 130


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="client/src/module/student/applications/MyApplicationsPage.tsx"

echo "== Existence checks =="
ls -l "$FILE"

echo
echo "== Find activeFilter usage =="
rg -n "activeFilter" "$FILE"

echo
echo "== Find setActiveFilter usage in repo (scoped) =="
rg -n "setActiveFilter" client/src --glob='*.ts' --glob='*.tsx' || true

echo
echo "== Find IN_PROGRESS/APPLIED mentions in that module dir =="
rg -n "IN_PROGRESS|APPLIED" client/src/module/student/applications --glob='*.ts' --glob='*.tsx' || true

echo
echo "== Show filter/search-related UI area around line ~430-560 =="
# show manageable window
sed -n '420,560p' "$FILE" | nl -ba | sed -n '1,200p'

Repository: Sachinchaurasiya360/InternHack

Length of output: 1493


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="client/src/module/student/applications/MyApplicationsPage.tsx"

echo "== Existence checks =="
ls -l "$FILE"

echo
echo "== Find activeFilter usage =="
rg -n "activeFilter" "$FILE" || true

echo
echo "== Find setActiveFilter usage in repo (scoped) =="
rg -n "setActiveFilter" client/src --glob='*.ts' --glob='*.tsx' || true

echo
echo "== Find IN_PROGRESS/APPLIED mentions in that module dir =="
rg -n "IN_PROGRESS|APPLIED" client/src/module/student/applications --glob='*.ts' --glob='*.tsx' || true

echo
echo "== Show filter/search-related UI area around line ~430-560 =="
sed -n '420,560p' "$FILE" | nl -ba | sed -n '1,250p'

Repository: Sachinchaurasiya360/InternHack

Length of output: 1493


🏁 Script executed:

#!/bin/bash
set -euo pipefail
FILE="client/src/module/student/applications/MyApplicationsPage.tsx"

echo "== setActiveFilter call sites (anywhere) =="
rg -n "setActiveFilter" "$FILE" --glob='*.tsx' --glob='*.ts' || true

echo
echo "== Where EXTERNAL_VISIBLE_FILTERS is used =="
rg -n "EXTERNAL_VISIBLE_FILTERS|isExternalVisibleFilter" "$FILE" || true

echo
echo "== Show surrounding code for those constants/helpers =="
# print around first occurrence(s)
for line in $(rg -n "EXTERNAL_VISIBLE_FILTERS|isExternalVisibleFilter" "$FILE" | cut -d: -f1 | head -n 10); do
  echo "--- around line $line ---"
  sed -n "$((line-40)),$((line+60))p" "$FILE" | cat
done

echo
echo "== Look for UI event handlers referencing activeFilter =="
rg -n "activeFilter|setActiveFilter|onClick|onChange|RadioGroup|Tabs|Select|Filter" "$FILE" --glob='*.tsx' | head -n 80 || true

echo
echo "== Print a likely UI region (420-620) without nl =="
sed -n '400,650p' "$FILE" | cat

Repository: Sachinchaurasiya360/InternHack

Length of output: 30211


Critical: External application filter is unreachable (activeFilter never changes).

In client/src/module/student/applications/MyApplicationsPage.tsx, activeFilter is set up as useState("ALL") but there are no setActiveFilter(...) call sites and no UI controls wired to update it. That means the external list filtering (filteredExternal) always stays on "ALL", so users can’t switch to "IN_PROGRESS"/"APPLIED" views.

🤖 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 `@client/src/module/student/applications/MyApplicationsPage.tsx` at line 269,
The activeFilter state in MyApplicationsPage is never updated, so
filteredExternal remains stuck on "ALL"; wire the setActiveFilter setter into
the UI that renders the external filter controls (or add controls if missing) so
user actions update activeFilter and re-compute filteredExternal. Locate the
activeFilter and setActiveFilter declarations in MyApplicationsPage, find the
component/markup that should present the filter options (buttons, tabs, or a
select) and add onClick/onChange handlers that call
setActiveFilter("ALL"|"IN_PROGRESS"|"APPLIED") as appropriate, or pass
setActiveFilter down to the existing filter component so it can update state.
Ensure the filtering logic that derives filteredExternal reads the activeFilter
state so the view updates when the setter is called.

Comment on lines +129 to +134
<Link
to="/student/opensource"
className="text-sm text-lime-700 dark:text-lime-400 underline font-medium"
>
Discover repos to contribute to
</Link>
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.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use Button component with asChild for navigation links.

This new navigation link should use the reusable Button component with the asChild prop to compose with <Link>, rather than applying custom className styling to a bare Link. This ensures consistent button styling across the codebase.

♻️ Refactor to use Button with asChild
-                <Link
-                  to="/student/opensource"
-                  className="text-sm text-lime-700 dark:text-lime-400 underline font-medium"
-                >
-                  Discover repos to contribute to
-                </Link>
+                <Button
+                  variant="ghost"
+                  mode="link"
+                  size="sm"
+                  asChild
+                >
+                  <Link to="/student/opensource">
+                    Discover repos to contribute to
+                  </Link>
+                </Button>

As per coding guidelines, use the reusable Button component from client/src/components/ui/button.tsx for all new buttons; the asChild prop (Radix Slot) should be used when composing Button with <Link> or other elements.

📝 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
<Link
to="/student/opensource"
className="text-sm text-lime-700 dark:text-lime-400 underline font-medium"
>
Discover repos to contribute to
</Link>
<Button
variant="ghost"
mode="link"
size="sm"
asChild
>
<Link to="/student/opensource">
Discover repos to contribute to
</Link>
</Button>
🤖 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 `@client/src/module/student/opensource/FirstPRRoadmapPage.tsx` around lines 129
- 134, Replace the plain <Link> in FirstPRRoadmapPage.tsx with the reusable
Button component composed with the Link via the asChild prop: import Button from
the ui/button component, wrap the existing <Link
to="/student/opensource">Discover repos to contribute to</Link> inside <Button
asChild> so the Button provides the styling and the Link remains the navigation
element, and remove the custom className styling previously applied to the Link
to rely on Button's styles.

Comment on lines +135 to +145
<Button
onClick={() => {
if (window.confirm("Reset all steps?")) {
setCompleted(new Set());
try { localStorage.removeItem(STORAGE_KEY); } catch { /**/ }
}
}}
className="text-sm text-lime-700 dark:text-lime-400 border border-lime-400 px-3 py-0.5 rounded-lg font-medium"
>
Start over
</Button>
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.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use Button variant/mode/size props instead of custom className.

The Button component should use its built-in variant, mode, and size props rather than custom className overrides. Applying custom styles bypasses the design system and reduces consistency.

♻️ Refactor to use proper Button props
                 <Button
+                  variant="secondary"
+                  size="sm"
                   onClick={() => {
                     if (window.confirm("Reset all steps?")) {
                       setCompleted(new Set());
                       try { localStorage.removeItem(STORAGE_KEY); } catch { /**/ }
                     }
                   }}
-                  className="text-sm text-lime-700 dark:text-lime-400 border border-lime-400 px-3 py-0.5 rounded-lg font-medium"
                 >
                   Start over
                 </Button>

As per coding guidelines, the Button component supports variants (primary, secondary, mono, ghost, danger), modes (button, icon, link), and sizes (sm, md, lg) that should be used instead of custom className styling.

🤖 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 `@client/src/module/student/opensource/FirstPRRoadmapPage.tsx` around lines 135
- 145, The Button instance rendering "Start over" should stop using a custom
className and instead use the Button component's built-in props: replace the
className on the Button in FirstPRRoadmapPage.tsx with appropriate
variant/mode/size props (for example variant="ghost" or "secondary",
mode="button", size="sm" or "md") to match the design system, keep the existing
onClick handler that confirms and calls setCompleted(new Set()) and
localStorage.removeItem(STORAGE_KEY), and remove any inline styling so the
Button styling comes from the component props only.

Comment on lines +404 to +409
<Link
to="/student/opensource"
className="bg-indigo-600 text-white px-6 py-3 rounded-xl font-medium hover:bg-indigo-700 transition-colors"
>
Discover Repositories →
</Link>
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.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use the shared Button component with asChild instead of inline Link styles.

The Link duplicates Button styling with inline classes. As per coding guidelines, use the reusable Button component which supports the asChild prop (Radix Slot) for composing with <Link> or other elements.

♻️ Refactor to use Button with asChild
-        <Link
-          to="/student/opensource"
-          className="bg-indigo-600 text-white px-6 py-3 rounded-xl font-medium hover:bg-indigo-700 transition-colors"
-        >
-          Discover Repositories →
-        </Link>
+        <Button variant="primary" size="lg" asChild>
+          <Link to="/student/opensource">
+            Discover Repositories →
+          </Link>
+        </Button>

As per coding guidelines: "Use the reusable Button component from client/src/components/ui/button.tsx for all new buttons; supports variants (primary, secondary, mono, ghost, danger), modes (button, icon, link), and sizes (sm, md, lg). Use asChild prop (Radix Slot) when composing Button with <Link> or other elements."

📝 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
<Link
to="/student/opensource"
className="bg-indigo-600 text-white px-6 py-3 rounded-xl font-medium hover:bg-indigo-700 transition-colors"
>
Discover Repositories
</Link>
<Button variant="primary" size="lg" asChild>
<Link to="/student/opensource">
Discover Repositories
</Link>
</Button>
🤖 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 `@client/src/module/student/opensource/OpenSourceAnalyticsPage.tsx` around
lines 404 - 409, Replace the inline-styled Link with the shared Button component
using its asChild slot: import Button from the component
(client/src/components/ui/button.tsx), wrap the existing <Link
to="/student/opensource"> with <Button asChild variant="primary" size="md"> (or
the variant/size that matches the current styling) and remove the duplicated
className on the Link; ensure the final structure is Button asChild containing
the Link and that no inline bg/text/padding/rounded classes remain on the Link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for GSSoC scoring level:intermediate Requires moderate project understanding quality:clean Clean and well-structured contribution scope:frontend Changes to client-side / UI code type:bug Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant