- Each reply shows a 回复 button on hover (always visible on touch)
- Click: sets '正在回复 @user' banner, smooth-scrolls to reply box,
focuses textarea; 取消 clears it
- New reply icon (corner-up-left); clear replyTo after submit
- Reply markdown already rendered via renderMarkdown (sanitized)
- /api/users: mark is_super for the earliest-registered admin (matches
the auto-promotion migration semantics)
- AdminUsers: render 超级管理员 badge for is_super, 管理员 otherwise
- i18n keys admin.user.roleSuper (zh/en)
- Mobile settings nav: active tab gets top-left/top-right rounded
corners only (desktop unchanged)
users PK is UUID (no uid=1), so bootstrap super admin via semantics:
if no admin exists, promote the user with earliest created_at. Idempotent
(no-op when an admin already exists), safe on any existing database.
Matches the admin-list ordering (earliest user at the bottom).
Root becomes flex column (header fixed, layout flex:1); scroll
container uses flex:1 + minHeight:0 instead of fixed height:70vh so
portrait/phone screens get full remaining height instead of a short
squished panel.
Dev-only origin allowlist stays 127.0.0.1 by default; LAN devices can
be enabled per-machine via ALLOWED_DEV_ORIGINS=ip1,ip2 without touching
the repo.
One build job pushes linux/amd64 + linux/arm64 together — buildx
creates the multi-arch :next manifest automatically. No manifest job,
no PAT, no repo filter. Node 24.
- IMAGE_NAME pinned to lezi-fun/forumlify-deploy (not github.repository)
- login uses secrets.GHCR_TOKEN (PAT with packages:write) so any repo
(upstream Furrium/forumlify included) can publish to lezi-fun GHCR
- removed repo filter
Add job-level if: github.repository == 'lezi-fun/forumlify-deploy' so
pushes to Furrium/forumlify don't trigger broken builds (uppercase repo
name invalid for docker, and image would target wrong GHCR).
Separate amd64/arm64 jobs push :next-amd64 / :next-arm64; add manifest
job that merges them into :next, :main, semver and sha tags so the
branch tag is a real multi-arch manifest (both platforms).
node:24-windowsservercore* / nanoserver don't exist on Docker Hub (Node
stopped publishing Windows container images; even node:20 Windows tags
are gone). Keep linux/amd64 + linux/arm64 on node 24.
- Linux: build-push-action platforms linux/amd64,linux/arm64
- Windows: separate job on windows-latest (switch to Windows container
engine, native docker build with Dockerfile.windows) → :next-windows
- Dockerfile.windows: node:20-windowsservercore-ltsc2022, bun install,
standalone output
- posts API: ORDER BY is_pinned DESC, pinned_at DESC NULLS LAST before
sort (matches upstream) — pinned posts now appear first
- docker-compose: app service pulls ghcr.io/lezi-fun/forumlify-deploy:next
instead of local build (auto-rebuilt on push)
initOpenNextCloudflareForDev() runs when next.config.js loads → spawns
workerd binary (missing in Docker/node:20-alpine) → build crashes with
ENOENT. The hook is only for opennextjs-cloudflare preview (dev);
production build/deploy doesn't need it.
Docker build failed at npm run build: stale package-lock.json pins
react@18 while next@16 requires react@19. Switch builder to bun install
(bun.lock is current). Add .dockerignore (was shipping 700MB context).
- layout (server): derive language from cookie (user choice) > browser
Accept-Language; set <html lang> accordingly
- I18nInit → I18nProvider: sync initI18n(lng) before children render
(SSR/CSR first render same language, no hydration mismatch)
- setAppLanguage also writes cookie so SSR first paint uses chosen lang
- Verified: en browser → lang=en, zh → zh-CN, cookie overrides
- PostDetail: replies open as drawer (grid-rows animation) automatically
after post loads — no toggle button
- SettingsPage: outer frame overflow hidden (100vh), only inner panel
scrolls; hide #app layout when not on feed (fixes navbar moving when
scrolling settings)
- Title: metadata 'Loading...' → 'Forumlify' (Next resets <title> to
metadata on re-render → title became Loading... after load); unify
title effect (rotate Loading. only while !ready && !forumNameLoaded)
- AdminLinks: link divider uses var(--border) (was #f1f5f9, invisible
in dark mode); add admin.link i18n keys
- AdminPage i18n nav labels
- renderMarkdown: sanitize marked output with sanitize-html (allowed
tags/attrs whitelist, http/https schemes only, strip on* attrs) —
prevents stored XSS in posts/replies/signatures
- schema: reports.post_id ON DELETE CASCADE → SET NULL (keep moderation
history when a reported post is deleted); migration applied to prod DB
cookies().get() without await threw in Next 16 (sync dynamic API
removed), breaking the whole Home SSR render → layout broken, spinner
restart, flash. Await cookies() before reading forumlify-name.
Also raise glass-bg opacity (0.18→0.62 light / 0.35→0.60 dark) so
cards/navbar/modal aren't see-through.
cookies().get() without await threw in Next 16 (sync dynamic API
removed), breaking the whole Home SSR render → layout broken, spinner
restart, flash. Await cookies() before reading forumlify-name.
Also raise glass-bg opacity (0.18→0.62 light / 0.35→0.60 dark) so
cards/navbar/modal aren't see-through.
HomeClient rendered className='app-container' but globals.css only
defines #app (flex) — sidebar/feed fell back to block layout, feed
pushed below. Switch to id='app' to match upstream stylesheet.
Also: AdminPage i18n (nav labels + title).
HomeClient rendered className='app-container' but globals.css only
defines #app (flex) — sidebar/feed fell back to block layout, feed
pushed below. Switch to id='app' to match upstream stylesheet.
Also: AdminPage i18n (nav labels + title).
Root cause of loading spinner restarting / name appearing twice:
React hydration mismatch → whole tree regenerated. Fixed all sources:
- AppProvider: remove typeof window in useState init (SSR/client diff);
read cached forum name in useEffect instead
- ToastProvider: remove createPortal(document.body) (SSR absent →
mismatch)
- LoadingScreen: name container uses dangerouslySetInnerHTML('') so
React never manages/clobbers the inline-script-filled text
- layout.js: inline script moved to body first child (React official
anti-FOUC pattern)
Cache: dynamic pages/API no-cache + ETag (304 on revalidate); static
/_next/static assets immutable 1y. Verified: 304 + immutable headers.
Root cause of loading spinner restarting / name appearing twice:
React hydration mismatch → whole tree regenerated. Fixed all sources:
- AppProvider: remove typeof window in useState init (SSR/client diff);
read cached forum name in useEffect instead
- ToastProvider: remove createPortal(document.body) (SSR absent →
mismatch)
- LoadingScreen: name container uses dangerouslySetInnerHTML('') so
React never manages/clobbers the inline-script-filled text
- layout.js: inline script moved to body first child (React official
anti-FOUC pattern)
Cache: dynamic pages/API no-cache + ETag (304 on revalidate); static
/_next/static assets immutable 1y. Verified: 304 + immutable headers.
Inline script fills cached name into #loadingTitle before React
hydrate; React then saw text mismatch and rewrote the DOM, making the
name appear twice and restarting the spinner animation. Add
suppressHydrationWarning so React keeps the script-filled content.