wealth/docs/pages/market/channels-username-posts-id.md

7.6 KiB

Post

/channels/[username]/posts/[id] · apps/{bull,bear}/src/app/(main)/channels/[username]/posts/[id]/page.tsx · Type: blog article · Layout: layout-main.md, layout.md

Field Value
Robots noindex (generateMetadata, from the URL's params only: title پست @username; no read, 0070)
Status 200; another spelling of the username redirects in the stream (meta refresh) to ROUTES.post, because loading.tsx wraps the page; /@username/… answers a real 308 (0064); a username that can't be one renders the channel's not-found.tsx (ChannelMissing), 200; an id that can't be a post's, or a missing post, renders PostMissing in the channel's frame, 200
loading.tsx apps/{bull,bear}/src/app/(main)/channels/[username]/posts/[id]/loading.tsx: bull: MobileTopBar and PostSkeleton delayed; bear: DeskBack and PostSkeleton delayed. The page shows the same PostSkeleton (not delayed) until its reads arrive
First flush none: the server reads nothing (0070); usePostPage reads channelPageQuery(username) and postKeys.detail(id) in the browser
Canonical none
H1 none (debt)
JSON-LD none
Scripts none

Sections

In bull's document order.

Section Data HTML JS Index Notes
MobileTopBar (bull) viewer skeleton hydrate no back to the channel (parentHref from the URL, backToPrevious, 0057); the title waits for the viewer
DeskBack (bear) — streamed hydrate no «بازگشت» to the channel, drawn while the reads load
PostChannelBar channelPageQuery(username) skeleton hydrate no <a href> to the channel: avatar, name, @username
↳ ChannelActions viewer skeleton hydrate no follow and subscribe; own PartBoundary
PostView postKeys.detail(id) skeleton hydrate no read with the session, so a subscriber's or the creator's premium post arrives open; read again if the session was restored after it
↳ Locked post gate viewer skeleton hydrate no guest: login back here; investor: checkout
↳ PreviewBanner viewer none hydrate no the creator's ?preview= of their own premium post
↳ PostLightbox — none interaction no next/dynamic, mounted on the first image tap
↳ Access-ended toast viewer none hydrate no the info toast when access ends mid-read (0050)
PostMissing postKeys.detail(id) none hydrate no instead of PostView when the post is missing, another channel's, or the id can't be a post's; a link back to the channel
ChannelMissing channelPageQuery(username) none hydrate no the channel is unknown
ChannelUnavailable channelPageQuery(username) none hydrate no replaces the bar and post when the channel is suspended

Notes

  • bull: under MobileTopBar, a padded column; bear: the 640px column under «بازگشت».
  • A 404 on the post read is the missing state, not a boundary; any other failed first read throws to (main)/error.tsx. A deleted post's page renders again with router.refresh() and reads the post afresh.
  • 0070's accepted cost: search engines get no post content, and a shared link shows the site card with the پست @username title.
  • Debt: no H1 in either app. Make the post's first line the H1.