Skip to content

refactor(web): extract MediaContent into media-content.tsx#760

Merged
selfcontained merged 2 commits into
mainfrom
agt_a119bfc57e70/job-componentizer-4f122033
Jul 12, 2026
Merged

refactor(web): extract MediaContent into media-content.tsx#760
selfcontained merged 2 commits into
mainfrom
agt_a119bfc57e70/job-componentizer-4f122033

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Extracted MediaContent, LiveStreamSection, and MediaItemCard from media-sidebar.tsx (673 lines) into a new media-content.tsx (351 lines).
  • media-sidebar.tsx now contains only the sidebar shell: tab header, tab switching, and pinned/drawer wrapper (344 lines).
  • Also extracted the inline media item rendering (mediaFiles.map(...)) into a dedicated MediaItemCard subcomponent for clarity.
  • Pure structural refactoring — no behavior or UI changes.

New file structure

media-sidebar.tsx    (344 lines) — sidebar frame, tabs, pin/drawer modes
media-content.tsx    (351 lines) — media list, file upload, stream, item cards

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

  • TypeScript type check passes (pnpm run check:web)
  • Production build succeeds (pnpm run build:web)
  • E2E tests pass (122/123 — 1 pre-existing split-pane flake unrelated to changes)

🤖 Generated with Claude Code

selfcontained and others added 2 commits July 12, 2026 02:06
…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>
@selfcontained selfcontained merged commit 8ece4fd into main Jul 12, 2026
1 check passed
@selfcontained selfcontained deleted the agt_a119bfc57e70/job-componentizer-4f122033 branch July 12, 2026 08:16
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