Skip to content

fix: repair the broken main build (ShieldAlert import, legal screens)#1039

Merged
Somil450 merged 1 commit into
Somil450:mainfrom
Anexus5919:fix/build-legal-screens-and-shieldalert
Jul 9, 2026
Merged

fix: repair the broken main build (ShieldAlert import, legal screens)#1039
Somil450 merged 1 commit into
Somil450:mainfrom
Anexus5919:fix/build-legal-screens-and-shieldalert

Conversation

@Anexus5919

Copy link
Copy Markdown
Contributor

📌 Related Issue

Fixes #1038


📝 Description

The frontend build is currently broken on main (CI has failed on the last several commits, and every open PR inherits the failure). Two independent regressions are responsible.

🔹 What has been changed?

  • ShieldAlert import: WorkoutScreen.tsx renders <ShieldAlert /> but never imported it, so the lint step fails with react/jsx-no-undef. Added ShieldAlert to the existing lucide-react import.
  • Legal screens typing: App.tsx compares currentScreen against "privacy" and "terms&conditions" and renders both screens (and WelcomeScreen navigates to them), but neither was a member of the Screen union, so tsc failed with TS2367. Added both to the Screen union, added their SCREEN_TRANSITIONS entries (["welcome"]), and allowed them as transitions from welcome.

🔹 Why are these changes needed?

  • A used-but-unimported component breaks lint, and comparing currentScreen to string literals outside its type breaks the type-check. Together they fail CI for every branch. These two small fixes make main build and lint cleanly again so open PRs can go green.

🛠️ Type of Change

  • 🐛 Bug Fix

🧪 Testing

✅ Tests Performed

  • Tested locally
  • npx tsc --noEmit is clean (with dependencies installed, matching CI); the previously failing TS2367 errors on App.tsx are gone.
  • npx eslint on the changed files is clean; the react/jsx-no-undef error on WorkoutScreen.tsx:1035 is resolved.
  • Verified welcome can transition to privacy / terms&conditions and each returns to welcome.

🌐 Browsers Tested

Not applicable (build/type fix; no runtime behavior change beyond the legal-screen navigation already present).


📷 Screenshots / Demo (if applicable)

Not applicable.


📋 Checklist

  • I have read the project's CONTRIBUTING guidelines
  • My code follows the project style guidelines
  • I have performed a self-review of my code
  • I have tested my changes locally
  • I have added/updated documentation where necessary (not applicable)
  • My changes do not introduce new warnings or errors
  • This PR is linked to an existing issue

💬 Additional Notes

Branched from upstream/main; merges cleanly. This unblocks CI for the other open PRs, which are currently red only because of this main breakage (a Markdown-only PR fails at the same lint step).

The build has been failing on main for every PR. Two causes:

WorkoutScreen.tsx renders <ShieldAlert /> but never imported it, so the
lint step fails with react/jsx-no-undef. Add ShieldAlert to the
lucide-react import.

App.tsx compares currentScreen against "privacy" and "terms&conditions"
and renders both screens, but neither is in the Screen union, so tsc
fails with TS2367. Add both to the union and to SCREEN_TRANSITIONS, and
allow them from welcome (WelcomeScreen navigates to them).
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

@Anexus5919 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Anexus5919

Copy link
Copy Markdown
Contributor Author

@Somil450 Kindly have a review on this pr. Thanks!

@Somil450 Somil450 self-requested a review July 9, 2026 09:43
@Somil450 Somil450 added gssoc-26 Marks GSSoC issues gssoc:approved Officially reviewed and approved GSSoC contribution ready for scoring mentor:Somil450 Reviewed and mentored by Somil450 for GSSoC contribution tracking. level:intermediate Moderate complexity requiring good understanding of project structure and implementation. type:bug mentor-approved labels Jul 9, 2026
@Somil450 Somil450 merged commit 4acbb92 into Somil450:main Jul 9, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Officially reviewed and approved GSSoC contribution ready for scoring gssoc-26 Marks GSSoC issues level:intermediate Moderate complexity requiring good understanding of project structure and implementation. mentor:Somil450 Reviewed and mentored by Somil450 for GSSoC contribution tracking. mentor-approved type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken build on main: ShieldAlert not imported + legal screens missing from Screen type

2 participants