refactor(flnk): pin launchpad header as fixed card above blocks list - #58
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
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:
headerwas addable/movable/deletable, but position, count and deletion never affected the render; multiple header blocks silently edited the same sharedconfig.profile.blocks: [], so the name/bio/avatar fields were unreachable until the user discovered "Add block -> Header".Changes
build-tab.tsx: newHeaderCardpinned above the blocks list — editsconfig.profile, no move/delete/toggle controls, "Pinned" badge, inline avatar preview. Legacyheaderblocks are filtered on read (dropped from config on next save) via aContentBlocktype guard.blocks.ts:headerremoved from the add menu;AddableBlockType = Exclude<BlockType, 'header'>;newBlocknarrowed.messages/{en,zh}.json: one new keylaunchpads.build.pinned; existingblock.header.*labels reused.Compatibility: the
headerschema variant and the renderer's no-op branch are intentionally kept so legacy configs still validate and render unchanged.Verification
pnpm --filter @cdlab996/flnk buildpasses.biome checkclean on all four changed files; the onlyapps/flnkfindings (1 format error, 2 unused suppressions) pre-exist on main and are untouched here.