openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

[Tiny Place] Feed: posts don't support images/media (no media field in contract)

Open M3gA-Mind opened this issue 4 months ago • 2 comments

Part of #4776 · Tiny Place epic #4190 · section §2 Feed.

Audited vs upstream/main 3cca4f3f3 (code-level, read-only).

Problem

Posts do not support images/media end-to-end. The audit item "Images / media in posts" fails at the contract level, not just the UI.

Evidence

  • SDK type GqlPost (vendor/tinyplace/sdk/rust/src/types/graphql.rs:26-46) carries only body, content_type, counts, author, etc. — no image/media/attachment field.
  • UI renders the post body as plain text: app/src/agentworld/pages/FeedSection.tsx:462 — <p ...>{post.body}</p>. The only <img> in a post is the author avatar (:410, post.author.avatarUrl).
  • createPost sends { body, contentType } only (FeedSection.tsx:256 → manifest.rs:4659 → SDK feeds::create_post); there is no upload/attachment path.

Expected vs actual

  • Expected: posts can include images/media and render them in the feed.
  • Actual: posts are text-only; no media field exists in the SDK types, handler, or UI.

Notes

Likely a not-yet-built feature (may relate to design-port #3853, which does not cover the data contract). No code change proposed in this audit pass; flagging the contract-level gap so it can be scoped (SDK type + handler + composer upload + renderer).

M3gA-Mind avatar Jul 15 '26 17:07 M3gA-Mind

Blocked on an upstream tiny.place contract change — cannot be fixed in this repo. Investigated; recording the findings so this is not re-attempted.

What exists today:

  • vendor/tinyplace is a git submodule (gitlink 160000, pinned at 39ab493f of tinyhumansai/tiny.place; Cargo.toml:509 path-deps the Rust crate into it). An openhuman PR can only bump the submodule pointer to a commit that already exists upstream — it cannot edit the SDK's PostCreate / Post / GqlPost structs.
  • Media inputs (image / gifUrl) exist only on the TypeScript write side (feeds.ts, validation.ts). The Rust SDK — the one openhuman actually calls — never received them.
  • No read-side type carries media at all: neither Post nor GqlPost, in TS or Rust. tiny.place's own reference website renders post.body as plain text and its composer sends { body } only (website/src/components/feed/PostCard.tsx:140, FeedComposer.tsx:30).

Why no PR was opened: an openhuman-only implementation would be either a UI upload wired to a Rust SDK that silently drops the field, or a raw-HTTP bypass of the typed SDK. Either way the read side surfaces nothing — an uploaded image would never render in the feed. That is UI for something the backend cannot serve back, so it was not built.

To actually close this:

  1. tiny.place (the tinyhumansai/tiny.place repo) — add image/gif_url to the Rust SDK PostCreate; add a media/attachment field to the read-side Post + GqlPost (TS and Rust); cut a release.
  2. openhuman — bump the vendor/tinyplace submodule pointer, then wire the handler (manifest.rs), composer, and renderer (FeedSection.tsx).

Step 1 is the blocker and is outside this repo's control. Suggest either scoping the contract work on tiny.place first, or converting this into a tiny.place-first tracking item. Related audit tracker: #4776.

M3gA-Mind avatar Jul 16 '26 13:07 M3gA-Mind

Resolving as web-only by design in #5295 — the same resolution as the sibling marketplace-seller gap (#4920 / PR #5193).

Re-verified the blocker against tiny.place main (d2545054, the commit openhuman already pins): PostCreate, Post, and GqlPost in the vendored Rust SDK still carry no image/media/gif field, and the tiny.place backend serves none. vendor/tinyplace is a pinned submodule, so the contract cannot be added from this repo. An in-app upload would round-trip to nothing and render nowhere.

Rather than ship UI against a non-existent contract, #5295:

  • adds a small note + CTA at the bottom of the feed composer (FeedSection.tsx) that opens https://tiny.place via the existing openUrl() helper, so a would-be media poster is pointed to the web flow instead of a dead end;
  • records the web-only scope in the FeedSection.tsx header docstring and src/openhuman/tinyplace/mod.rs.

No SDK, core handler, or submodule-pointer change. The corresponding #4776 §2 "Images / media in posts" item is N/A (web-only).

To genuinely close in-app later (tiny.place-first, outside this repo): backend persists + serves a post-media field → SDK adds PostCreate.image and read-side Post/GqlPost media → openhuman bumps the submodule pointer and wires the composer upload + renderer.

CodeGhost21 avatar Jul 30 '26 19:07 CodeGhost21