Skip to content

feat(id): media/1 presentation surface with text projection - #14406

Merged
dezren39 merged 1 commit into
mainfrom
queue/22932-13679-media-surface
Nov 24, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/22932-13679-media-surface

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Closes #13679

Implements the media/1 presentation surface exactly per the settled design decision record on #13679 (second-pass verdict, queue task 22768; lane any-o, queue task 22932).

  • WorldSurface::Media(MediaSurface) with MediaItem { id, label, sort, artifact, width/height, duration_ms } and closed MediaSort { Image, Audio, Video } mirroring id-store MediaSort (id: media.* — typed media artifacts by default, one bounded raw stream for realtime (#2027) #2342).
  • Typed artifact-id references only (safe_form_id); no embedded bytes, URLs, scripts, or free-form mime strings.
  • Validation: version 1; safe title/labels; unique safe ids; 1..=64 items (MAX_MEDIA_ITEMS); serialized size <= 64 KiB (MAX_MEDIA_SURFACE_BYTES); width/height 1..=16384 both-or-neither, rejected on audio items; duration_ms 1..=86_400_000, rejected on image items.
  • parse_surface: media dispatch arm + "media" in the duplicate-key rejection kind list.
  • text_projection: title or "Media", then numbered lines {n}. {label} ({sort}[; {w}x{h}][; {duration} ms]); WorldSurface::text_projection match stays exhaustive with no wildcard arm.
  • Module header gains a media/1 paragraph.

Verification: cargo test -p id-core --lib — 589 passed, 0 failed, including new media_surface_parses_projects_and_round_trips and media_surface_rejects_unsafe_or_oversize_documents (rejection cases: duplicate id, oversize count, dimensions on audio, duration on image, unknown sort, duplicate JSON key). File fmt-clean (remaining fmt drift in screen_codec.rs is pre-existing and untouched).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T14:03:29Z",
    "session_id": "ses_e5df236cc94ffeqUA3b11cI4cA",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code-wt-22932-media",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code-wt-22932-media",
      "repo": "developing-today/code",
      "branch": "queue/22932-13679-media-surface",
      "sha": "103edb61350f8faaa8b9c2681e6b55cc586bf417"
    },
    "auth_subject": "oc-code-01",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 901787ba-f2fc-4f8c-b8c5-73dd1c477b1a
Commits

Reviewing files that changed from the base of the PR and between 7279be4 and 103edb6.

Files selected for processing: 1

  • pkgs/id/crates/id-core/src/world_presentation.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 081a10f into main Nov 24, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/22932-13679-media-surface branch November 24, 2026 14:04
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.

id: media/1 presentation surface — design a Media WorldSurface variant with a text projection (#2339 remainder)

1 participant