Skip to content

fix: preserve theme and Gravatar geometry, streamline font loading - #81

Merged
ooMia merged 13 commits into
mainfrom
lighthouse-navigation-improvements
Oct 16, 2026
Merged

ooMia merged 13 commits into
mainfrom
lighthouse-navigation-improvements

Conversation

@ooMia

@ooMia ooMia commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Home 초기 로딩의 CSS·폰트 비용을 줄이고, Gravatar 카드의 여백과 테마 변경 직후 이동 시 선택이 유실되는 문제를 고칩니다. 모바일 LCP·화면 밀림은 일부 실행에서 재발하여 미해결이며, #85 완료를 주장하지 않습니다. 반복 실험은 중단하고 근거를 기록했습니다.

  • Gravatar는 제공자 치수 대신 336×402를 사용합니다. oEmbed 조회·geometry 캐시를 제거했으며, native lazy iframe과 좁은 화면에서 전체 카드 축소를 유지합니다. 실제 데스크톱/390px 화면에서 내부 여백·잘림을 확인했습니다. 제공자 내부 이미지·CSS·응답 정책은 잔여 외부 의존성입니다.
  • 헤더가 Fumadocs의 public useTheme().setTheme를 클릭 시 동기 호출하여 즉시 Home↔Article로 이동해도 선택이 유지됩니다. 같은 provider/bootstrap을 사용합니다.
  • 기존 서체를 보존하면서 Space Grotesk/Literata에는 Astro local Fonts API를, 대용량 한국어 Unicode 선언에는 유지되는 Fontsource의 캐시 가능한 외부 CSS를 사용합니다. Noto Sans KR variable 파일은 굵기 간 공유하며, Article용 Gowun/Literata는 해당 경로에만 등록합니다. Home은 Hero 폰트만 preload합니다.
  • 작은 폰트도 파일로 제공하여 font-src 'self'를 지킵니다. 폰트의 data URL 인라이닝으로 발생한 실제 CSP 실패를 고쳤으며 정책을 완화하지 않았습니다.
  • featured 이미지의 높은 priority와 예약 비율, Article/list 이미지 lazy 처리, 태그의 배치 측정과 accessible name 개선을 포함합니다. 이미지가 비율을 상속하도록 조정했지만 느린 로딩 중 화면 밀림을 완전히 해소하지는 못했습니다.

검증:

  • 기존 검사·unit·24페이지 빌드 통과. 기존 테마 회귀에 “변경 직후 이동”을 추가하고 로딩 테스트의 파일명·정확한 preload 개수 고정을 실제 등록/경로 분리 검증으로 교체했습니다.
  • 기존 theme/CSP/loading의 desktop/mobile 10개 검사 통과: 800b181 실행. 이후 제품 코드는 cover 비율만 변경했습니다. 8a1ec10 코드 CI 통과.
  • 실제 브라우저에서 Gravatar, 테마 변경 직후 양방향 이동·새로고침, 폰트 화면·preload를 확인했습니다. 저장된 Docs gitlink를 변경하지 않고 실제 Docs 5a2eaff17e6a8136d32c4eb9a32211adde0b9317을 사용했습니다.
  • 기존 Lighthouse 13.4.1 harness와 수동 workflow의 Ubuntu quality/performance 프로필을 재사용했습니다. 전체 브라우저·3개 OS 검증을 반복하지 않았습니다.

성능 결과와 제한:

  • 최종 코드 8a1ec10 비교는 동일 Docs·Chrome·서버에서 baseline 4431d23과 viewport별 각 3회, request-level throttling으로 측정했습니다. 모바일 중앙값 FCP 1.841→1.648s, LCP 2.381→2.256s, Performance 97→98입니다.
  • 그러나 candidate 모바일 3회 중 1회는 LCP 4.312s / CLS 0.122156이었습니다. 앞선 동일 조건 반복에서도 LCP 비교가 역전됐으므로 안정적인 개선·목표 달성을 입증하지 못했습니다. 남은 발생 조건은 미확인입니다.
  • 모바일 초기 전송량 477,370→453,076 B, CSS 72,809→44,986 B, 폰트 요청 26→15개. 폰트 전송량 자체는 263,908→267,301 B로 증가했습니다.
  • 전체 Fonts API의 HTML 팽창/FCP 악화, 브라우저 실행 실패, CSP 실패, 효과가 불명확해 되돌린 동기 decoding 실험과 재발 기록은 font-loading evidence에 남겼습니다. 기존 audit-ID 원인·owner 기록도 보존합니다. 추가 실험은 진행하지 않습니다.

이 결과는 Home의 제한된 비교이며 모든 Article이나 공개 Pages CDN을 대표하지 않습니다. main 병합·Pages 배포·공개 MIME/보안 헤더·공개 성능 검증은 수행하지 않았습니다.

Refs #56
Refs #82
Refs #83
Refs #85

336x402 Gravatar desktop viewport

Complete Gravatar card on a 390px screen

ooMia added 5 commits October 16, 2026 20:47
Preserve the established typefaces and complete Fontsource Unicode coverage. Share Noto variable glyph subsets across weights and keep prose fonts off Home, using Astro's generated CSS, assets and fallback metrics.

Refs #85
Refs #85. Reuse the pinned Lighthouse harness with one immutable Docs snapshot for both builds and retain raw audit evidence.
ooMia added 7 commits October 16, 2026 21:00
Refs #85. Preserve the maintained variable Fontsource stylesheet rather than adding 79KB of Unicode declarations to every HTML document.
Refs #85. Record the accepted controlled comparison and keep the Home stylesheet unchanged.
Refs #85. Keep small Unicode shards external instead of Vite data URL inlining; retain the existing font-src policy.
Refs #85. Only the high-priority above-fold cover uses synchronous decoding; lazy decorative/list images remain asynchronous.
Refs #85. Retain default simulated scoring, allow the existing harness to measure real throttled navigation, and remove the unproven critical decoding change.
Refs #85. Use the cover aspect ratio for image height rather than a cyclic grid percentage; keep contain scaling.
@ooMia ooMia changed the title perf: improve Home Lighthouse navigation, Gravatar loading, and CSP fix: preserve theme and Gravatar geometry, streamline font loading Oct 16, 2026
@ooMia
ooMia marked this pull request as ready for review October 16, 2026 17:32
@ooMia
ooMia merged commit b1bc826 into main Oct 16, 2026
1 check passed
@ooMia
ooMia deleted the lighthouse-navigation-improvements branch October 16, 2026 17:32
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