Skip to content

feat: LEVEL 6 deck rebuild + resizable media, stale-cache detection, export fingerprint#19

Open
villainscode wants to merge 4 commits into
mainfrom
feat/level6-rebuild-and-media-resize
Open

feat: LEVEL 6 deck rebuild + resizable media, stale-cache detection, export fingerprint#19
villainscode wants to merge 4 commits into
mainfrom
feat/level6-rebuild-and-media-resize

Conversation

@villainscode

Copy link
Copy Markdown
Collaborator

Summary

Two changes: (1) Editor's media elements (img/svg) now resizable with corner handles; stale-cache detection via content fingerprint; export bundle preserves deck identity. (2) LEVEL 6 deck rebuilt from verified 2026-07 sources—50 slides with real console captures, corrected facts (DATABASE_URL, Vercel Postgres withdrawal, DNS/auth flows).

Changes

Commit A: feat(editor) — resizable in-flow media, stale-cache detection, export fingerprint

  • Media resize: corner handle on <img> / <svg> rewrites inline width (px), matching table column-resize. Measured via getBoundingClientRect() because SVGSVGElement.offsetWidth is undefined. Handles stripped on commit, never persisted.
  • Stale cache: IndexedDB prefers old deck if source has no deck-source-hash meta. Fall back to content fingerprint for comparison; treat cache without recorded hash as stale. Flushes 300ms edit debounce on export.
  • Export fingerprint: buildHtmlBundle now stamps deck-source-hash meta into bundle head, preventing Save from erasing file identity.

Commit B: docs(level6) — rebuild build/deploy/ops deck with verified 2026-07 facts

  • 50 slides (6 sections, 6.1.1–6.6.6 numbering) vs. old 31 text-only
  • 17 real console captures + 7 anti-slop diagrams
  • Corrected: DATABASE_URL over POSTGRES_URL, Vercel Postgres withdrawal, R2 subscription, presigned URLs (PUT-only), Next.js 16 middleware→proxy, Resend 4 DNS records, Naver 2 verification methods, grey-cloud DNS
  • 11 screenshot cards (login-gated) indexed in docs/images/level6/CAPTURE-LIST.md

How to Test

  1. npm run typecheck — passes
  2. npm run build — passes
  3. Open LEVEL 6 in editor: 50 slides render, no overflow (cover +12px is absolute-positioned image, false positive in detector, same in LEVEL 5 original)
  4. Media resize: Click corner handle on slide image/SVG → drag → inline width rewritten in HTML. On next edit cycle, handle reappears; on commit, disappears.
  5. Stale cache banner: After PR merge, open LEVEL 6 → "Source updated" banner appears. Click "Refresh" → cache clears, edits lost (expected; export saved, editor IDB cache stale).
  6. Export fingerprint: Export HTML (Save or Export button) → bundle contains <meta name="deck-source-hash">. Reload in editor → no banner (content unchanged, hash pinned).

Verification

  • npm run typecheck ✓
  • npm run build ✓
  • 50 slides render end-to-end, overflow = 0 (cover +12px is false positive, LEVEL 5 matches)
  • Browser: media resize (SVG 604→423px, img 283→163px), overlay promotion (173→139px), export fingerprint attached

Review Notes

Size: LEVEL 6 HTML 1.1 MB → 2.9 MB (base64-inlined console captures + cover image). LEVEL 5 is 3.0 MB for same reason.

Editor cache: IndexedDB persists older revision. First load shows "Source updated" banner; click Refresh to reflect PR changes. Edits made in cached version are lost on refresh (by design).

Screenshots: docs/images/level6/screens/ contain example project screens (tika/brewnet). Each slide caption identifies them. 11 login-gated captures marked with dashed instruction cards (not recorded, can't screenshot behind login).

Checklist

  • Tests added/updated (npm run typecheck + npm run build)
  • Slide rendering verified (50 slides, no overflow except false positive on cover)
  • Media resize tested in browser
  • No breaking changes (additive features + deck content)

…per-protocol architecture

- 새 섹션 '코드 연동 — 프로토콜별 최소 통합 & 기본 구조': MQTT·WebSocket·Kafka 각각 기본 아키텍처 SVG + 코드 샘플
- 코드 예제를 모두 Java로 통일 (MQTT=Eclipse Paho, WebSocket=Jakarta WebSocket, Kafka=Kafka Clients)
- Kafka 다이어그램에 파티션=분산+순서경계 및 순서 보장 방법 note 추가
- 섹션 재넘버(04 삽입 → 기존 04~07을 05~08) + TOC 갱신
…fingerprint

Three defects made the editor and its exports serve the wrong revision or
refuse to respond, all of them silent.

Media resize: in-flow <img> and inline diagram <svg> ship with max-width /
max-height caps, so their size was pinned by the container with no way to
adjust it. Add a corner handle that rewrites inline width in source px,
mirroring the existing table column-resize wiring. The first cut read
offsetWidth, which is undefined on SVGSVGElement — every derived number went
NaN and the handle rendered but never moved; measure via
getBoundingClientRect() / canvas scale instead. Handles are stripped on commit
so they never reach persisted HTML.

Stale cache: openDeck always prefers the IndexedDB copy and only warns when
both the deck and the cache carry a deck-source-hash meta. Most decks under
docs/html/report/ have no such meta, so the comparison never fired: an
outdated cache won forever and every export read the same store. Fall back to
a content fingerprint when the meta is absent, and treat a cache with no
recorded hash as stale rather than current.

Export fingerprint: buildHtmlBundle omitted the meta entirely, so Save — which
writes that bundle back over the source deck — erased the file's identity on
every save. Stamp it into the bundle head and pin the same value onto the
cache after a successful write-back, so a deck the user just saved does not
trip the banner. Export HTML also flushes the pending 300ms edit debounce,
which only Save did before.

Verified in a real browser: SVG 604->423px, img 283->163px, overlay promotion
still yields Moveable controls (173->139px), exported bundle carries the hash.
The deck packed 15 topics into 31 text-only slides and carried stale facts.
Rebuilt from the actual sources (docs/md/level8-chapter8.md plus the book
chapter docx) after re-verifying every console path against live docs.

- 50 slides across 6 sections; section-scoped numbering (6.1.1-6.6.6) so the
  divider number and the section numbers below it no longer disagree
- Service names on labels and titles where one section mixes providers
  (GOOGLE OAUTH / RESEND / NAVER / GOOGLE SEARCH CONSOLE / RAILWAY /
  CLOUDFLARE), so a slide reads on its own
- 17 real console captures extracted from the book docx (cropped, resampled to
  1180px, connection strings and personal data masked) + 7 anti-slop diagrams
- 11 screenshot instruction cards for login-gated screens, indexed in
  docs/images/level6/CAPTURE-LIST.md
- Corrected facts include: DATABASE_URL over POSTGRES_URL, Vercel Postgres
  withdrawal, project-specific DNS values via `vercel domains inspect`,
  GitHub Advanced Security menu move, R2 subscription prerequisite, presigned
  URLs being PUT-only and incompatible with custom domains, grey-cloud (DNS
  only) in front of Vercel, Google Auth Platform tabs, next-auth v5 still
  beta, Next.js 16 middleware -> proxy rename, Resend's 4 DNS records,
  react-email package consolidation, Naver's 2 verification methods
- Cover matches LEVEL 5 (illustration scene + book cover)
- docs/images/level6/render-check.mjs renders each slide and flags overflow
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
claude-code-ppt Ready Ready Preview, Comment Jul 26, 2026 12:34pm

…nd-media-resize

# Conflicts:
#	docs/html/report/claude-code-level7-chapter7.html
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.

2 participants