WealthBriefing rebuild (WIP)#65
Draft
chenaski wants to merge 15 commits into
Draft
Conversation
The real @fr-private/payload-plugin-visual-editing is private to an npm org we don't have local access to. This no-op workspace stub satisfies the import surface so `bun install` succeeds without a token; Vercel keeps its own token. Temporary — revert the workspace:* deps + delete the stub once org access is restored (see packages/fr-visual-editing-stub/README.md).
Replace the frontend design system with the WealthBriefing brand: Onest/Inter fonts, editorial red + teal palette, four section zones (white/light-wash/teal/ black), and editorial type utilities — scoped to apps/cms (shared tailwind-config untouched). Add the hardcoded WB header/footer and the Hero section, plus a temporary /wb-preview route for visual review (removed once wired to a CMS block). First slice of the WealthBriefing rebuild; remaining sections + content model to follow.
multi-tenancy-demo passes framedOnly to VisualEditing.Provider; the stub ignores all props, so accept arbitrary props instead of a fixed shape.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add the 11 remaining WealthBriefing homepage sections as self-contained Payload blocks (Awards, Events, Brand Worlds, Research, People Moves, Featured, Latest News, Comment & Analysis, More Stories + Most Read, Sponsors, Subscribe) plus the WbHero block config/controller, shared WB primitives, and register them all. Point the page route at the hardcoded WB header/footer, add the migration for the new block tables, and add a Local API seed script that composes the whole homepage as a real 'page' document (slug 'wealthbriefing') with the design content and images. Remove the temporary /wb-preview route.
Blob storage was gated on NODE_ENV===production, so media seeded from a local run landed on disk and 404'd on Vercel previews. Add a PAYLOAD_BLOB_ENABLED=true opt-in override, and make the seed re-upload any Media doc whose url isn't already a vercel-storage.com blob URL.
NPM_TOKEN is now available locally and on Vercel, so drop the local no-op stub package and depend on the published visual-editing plugin (^1.0.2) again in both apps/cms and apps/multi-tenancy-demo.
getDefaultMediaId wraps the lookup in Next unstable_cache, which throws 'incrementalCache missing' in standalone `payload run` scripts and migrations. Fall back to a direct uncached lookup there so image-field defaults still resolve.
Every href/cta text field across the 12 WB blocks now uses the shared link() field builder (via a small wbLink wrapper): internal reference, custom URL or custom page, with the CTA label folded into the link. Controllers resolve each link group through prepareLinkProps, keeping the presentational ui unchanged. Labelless variant for whole-card/title links; label kept for standalone CTAs. Subscribe plan CTAs and BrandWorlds latestCta stay plain text (button affordances / decorative labels, not hyperlinks). Regenerated the WB migration to create the tables with the link fields directly, and reseeded the homepage with custom-URL links.
Seed the WB blocks onto the 'home' page (root /) instead of a separate 'wealthbriefing' page, and delete the now-redundant standalone page.
Make the WB header/footer presentational (props in) and render them through the existing Header/Footer collection controllers instead of hardcoded components. Extend the Header config with a region-bar tagline and the Footer config with contact + newsletter groups and a 5th link column; the brand logo stays a static asset (logo field relaxed to optional). Revert the page route to render the CMS <Header>/<Footer>, delete the old Cadence header/footer UI, and seed a single WB header + footer attached to the home page.
The WB site builds pages only from the WB blocks, so drop the 12 demo page blocks (Hero, Content, Faq, TestimonialsList, CardsGrid, Carousel, Logos, Chart, CtaBand, Newsletter, Stats, RawHtml) from the registry, renderer, page default and page text/SEO extractors, and delete their source + tables (one drop migration). Keep the blog: the Posts rich-text editor still uses the inline CardsGrid/Logos/Code/CtaBanner blocks, and GlobalSectionSlot stays. Also drop the now-unused FAQ JSON-LD schema and point the search preview image at the WB hero.
Add seedWbPresets: one preset per WB block, payload taken from the live home page with an optional per-section screenshot as the preview image. Also fix the page Data Cache serving pre-seed content on deployed previews: seeding writes out-of-band and can't call revalidateTag in a request context, so the unstable_cache entry never invalidated. Add a time-based revalidate fallback and a cache-key version to drop the stale entry.
Capture each WB homepage section (from a production build render) and attach it as the preview image on the matching block preset. Also prune stale presets left over from the removed non-WB blocks.
…CTA label - Collapse every nested array (items, cards, events, plans, ...) in the 12 WB blocks by default (admin.initCollapsed) so editing a block no longer renders at intimidating height - Remove the "Custom Page" option from the shared link() field builder and every consumer; links now offer only Internal link + Custom URL. Keeps customPages.ts (still used by the redirects ref resolver). Migration narrows each link-type enum to (reference, custom) and drops the now-unused *_custom_page columns - Add a label option to wbLink() and set proper admin labels on CTA-family links (cta -> "CTA", primaryCta/secondaryCta -> "Primary/Secondary CTA")
Draft saves and publishes reported success in the admin but vanished on reload: the change never reached the database. Root cause: on this serverless Neon setup Payload's wrapped BEGIN/COMMIT silently rolls back - transactional writes (including the version rows Payload creates for every draft save and publish) never commit, with no error surfaced. Raw autocommitted writes to the same connection persist fine. Set transactionOptions: false on the postgres adapter so every write autocommits. Verified against the shared Neon branch: a draft update that previously left the version table untouched now creates and persists a new version. Trade-off: multi-row operations are no longer atomic, the accepted mode for Payload on serverless Postgres.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuilds
apps/cmsas the WealthBriefing editorial site from a Claude Design handoff. Work in progress - opened now so a Neon preview branch is created; not ready to merge.Done
apps/cms(Onest + Inter, editorial red/teal palette, four section zones: white / light-wash / teal / black), replacing the shared design tokens for this app only -apps/devandmulti-tenancy-demountouched/wb-previewroute for visual review (removed once the Hero is a real CMS block)Coming
homepage composed from the new blocksTemporary - must revert before merge
packages/fr-visual-editing-stubis a local no-op standing in for the private@fr-private/payload-plugin-visual-editing(no org npm access locally). Both apps point at it viaworkspace:*. Restore the real package and the^1.0.2ranges once org access is available - see the stub's README🤖 Generated with Claude Code