From 67030a0a183c4599a09369a71f7b060cb9758ac8 Mon Sep 17 00:00:00 2001 From: DESIREDDY MOHITH REDDY Date: Wed, 24 Jun 2026 10:01:46 +0530 Subject: [PATCH 1/4] feat: System Theme Preference Support #1945 Signed-off-by: DESIREDDY MOHITH REDDY --- index.html | 7 ++++++- src/js/app.js | 21 +++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 09b54a5756..70ea7304d4 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,12 @@ // Theme restoration - runs early to prevent FOUC (function(){ try { - if (localStorage.getItem('theme') === 'dark') { + const savedTheme = localStorage.getItem('theme'); + if (savedTheme === 'dark') { + document.documentElement.classList.add('dark'); + } else if (savedTheme === 'light') { + document.documentElement.classList.remove('dark'); + } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { document.documentElement.classList.add('dark'); } } catch(e) { diff --git a/src/js/app.js b/src/js/app.js index d1c9415db2..660e36b113 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -109,9 +109,26 @@ const CONTACT_TIPS = { // ══════════════════════════════════════════════ (function initTheme() { try { - const saved = localStorage.getItem('theme') || 'light'; - document.documentElement.classList.toggle('dark', saved === 'dark'); + const saved = localStorage.getItem('theme'); + if (saved === 'dark') { + document.documentElement.classList.add('dark'); + } else if (saved === 'light') { + document.documentElement.classList.remove('dark'); + } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + document.documentElement.classList.add('dark'); + } else { + document.documentElement.classList.remove('dark'); + } updateThemeIcon(); + + if (window.matchMedia) { + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { + if (!localStorage.getItem('theme')) { + document.documentElement.classList.toggle('dark', e.matches); + updateThemeIcon(); + } + }); + } } catch (e) { console.warn('Theme init failed:', e); } From 875e74e12ef3a537f17a342aff37a0cb1a8059eb Mon Sep 17 00:00:00 2001 From: DESIREDDY MOHITH REDDY Date: Wed, 24 Jun 2026 10:05:56 +0530 Subject: [PATCH 2/4] ci: fix program validator and tenet review quota errors Signed-off-by: DESIREDDY MOHITH REDDY --- .../program-classification-validator.yml | 17 ++++++++++++++--- .github/workflows/tenet-pr-review.yml | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/program-classification-validator.yml b/.github/workflows/program-classification-validator.yml index 5ceac5eaf9..9add797f1a 100644 --- a/.github/workflows/program-classification-validator.yml +++ b/.github/workflows/program-classification-validator.yml @@ -89,21 +89,32 @@ jobs: if ( body.includes('program: gssoc') || - body.includes('- [x] gssoc') + body.includes('- [x] gssoc') || + body.includes('program\ngssoc') || + body.includes('program\r\ngssoc') || + body.includes('- [x] i am contributing under gssoc') || + body.includes('- [x] i am participating via gssoc') ) { detected.add('gssoc'); } if ( body.includes('program: nsoc') || - body.includes('- [x] nsoc') + body.includes('- [x] nsoc') || + body.includes('program\nnsoc') || + body.includes('program\r\nnsoc') || + body.includes('- [x] i am contributing under nsoc') || + body.includes('- [x] i am participating via nsoc') ) { detected.add('nsoc'); } if ( body.includes('program: general') || - body.includes('- [x] general contribution') + body.includes('- [x] general contribution') || + body.includes('program\ngeneral') || + body.includes('program\r\ngeneral') || + body.includes('- [x] i am a general contributor') ) { detected.add('general'); } diff --git a/.github/workflows/tenet-pr-review.yml b/.github/workflows/tenet-pr-review.yml index bc41e63880..3539f9cd41 100644 --- a/.github/workflows/tenet-pr-review.yml +++ b/.github/workflows/tenet-pr-review.yml @@ -49,6 +49,7 @@ jobs: - name: Run TENET PR Review if: steps.key_check.outputs.has_key == 'true' + continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TENET_AI_KEY: ${{ secrets.TENET_AI_KEY }} From 161353845422034ca2623edb551a3eaf2572f81a Mon Sep 17 00:00:00 2001 From: DESIREDDY MOHITH REDDY Date: Wed, 24 Jun 2026 10:13:07 +0530 Subject: [PATCH 3/4] ci: address code review feedback Signed-off-by: DESIREDDY MOHITH REDDY --- .../program-classification-validator.yml | 29 ++++++++----------- .github/workflows/tenet-pr-review.yml | 1 - 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/program-classification-validator.yml b/.github/workflows/program-classification-validator.yml index 9add797f1a..22778b2bda 100644 --- a/.github/workflows/program-classification-validator.yml +++ b/.github/workflows/program-classification-validator.yml @@ -86,35 +86,30 @@ jobs: // ------------------------------------ // Metadata // ------------------------------------ + + const normalizedBody = body.replace(/\r\n/g, '\n'); + const has = (re) => re.test(normalizedBody); if ( - body.includes('program: gssoc') || - body.includes('- [x] gssoc') || - body.includes('program\ngssoc') || - body.includes('program\r\ngssoc') || - body.includes('- [x] i am contributing under gssoc') || - body.includes('- [x] i am participating via gssoc') + has(/\bprogram\s*:\s*gssoc\b/i) || + has(/^\s*[-*]\s*\[x\]\s*(gssoc|i am contributing under gssoc|i am participating via gssoc)\b/im) || + has(/\bprogram\n\s*gssoc\b/i) ) { detected.add('gssoc'); } if ( - body.includes('program: nsoc') || - body.includes('- [x] nsoc') || - body.includes('program\nnsoc') || - body.includes('program\r\nnsoc') || - body.includes('- [x] i am contributing under nsoc') || - body.includes('- [x] i am participating via nsoc') + has(/\bprogram\s*:\s*nsoc\b/i) || + has(/^\s*[-*]\s*\[x\]\s*(nsoc|i am contributing under nsoc|i am participating via nsoc)\b/im) || + has(/\bprogram\n\s*nsoc\b/i) ) { detected.add('nsoc'); } if ( - body.includes('program: general') || - body.includes('- [x] general contribution') || - body.includes('program\ngeneral') || - body.includes('program\r\ngeneral') || - body.includes('- [x] i am a general contributor') + has(/\bprogram\s*:\s*general\b/i) || + has(/^\s*[-*]\s*\[x\]\s*(general contribution|i am a general contributor)\b/im) || + has(/\bprogram\n\s*general\b/i) ) { detected.add('general'); } diff --git a/.github/workflows/tenet-pr-review.yml b/.github/workflows/tenet-pr-review.yml index 3539f9cd41..bc41e63880 100644 --- a/.github/workflows/tenet-pr-review.yml +++ b/.github/workflows/tenet-pr-review.yml @@ -49,7 +49,6 @@ jobs: - name: Run TENET PR Review if: steps.key_check.outputs.has_key == 'true' - continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TENET_AI_KEY: ${{ secrets.TENET_AI_KEY }} From d21bd42a59893be7e4745f038e12ccfce2303d34 Mon Sep 17 00:00:00 2001 From: DESIREDDY MOHITH REDDY Date: Fri, 26 Jun 2026 01:21:05 +0530 Subject: [PATCH 4/4] feat: Consolidate Third-Party CDN Fallbacks Fixes SonarCloud warnings and DCO Signed-off-by: DESIREDDY MOHITH REDDY --- .../program-classification-validator.yml | 2 +- index.html | 83 ++++++++++++------- src/js/app.js | 6 +- 3 files changed, 59 insertions(+), 32 deletions(-) diff --git a/.github/workflows/program-classification-validator.yml b/.github/workflows/program-classification-validator.yml index 22778b2bda..8c58e82d17 100644 --- a/.github/workflows/program-classification-validator.yml +++ b/.github/workflows/program-classification-validator.yml @@ -24,7 +24,7 @@ jobs: if: | github.event.pull_request.draft == false && - github.actor != 'github-actions[bot]' + github.event.sender.login != 'github-actions[bot]' runs-on: ubuntu-latest diff --git a/index.html b/index.html index 70ea7304d4..810b68e835 100644 --- a/index.html +++ b/index.html @@ -38,35 +38,62 @@ } - - - - - diff --git a/src/js/app.js b/src/js/app.js index 660e36b113..e2ca2cf414 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -114,15 +114,15 @@ const CONTACT_TIPS = { document.documentElement.classList.add('dark'); } else if (saved === 'light') { document.documentElement.classList.remove('dark'); - } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + } else if (globalThis.matchMedia?.('(prefers-color-scheme: dark)').matches) { document.documentElement.classList.add('dark'); } else { document.documentElement.classList.remove('dark'); } updateThemeIcon(); - if (window.matchMedia) { - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { + if (globalThis.matchMedia) { + globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { if (!localStorage.getItem('theme')) { document.documentElement.classList.toggle('dark', e.matches); updateThemeIcon();