refactor(web): extract MediaContent into media-content.tsx#760
Merged
Conversation
…tent.tsx Moves MediaContent, LiveStreamSection, and MediaItemCard into a dedicated media-content.tsx file. media-sidebar.tsx drops from 673 → 344 lines and now only contains the sidebar shell (tab header, tab switching, pinned/drawer wrapper). No behavior or UI changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove redundant key prop on <article> inside MediaItemCard (React reconciles via the key on the parent <MediaItemCard> at the call site). Consolidate fileExtension by importing the shared version from media-file-utils.ts instead of keeping a local copy with different return-value semantics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
MediaContent,LiveStreamSection, andMediaItemCardfrommedia-sidebar.tsx(673 lines) into a newmedia-content.tsx(351 lines).media-sidebar.tsxnow contains only the sidebar shell: tab header, tab switching, and pinned/drawer wrapper (344 lines).mediaFiles.map(...)) into a dedicatedMediaItemCardsubcomponent for clarity.New file structure
Next run
The next componentizer run will tackle
media-lightbox.tsx(627 lines) — extracting per-media-type renderers (image, mermaid, markdown, video) into subcomponents.Test plan
pnpm run check:web)pnpm run build:web)🤖 Generated with Claude Code