Skip to content

feat: compact two-row kit layout with brand-logo platform selector - #7

Merged
AhmedFr merged 1 commit into
mainfrom
feat/kit-layout-simplify
Jun 21, 2026
Merged

AhmedFr merged 1 commit into
mainfrom
feat/kit-layout-simplify

Conversation

@AhmedFr

@AhmedFr AhmedFr commented Jun 21, 2026 •

Copy link
Copy Markdown
Owner

What & why

The kit page (/runs/[id]) stacked too many full-width rows before any content — wizard stepper, an eyebrow, a large core.essence title (often 3 lines), an always-open Launch Plan card, the platform pills, and a toolbar with four action buttons — forcing a scroll to reach the actual kit. This compacts it to two rows so content sits above the fold.

Direction was chosen interactively against a throwaway /runs/mockup harness (four switchable layouts, sample data, no API). The maintainer picked a refined "plan-as-a-tab" layout; the mockup has been deleted.

New layout

  • Header: product name only + Start over (secondary) and Export (primary) icon actions on the right. (Eyebrow and large essence title removed.)
  • Toolbar: a Plan tab + a platform selector using real brand logos, with the Edit · Launch ops · Preview tabs on the right.
  • Launch Plan now opens in the content area via its Plan tab instead of a permanent card pushing everything down.
  • Dropped from this screen: the eyebrow, Copy all, and per-platform Regenerate (Export covers the kit; every field keeps its own Copy). Launch ops stays a Product-Hunt-only tab.

New component

  • components/brand/PlatformLogo — brand logos via Simple Icons (Product Hunt, Hacker News/Y, Reddit, X) in brand colors; AppSumo (no open logo) uses a monogram fallback.

Accessibility preserved: logo-only selector buttons carry aria-label (e.g. "Hacker News"), so existing role/name queries and the view-tab names ("Launch ops") keep working.

How it was tested

Verified the real PostKit (not just the mockup) in the browser with sample data: header, logo selector, view tabs, the Launch ops tab (PH only), and the Plan tab swapping the content area — all render and switch correctly, content above the fold.

  • pnpm test — 88 passed (16 files)
  • pnpm typecheck
  • pnpm lint
  • pnpm build

Checklist

  • Follows the single-responsibility / per-component folder structure (new PlatformLogo folder)
  • No secrets, API keys, or .env values committed
  • README / docs updated if behavior or configuration changed (n/a — no behavior/config change beyond UI layout)
  • Screenshots included for UI changes

Screenshots / notes

  • Screenshots not committed (captured during review via the now-deleted mockup harness). The visible change: a two-row header/toolbar with brand-logo platform chips, the Launch Plan moved behind a Plan tab, and Copy all / Regenerate removed from the kit screen.
  • Behavior change to flag: per-platform Regenerate and Copy all are no longer surfaced on the kit page (per the agreed design). The regeneration API route still exists; it's just not wired to UI here. Easy to reintroduce if missed.
  • AppSumo has no official open SVG logo, so it uses a brand-yellow "AS" monogram chip.

Summary by CodeRabbit

  • New Features

    • Added plan mode UI with a unified Export button for plan and platform markdown exports
    • Added platform visual indicators for improved kit navigation
  • Removals

    • Removed platform-by-platform regeneration functionality
    • Removed bulk copy-all feature for platform kits
  • Bug Fixes

    • Streamlined generation failure notifications to display only failed platforms

Replace the tall stacked header (eyebrow + large essence title + always-open
Launch Plan card + pills + toolbar) with two compact rows so content sits above
the fold:

- Header: product name only, with Start over (secondary) and Export (primary)
  icon actions on the right.
- Toolbar: a Plan tab + platform selector using real brand logos (Product Hunt,
  Hacker News, Reddit, X via Simple Icons; AppSumo monogram), with the
  Edit/Launch ops/Preview tabs on the right. The Launch Plan opens in the content
  area via its Plan tab instead of a permanent card on top.
- Drop the eyebrow, Copy all, and per-platform Regenerate from this screen
  (Export covers the kit; each field keeps its own Copy). Launch ops stays a
  Product-Hunt-only tab.

Add a reusable PlatformLogo component. Update PostKit props/tests accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
launch-kit Ready Ready Preview, Comment Jun 21, 2026 1:14pm

@coderabbitai

coderabbitai Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Removes per-platform regeneration and "copy all" functionality from PostKit and RunPage. Introduces a planMode state and a rebuilt toolbar with a logo-based platform selector using a new PlatformLogo brand component. The PostKitProps type drops three removed props, and the generation failure toast is shortened.

Changes

PostKit Plan Mode Refactor

Layer / File(s) Summary
PlatformLogo brand component
components/brand/PlatformLogo/PlatformLogo.types.ts, components/brand/PlatformLogo/PlatformLogo.tsx, components/brand/PlatformLogo/index.ts
Defines PlatformLogoProps, a MARKS mapping per PlatformId, and a PlatformLogo component that renders an SVG path or a monogram span. Barrel-exported via index.ts.
PostKitProps contract and state refactor
components/post-kit/PostKit/PostKit.types.ts, components/post-kit/PostKit/PostKit.tsx
Removes onRegeneratePlatform, regeneratingPlatform, and onCopyAll from PostKitProps. Updates imports to include PlatformLogo and new Lucide icons, drops regeneration and runtime-config imports, and replaces regeneration state with planMode.
PostKit toolbar and content area rebuild
components/post-kit/PostKit/PostKit.tsx, components/post-kit/PostKit/PostKit.test.tsx
Replaces the hero header and per-platform regenerate/copy toolbar with a compact header (Export/Start Over), a logo-based platform selector, conditional view tabs, and a content switch that shows LaunchPlan when planMode is active. Test helper updated to remove the dropped props.
RunPage wiring and toast update
app/runs/[id]/page.tsx
Removes the three dropped props from PostKit JSX. Shortens the generation failure toast to list only failed platforms, removing prior regeneration guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • AhmedFr/launch-kit#1: Initial Post Kit UI setup that introduced per-section regeneration and bulk copy/export actions, which this PR directly removes and replaces.
  • AhmedFr/launch-kit#2: Introduced the per-platform regeneration state (regeneratePlatform/regeneratingPlatform) in RunPage and PostKit that this PR removes.

Poem

🐇 Hop, hop, away with the old regenerate button!
No more platform-by-platform rebuilding for nuttin'.
A shiny new logo marks each platform's lane,
planMode glows bright where the toolbar once reigned.
The rabbit refactored, and nothing was plain — ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: a compact two-row kit layout with a brand-logo platform selector, which is the primary visual refactoring of this PR.
Description check ✅ Passed The description comprehensively covers all required sections with detailed explanations of what changed, why, how it was tested, and accessibility considerations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kit-layout-simplify

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/post-kit/PostKit/PostKit.tsx`:
- Line 52: Add explicit `type="button"` attribute to all plain button elements
in the PostKit component to prevent them from defaulting to submit behavior and
accidentally submitting surrounding forms. Locate the three button elements at
lines 52, 71, and 98 in PostKit.tsx and add the type attribute to each one to
explicitly set them as regular buttons rather than submit buttons.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3847cc9d-581d-4827-86c7-82c4a545ae31

📥 Commits

Reviewing files that changed from the base of the PR and between 6394bdf and 055c75e.

📒 Files selected for processing (7)
  • app/runs/[id]/page.tsx
  • components/brand/PlatformLogo/PlatformLogo.tsx
  • components/brand/PlatformLogo/PlatformLogo.types.ts
  • components/brand/PlatformLogo/index.ts
  • components/post-kit/PostKit/PostKit.test.tsx
  • components/post-kit/PostKit/PostKit.tsx
  • components/post-kit/PostKit/PostKit.types.ts
💤 Files with no reviewable changes (2)
  • components/post-kit/PostKit/PostKit.test.tsx
  • components/post-kit/PostKit/PostKit.types.ts

<div className="flex flex-wrap items-center gap-1.5">
{plan && (
<>
<button

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Set explicit type="button" on toolbar buttons.

These plain <button> elements default to submit behavior and can accidentally submit a surrounding form.

Proposed fix
               <button
+                type="button"
                 onClick={() => setPlanMode(true)}
                 aria-label="Launch plan"
@@
               <button
                 key={p.id}
+                type="button"
                 disabled={!ready}
                 aria-label={p.name}
@@
               <button
                 key={v}
+                type="button"
                 onClick={() => setView(v)}
                 className={`whitespace-nowrap rounded-md px-3 py-1.5 text-sm transition-colors ${

Also applies to: 71-71, 98-98

🧰 Tools
🪛 React Doctor (0.5.6)

[warning] 52-52: Your users can submit the form by accident because a <button> with no type defaults to submit.

Set an explicit button type so plain buttons do not submit forms by accident: type="button", "submit", or "reset".

(button-has-type)


[warning] 52-52: This JSX crashes because React isn't in scope.

If you're on React 17+ with the new JSX transform, disable this rule. Otherwise import React at the top of the file.

(react-in-jsx-scope)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/post-kit/PostKit/PostKit.tsx` at line 52, Add explicit
`type="button"` attribute to all plain button elements in the PostKit component
to prevent them from defaulting to submit behavior and accidentally submitting
surrounding forms. Locate the three button elements at lines 52, 71, and 98 in
PostKit.tsx and add the type attribute to each one to explicitly set them as
regular buttons rather than submit buttons.

@AhmedFr
AhmedFr merged commit 8356325 into main Jun 21, 2026
4 checks passed
@AhmedFr
AhmedFr deleted the feat/kit-layout-simplify branch June 21, 2026 13:55

This branch was successfully deployed

1 active deployment
Preview — 055c75e5 Deployed Jun 21, 2026 by vercel[bot]
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