Skip to content

fix: update repository base path and build sync scripts to CompTeam - #9

Merged
Roonil03 merged 5 commits into
mainfrom
r03
Nov 3, 2026
Merged

Roonil03 merged 5 commits into
mainfrom
r03

Conversation

@Roonil03

@Roonil03 Roonil03 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Bug Description

When accessing the deployed GitHub Pages site at https://iecse.github.io/CompTeam/, the page rendered as a completely blank white screen.

Expected:
The React application loads and displays the IECSE Competitive Programming Team ratings and offline stats dashboard.

Actual:
The page displayed a blank white screen because the browser encountered HTTP 404 errors when attempting to load the JavaScript bundle and stylesheet.

Root Cause

The repository was migrated to iecse/CompTeam, but �ite.config.ts, scripts/check-pages-root.mjs, and scripts/sync-pages-root.mjs retained the previous fallback value of CompTeamDemo. Consequently:

  1. Root index.html was published with asset URLs pointing to /CompTeamDemo/assets/... instead of /CompTeam/assets/....
  2. When served on https://iecse.github.io/CompTeam/, the browser requested assets from the non-existent /CompTeamDemo/ path, received 404s, and failed to mount the React app.
  3. CI quality.yml and root sync scripts lacked input normalization (trailing slashes, .git, empty strings) and explicit missing file guards for dist/index.html and dist/assets.

Fix Description

  1. Updated Vite's base path in �ite.config.ts to default to CompTeam and added robust sanitization for process.env.GITHUB_REPOSITORY ( rim(), trailing slash removal, .git removal, fallback).
  2. Updated scripts/check-pages-root.mjs and scripts/sync-pages-root.mjs with the matching robust repository name resolution and explicit error guards for missing build outputs.
  3. Normalized root directory path resolution in sync-pages-root.mjs to ensure reliable asset replacement across operating systems.
  4. Recompiled the static build and synchronized the root index.html and �ssets/ to reference /CompTeam/.

How to Reproduce (Before Fix)

  1. Open https://iecse.github.io/CompTeam/ in a browser.
  2. Open Browser DevTools -> Network and Console tabs.
  3. Observe 404 responses for /CompTeamDemo/assets/... and a blank white screen.

How to Verify (After Fix)

  1. Run
    pm run build locally.
  2. Run
    pm run sync:pages-root and
    pm run check:pages-root.
  3. Verify index.html references /CompTeam/assets/... and all assets are located in �ssets/.
  4. Deploy/merge to main and navigate to https://iecse.github.io/CompTeam/ to confirm the application renders properly.

Impact Assessment

  • Severity: Critical
  • Users affected: All
  • Duration: Since repository migration

Regression Risk

Low. Changes align the project base path and build checks with the repository name CompTeam.

Checklist

  • Root cause identified and documented above
  • Fix addresses the root cause (not just symptoms)
  • Added test to prevent regression
  • Existing tests pass locally
  • Tested the specific reproduction steps

Related Issues

Fixes blank white screen on https://iecse.github.io/CompTeam/.

@Roonil03
Roonil03 merged commit 43d2638 into main Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant