Skip to content

feat(home): Trending DNA 블렌드 배선 + Suspense 스트리밍 (#848)#954

Open
thxforall wants to merge 1 commit into
devfrom
feat/848-home-dna-trending
Open

feat(home): Trending DNA 블렌드 배선 + Suspense 스트리밍 (#848)#954
thxforall wants to merge 1 commit into
devfrom
feat/848-home-dna-trending

Conversation

@thxforall

Copy link
Copy Markdown
Contributor

What

홈 "Trending Style" 레일을 DNA 블렌드 /feed/trending 으로 배선(#848 AC1/AC2) + 홈 hero-first Suspense 스트리밍(AC4).

Why

/feed/trending(Style DNA mood 블렌드, blend_with_dna)은 #663(2026-06-12)에 백엔드가 구축됐으나 FE 가 소비하지 않아 홈 Trending 은 글로벌 sort=popular 였음(미완 배선, 폐기된 적 없음). 또 홈은 6개 fetch 를 Promise.all 로 전부 await 해 hero(above-the-fold)가 느린 below-fold fetch 에 블록됨.

Changes

  • AC1/AC2TrendingRail(client): useTrending() → 로그인=Style DNA mood 블렌드, 게스트=글로벌(customInstance 세션 Bearer 자동분치, 로그아웃 시 미부착 → 엔드포인트가 스스로 개인화/글로벌 분기). 라벨 "Trending Style" 유지 — DNA 는 실제 트렌딩 포스트의 랭킹 가중치지 조작 세트가 아님(≠글로벌을 "For you" 로 오라벨). /feed/trending 이 24h 윈도우라 개인화 결과가 짧을 때 글로벌 seed 로 top-up(id dedupe, HOME_RAIL_LIMIT).
  • AC4page.tsx 가 hero 만 await, discovery(popular/recent/mood/warehouse/curations)를 async server HomeDiscovery + <Suspense fallback={<DiscoverySkeleton/>}> 로 hero-first 스트리밍. HomeShell = {hero, discoverySlot} slot 패턴(client shell 이 server subtree 수신).
  • feedItemToLookCard 공유 매퍼 추출(server=warehouse enrich / client=원본). serverApiGetrevalidate 공유캐시라 per-user 개인화 불가 → DNA 블렌드는 클라이언트 fetch 필연.
  • AC3(Hero 자동회전 정지, WCAG 2.2.2)는 PR feat(home): Hero 캐러셀 자동회전 정지/제어 (WCAG 2.2.2) (#848) #916 에서 완료.

Verification

  • tsc 순증 에러 0 — 내 파일에 남는 tsc 에러(StyleSampleItem.colors/moods·CurationListItem.slug/posts)는 원본 page.tsx 에서 verbatim 이관한 generated-model drift(레포 전반 기존 debt, origin/dev 원본에 동일 존재).
  • lint clean · vitest 23 pass(TrendingRail 6: 게이팅·seed-during-loading·DNA swap·top-up dedup·non-http filter·empty + HomeDiscovery locale 2: 로케일 baseline: 홈 i18n + 헤더 스위처 + RSC locale audit #838 RSC locale audit 이관 보존 + 기존 홈 15).
  • 라이브 QA(로컬 dev): 로그아웃 홈 Trending/Fresh 렌더·hydration 0·콘솔 0·/feed/trending 미호출(정직) · reduced-motion AC3 무회귀.
  • 2축 리뷰(mp-review): Standards+Fowler APPROVE(CRIT/HIGH/MED 0) · Spec 4 AC PASS. 실질 findings(sparse-rail top-up) 반영.

Scope notes

  • AC1 티켓 문구의 "최근 디코드/Fresh" 는 의도적 스코프 아웃 — Fresh=recency 신호라 DNA 블렌드 시 chronology 및 AC2(정직성) 위반. Trending 만 전환(Spec 리뷰어도 정당 스코핑 확인).
  • 로그인 DNA 스왑은 유닛+엔드포인트로 검증(브라우저 auth 세팅은 별도).

Closes #848

🤖 Generated with Claude Code

AC1/AC2 — TrendingRail(client)이 useTrending()로 /feed/trending 소비:
로그인=Style DNA mood 블렌드, 게스트=글로벌(customInstance Bearer 자동분기).
라벨 "Trending Style" 유지 — DNA는 실제 트렌딩 포스트의 랭킹 가중치지
조작된 세트가 아님(≠"For you" 오라벨). /feed/trending 이 24h 윈도우라
개인화 결과가 짧을 때 글로벌 seed 로 top-up(dedup, HOME_RAIL_LIMIT).

AC4 — page.tsx 가 hero(above-the-fold)만 await, discovery(popular/recent/
mood/warehouse/curations)를 async server HomeDiscovery + <Suspense> 로
hero-first 스트리밍. HomeShell {hero, discoverySlot} slot 패턴(client shell
이 server subtree 를 slot 으로 수신).

feedItemToLookCard 공유 매퍼 추출(server=warehouse enrich / client=원본).
serverApiGet 은 revalidate 공유캐시라 개인화 불가 → 클라이언트 fetch 필연.
백엔드 blend_with_dna 는 #663 에 이미 구축(FE 배선만 미완).

테스트: TrendingRail 6(게이팅·seed-during-loading·DNA swap·top-up dedup·
non-http filter·empty) + HomeDiscovery locale 2(#838 RSC locale audit 이관
보존). tsc 순증 0(pre-existing generated-model drift 만) · 2축 리뷰 반영.

AC3(Hero a11y)는 PR #916 에서 완료.

Refs #848

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@thxforall thxforall added the bump:patch Bug fixes / internal refactor label Jul 13, 2026
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
decoded-app Ready Ready Preview, Comment Jul 13, 2026 6:37am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump:patch Bug fixes / internal refactor

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant