Skip to content

refactor(flnk): pin launchpad header as fixed card above blocks list - #58

Merged
WuChenDi merged 1 commit into
mainfrom
feat/flnk-launchpads-pinned-header
Jul 3, 2026
Merged

refactor(flnk): pin launchpad header as fixed card above blocks list#58
WuChenDi merged 1 commit into
mainfrom
feat/flnk-launchpads-pinned-header

Conversation

@WuChenDi

@WuChenDi WuChenDi commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

The launchpad editor modeled the page header as a regular content block, while the public renderer treats the profile header as a singleton always rendered first. This PR aligns the editor with reality: the header becomes a pinned card — exactly one, always on top.

Findings fixed:

  • Dead control: the header block's enabled switch had no effect — the public page renders the header based solely on profile content.
  • Pseudo-block: header was addable/movable/deletable, but position, count and deletion never affected the render; multiple header blocks silently edited the same shared config.profile.
  • Hidden entry: new launchpads start with blocks: [], so the name/bio/avatar fields were unreachable until the user discovered "Add block -> Header".

Changes

  • build-tab.tsx: new HeaderCard pinned above the blocks list — edits config.profile, no move/delete/toggle controls, "Pinned" badge, inline avatar preview. Legacy header blocks are filtered on read (dropped from config on next save) via a ContentBlock type guard.
  • blocks.ts: header removed from the add menu; AddableBlockType = Exclude<BlockType, 'header'>; newBlock narrowed.
  • messages/{en,zh}.json: one new key launchpads.build.pinned; existing block.header.* labels reused.

Compatibility: the header schema variant and the renderer's no-op branch are intentionally kept so legacy configs still validate and render unchanged.

Verification

  • pnpm --filter @cdlab996/flnk build passes.
  • biome check clean on all four changed files; the only apps/flnk findings (1 format error, 2 unused suppressions) pre-exist on main and are untouched here.

The profile header is a singleton rendered once from config.profile, but
the editor modeled it as a regular block: its enable switch did nothing,
multiple copies could be added (all editing the same profile), and fresh
launchpads hid the profile fields behind Add block. Replace it with a
permanent pinned card at the top of the build tab that edits
config.profile directly, remove 'header' from the add menu, and filter
legacy header blocks out of the list on read (dropped on next save).
Schema and public renderer are unchanged so existing rows still validate.
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
repo-changelog Skipped Skipped Jul 3, 2026 8:34am

@WuChenDi WuChenDi self-assigned this Jul 3, 2026
@WuChenDi
WuChenDi merged commit 4054968 into main Jul 3, 2026
3 checks passed
@WuChenDi
WuChenDi deleted the feat/flnk-launchpads-pinned-header branch July 3, 2026 13:32
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.

1 participant