overengineeringstudio / overengineeringstudio/effect-utils

notion-react: add coverage for media caption + file_upload

Open
#587 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:chore type:feature
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Part of v0.1 block-coverage epic (see context/notion-block-coverage/).

Problem

Image / Video / Audio / File / Pdf components (components/blocks.tsx) only project { url } as { type: 'external', external: { url } }. Missing:

  • caption (rich_text) — lossy for any page imported from Notion.
  • file_upload variant — the 2026-era successor to internal file uploads; should be pluggable without schema churn.

Deliverables

  • components/props.ts: extend MediaProps with caption?: ReactNode and fileUploadId?: string.
  • components/blocks.tsx + renderer/host-config.ts: emit caption: rich_text[] and { type: 'file_upload', file_upload: { id } } envelope when fileUploadId is set; keep url->external path.
  • web/blocks.tsx: already renders image caption — extend to video/audio/file/pdf.
  • E2E: extend Image test to cover caption; add Video, Audio, File, Pdf round-trips.

Acceptance

  • Round-trip preserves caption.
  • file_upload path works against a live upload id (or is at least unit-tested for payload shape).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with components/props.ts, components/blocks.tsx, and renderer/host-config.ts to trace MediaProps and the existing URL-to-external payload. Then inspect web/blocks.tsx and the existing Image E2E test before extending coverage to video, audio, file, and PDF. Done means captions survive round-trips and the file_upload payload shape is tested or works with a live upload id.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.