You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The publish pane composes a post by wiring `` (#43) live to the same caption + images state the user is editing, scoped to the active platform's `preview` config (from Extra-Chill/data-machine-socials#140).
As the user types in the caption textarea or adds/removes images, the preview updates in real time alongside the composer.
Layout
Publish pane becomes a two-column layout on wider screens, single-column stack on narrow:
On narrow viewports (< ~960px), the preview moves under the composer in a collapsible "Preview" panel (open by default).
Identity for feed-surface platforms
The `identity` prop on `` (for `previewSurface: 'feed'`) is built from the platform's `label` and `username` already in `SocialPlatformConfig`. Avatar URL is optional — for v1 we just render initials in a circle if none is provided. Future: handlers could expose an `avatar_url` field, but v1 doesn't require it.
State plumbing
The publish pane already has `caption` and `imageUrls` in local state. After #39, `imageUrls` becomes the richer `images: Array<{ url, alt?, title? }>`. The preview reads the same state — no synchronization layer needed, both panels are siblings under one component.
Performance
Caption typing should not jitter. Use `useMemo` on the caption highlighting render, debounce nothing — typing should feel immediate. The image grid layout is CSS, so adding/removing images is cheap.
For very long captions or many images, the preview render is still well under a frame budget — no virtualization needed.
Empty / loading states
No images yet: show the preview surface with the placeholder image area greyed out and a hint "Select images to preview"
No caption yet: show the preview surface with the caption area collapsed or showing placeholder text
Loading platforms: existing loading state continues to render the publish pane skeleton; preview just doesn't appear yet
Out of scope
Switching the active platform within the publish pane to compare previews (today, the active platform is selected via the sidebar — that selection drives the publish pane). Side-by-side multi-platform preview is a larger feature deferred for later.
Goal
The publish pane composes a post by wiring `` (#43) live to the same caption + images state the user is editing, scoped to the active platform's `preview` config (from Extra-Chill/data-machine-socials#140).
As the user types in the caption textarea or adds/removes images, the preview updates in real time alongside the composer.
Layout
Publish pane becomes a two-column layout on wider screens, single-column stack on narrow:
```
┌──────────────────────────────────┬─────────────────────────────┐
│ COMPOSER (left) │ PREVIEW (right) │
│ (issues #38 + #39 ordering) │ │
│ │ <PostPreview │
│ • Media picker │ caption={caption} │
│ • Selected images thumbnails │ images={images} │
│ • External URL input │ preview={config.preview}│
│ • Caption textarea │ identity={...} │
│ • Submit / Publish actions │ /> │
└──────────────────────────────────┴─────────────────────────────┘
```
On narrow viewports (< ~960px), the preview moves under the composer in a collapsible "Preview" panel (open by default).
Identity for feed-surface platforms
The `identity` prop on `` (for `previewSurface: 'feed'`) is built from the platform's `label` and `username` already in `SocialPlatformConfig`. Avatar URL is optional — for v1 we just render initials in a circle if none is provided. Future: handlers could expose an `avatar_url` field, but v1 doesn't require it.
State plumbing
The publish pane already has `caption` and `imageUrls` in local state. After #39, `imageUrls` becomes the richer `images: Array<{ url, alt?, title? }>`. The preview reads the same state — no synchronization layer needed, both panels are siblings under one component.
Performance
Caption typing should not jitter. Use `useMemo` on the caption highlighting render, debounce nothing — typing should feel immediate. The image grid layout is CSS, so adding/removing images is cheap.
For very long captions or many images, the preview render is still well under a frame budget — no virtualization needed.
Empty / loading states
Out of scope
Acceptance
Depends on
Closes the redesign
This is the last issue in the socials publish-pane redesign track. After it lands: