Skip to content

hotfix: Disable analytics to fix gallery clicks - Issue #263#264

Merged
maxrantil merged 2 commits intomasterfrom
hotfix/issue-263-disable-analytics
Jan 2, 2026
Merged

hotfix: Disable analytics to fix gallery clicks - Issue #263#264
maxrantil merged 2 commits intomasterfrom
hotfix/issue-263-disable-analytics

Conversation

@maxrantil
Copy link
Owner

Problem

Gallery images are not clickable on production site (both desktop and mobile) due to analytics server failure.

Root Cause: Analytics server (analytics.idaromme.dk) is down (504 Gateway Timeout), returning HTML error page instead of JavaScript. Browser blocks this with MIME type mismatch error, which breaks React hydration and prevents all client-side interactivity including gallery clicks.

Evidence

Browser Console Errors:

GET https://analytics.idaromme.dk/script.js NS_ERROR_CORRUPTED_CONTENT
MIME type mismatch ("text/html" instead of "application/javascript")

Server Response:

$ curl -I https://analytics.idaromme.dk/script.js
HTTP/2 504 Gateway Time-out
content-type: text/html

Solution

Hotfix: Temporarily disable analytics script loading in analytics-provider.tsx until analytics server is restored.

// HOTFIX Issue #263: Analytics server down (504 timeout)
console.warn('⚠️ Analytics temporarily disabled - server unavailable')
return  // Skip script loading

Impact

  • ✅ Fixes critical bug preventing gallery clicks
  • ⚠️ Temporarily disables analytics tracking
  • ✅ No performance impact (actually improves TTI slightly)
  • ✅ No user-facing changes except gallery works again

Testing

Manual Testing Required:

  1. Deploy to production
  2. Test desktop gallery clicks (Safari, Brave)
  3. Test mobile gallery clicks (iPhone Safari, iPhone Brave with Lockdown Mode)
  4. Verify no JavaScript errors in console
  5. Confirm React hydration completes successfully

Next Steps

After verifying gallery works:

  1. Investigate analytics server issue (Docker container? Nginx config?)
  2. Fix analytics.idaromme.dk
  3. Add error handling to analytics loading (try/catch, fallback)
  4. Re-enable analytics in new PR

Files Changed

  • src/app/components/analytics-provider.tsx: Added early return to disable analytics

Related


Doctor Hubert, please test on your devices after deployment:

  • Desktop laptop (Safari/Brave) - click gallery images
  • iPhone (Lockdown Mode) - tap gallery images
  • Verify navigation to project pages works

Adds comprehensive regression tests to prevent reverting Link components
back to onClick handlers on non-interactive elements.

Unit Tests (11 tests):
- Verify gallery items are Link elements (semantic <a> tags)
- Verify href attributes exist for native navigation
- Verify no role="button" on articles/divs
- Verify JavaScript-free navigation works
- Verify cross-platform consistency

E2E Tests (7 scenarios):
- Simulate Lockdown Mode (JavaScript disabled)
- Verify strict browser security compatibility
- Test keyboard accessibility
- Validate SEO/crawlability with proper links

These tests will catch if anyone accidentally reverts to the broken
pattern that caused iOS Lockdown Mode and desktop browser security
issues (Issue #259).

Related: #259, #260
Analytics server (analytics.idaromme.dk) is down (504 timeout), returning
HTML instead of JavaScript. This causes MIME type mismatch errors that
break React hydration, preventing gallery clicks from working.

HOTFIX: Temporarily disable analytics script loading until server is fixed.

Fixes #263
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

🔍 Lighthouse Performance Report

❌ No Lighthouse results found. Check the workflow logs for details.


This report was generated by Lighthouse CI in GitHub Actions

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

🎯 Performance Budget Summary

Bundle Size Analysis

  • Status: warning
  • Total Size:
  • Budget: 1.5MB (1.45MB in CI)

Lighthouse Performance Validation

Desktop Results

  • Performance Score: Target 98%+
  • LCP: Target <1s
  • CLS: Target <0.05

Mobile Results

  • Performance Score: Target 98%+
  • LCP: Target <1s
  • CLS: Target <0.05

Performance Budget Status

  • Bundle Size: FAILED
  • Lighthouse Budget: PASSED

Next Steps

  • 🔧 Optimize bundle size to meet budget constraints

Generated at $(date)

@maxrantil maxrantil merged commit 61af16e into master Jan 2, 2026
14 of 19 checks passed
@maxrantil maxrantil deleted the hotfix/issue-263-disable-analytics branch January 2, 2026 17:36
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.

Critical: Analytics server down (504) breaking gallery clicks

1 participant