newOS for Developers

Back to Overview

Post

outputcorePlayground

Core post display component for rendering content items with media, voting, and actions.

Source Path
apps/web/Components/Model/post/Post.tsx
Package

@newos/web

Props Interface

Post: IOView<{
  id: string;                    // Post ID
  folderId?: string;             // Parent folder/mood ID
  enableVote?: boolean;          // Show voting controls
  showReasoning?: boolean;       // Show AI reasoning
  mediaContentMode?: string;     // Media display mode
  card?: boolean;                // Card layout mode
  compact?: boolean;             // Compact display
}>

Data Flow & API Calls

readPost({ id }) — Fetches post data by ID
votePost() — Submit vote on post
attachToFolder() — Add post to folder

Key Features

Media Rendering

Uses MediaComponent for images, videos, and text content.

Voting System

Integrated vote buttons with real-time updates.

AI Reasoning

Optional display of AI thinking and claims.

Edge Cases & Gotchas

folderId required — Many actions require parent folder context
Media lazy loading — Images load on scroll into view