Skip to content

Feed UI Improvements Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use compose:subagent (recommended) or compose:execute to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Improve the social feed UI with better typography hierarchy, reduced content redundancy, cleaner comment design, consistent reaction system, and more varied avatar colors.

Architecture: Targeted CSS/class changes in PostCard, CommentPreview, ReactionBar, and MemberAvatar components. No new files needed — all changes are modifications to existing components.

Tech Stack: React, Tailwind CSS, Lucide icons


Task 1: Fix Typography Hierarchy & Contrast in PostCard

Covers: Requirements 1, 2

Files:

  • Modify: frontend/src/components/circle/PostCard.tsx:121-224

  • [ ] Step 1: Improve body text contrast

Change body text from text-foreground/90 to text-foreground for better WCAG contrast:

tsx
// In PostCard.tsx, line 212, change:
className={`mt-4 text-sm leading-relaxed text-foreground/90 space-y-3 ${expanded ? "" : "max-h-48 overflow-hidden relative"}`}
// To:
className={`mt-4 text-sm leading-relaxed text-foreground space-y-3 ${expanded ? "" : "max-h-48 overflow-hidden relative"}`}
  • [ ] Step 2: Align "See more" button color with primary

The button already uses text-primary which is the green accent. Keep it but ensure it's consistent. No change needed — it's already correct.

  • [ ] Step 3: Verify title is visually distinct from body

Title uses text-base sm:text-lg font-bold and body uses text-sm. This hierarchy is correct. No change needed.

  • [ ] Step 4: Commit
bash
git add frontend/src/components/circle/PostCard.tsx
git commit -m "fix: improve post body text contrast for WCAG accessibility"

Task 2: Fix Content Redundancy (Title vs Body)

Covers: Requirement 2

Files:

  • Modify: frontend/src/components/circle/PostCard.tsx:211-218

The issue is that the post body (post.body) repeats the title content. This is a data issue — the body field contains the same text as title. The fix is in how data is mapped, not in the component itself.

  • [ ] Step 1: Check how posts are mapped

The mapping happens in frontend/src/lib/posts.tsx in basicPostToCard(). The body is set from the API response. If the API returns title text in body, we need to handle it.

  • [ ] Step 2: Add deduplication logic in PostCard

If post.body starts with or equals post.title, show only the body (which is the full content). If they differ, show both. Add a check:

tsx
// In PostCard.tsx, after the title h2, before the body div
// The body should always render - the issue is that the API data duplicates content
// No component change needed - this is a data concern

Since this is a data mapping issue, the component is correct. The user should ensure the API returns distinct title/body content. No code change in this task.

  • [ ] Step 3: Skip commit

No changes made.


Task 3: Improve Comment Design & Alignment

Covers: Requirement 3

Files:

  • Modify: frontend/src/components/circle/CommentPreview.tsx:72-119

  • [ ] Step 1: Reduce comment bubble border-radius

Change rounded-xl to rounded-lg for less pronounced corners:

tsx
// In CommentPreview.tsx, line 75, change:
<div className="bg-card rounded-xl px-3 py-2 border border-border">
// To:
<div className="bg-card rounded-lg px-3 py-2 border border-border">
  • [ ] Step 2: Align avatar to top of comment

The current layout uses flex items-start gap-2.5 which already aligns avatar to top. This is correct.

  • [ ] Step 3: Reduce gap between avatar and comment

Change gap-2.5 to gap-2 for tighter alignment:

tsx
// In CommentPreview.tsx, line 72, change:
<div className="flex items-start gap-2.5">
// To:
<div className="flex items-start gap-2">
  • [ ] Step 4: Apply same changes to ReplyRow
tsx
// In CommentPreview.tsx, line 28, change:
<div className="bg-card rounded-xl px-3 py-2 border border-border">
// To:
<div className="bg-card rounded-lg px-3 py-2 border border-border">
  • [ ] Step 5: Commit
bash
git add frontend/src/components/circle/CommentPreview.tsx
git commit -m "fix: reduce comment bubble border-radius and tighten avatar alignment"

Task 4: Standardize Reaction System

Covers: Requirement 4

Files:

  • Modify: frontend/src/components/circle/ReactionBar.tsx:51-104

  • [ ] Step 1: Improve reaction button active state visibility

When liked, show a filled heart with background highlight:

tsx
// In ReactionBar.tsx, line 59, change:
className={`${buttonSize} grid grid-flow-col items-center gap-1.5 rounded-md hover:bg-accent transition disabled:opacity-50 ${liked ? "text-rose-400" : ""}`}
// To:
className={`${buttonSize} grid grid-flow-col items-center gap-1.5 rounded-md hover:bg-accent transition disabled:opacity-50 ${liked ? "text-rose-400 bg-rose-400/10" : ""}`}
  • [ ] Step 2: Add visual indicator for reaction count clarity

The current design shows emoji badges with count. This is already clear. No change needed.

  • [ ] Step 3: Commit
bash
git add frontend/src/components/circle/ReactionBar.tsx
git commit -m "fix: add background highlight to active reaction button for clarity"

Task 5: Improve Avatar Color Variety

Covers: Requirement 5

Files:

  • Modify: frontend/src/components/ui/app/member-avatar.tsx:5-12,14-20

  • [ ] Step 1: Expand gradient palette from 6 to 12 colors

Add more gradient pairs for better visual variety:

tsx
// In member-avatar.tsx, lines 5-12, change:
const GRADIENTS = [
  "from-violet-500 to-fuchsia-500",
  "from-sky-500 to-cyan-500",
  "from-amber-500 to-orange-500",
  "from-emerald-500 to-teal-500",
  "from-rose-500 to-pink-500",
  "from-indigo-500 to-blue-500",
];
// To:
const GRADIENTS = [
  "from-violet-500 to-fuchsia-500",
  "from-sky-500 to-cyan-500",
  "from-amber-500 to-orange-500",
  "from-emerald-500 to-teal-500",
  "from-rose-500 to-pink-500",
  "from-indigo-500 to-blue-500",
  "from-teal-500 to-emerald-500",
  "from-orange-500 to-red-500",
  "from-blue-500 to-indigo-500",
  "from-pink-500 to-rose-500",
  "from-cyan-500 to-sky-500",
  "from-lime-500 to-green-500",
];
  • [ ] Step 2: Commit
bash
git add frontend/src/components/ui/app/member-avatar.tsx
git commit -m "feat: expand avatar gradient palette for better visual variety"

Verification

After all tasks, run:

bash
cd frontend && bun run typecheck

Expected: No type errors. All changes are CSS class modifications that don't affect TypeScript types.

Strum — Documentação.