Skip to content

feat(chat): chat videos open from their card instead of growing the answer CU-17tkuw61kfy - #2870

Merged
michaelassraf merged 8 commits into
mainfrom
feat/mcp-in-app-links
Oct 29, 2026
Merged

michaelassraf merged 8 commits into
mainfrom
feat/mcp-in-app-links

Conversation

@michaelassraf

@michaelassraf michaelassraf commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Chat videos no longer appear on their own while an answer loads. A card with a video now has a Watch video action in its footer row, and the player opens below the card only when the reader clicks it. A video with no card of its own (a [card://video:<id>] marker) gets the same action on a row of its own. So the answer keeps its height when its cards load, and the only height change is one the reader asked for.

  • chat-video-toggle.tsx (new): useChatVideoToggle (the action for a card's footer row, plus the player) and ChatCollapsibleVideo (a video with no card).
  • dispatch.tsx: the hero-video path and the video marker use them; ChatCardWithDiscuss takes a footerAction beside its source action.
  • The external-media notice is unchanged.

No jump while loading. A card's skeleton now draws its footer row too, with its actions in their loading form:

  • SourceActionButton and ChatCardDisclosureButton take a loading prop (FooterActionSkeleton: the same button box, label held by TextHold).
  • A card type whose records can carry a video says so on its registry entry (disclosure: CHAT_CARD_DISCLOSURE.VIDEO: podcast, webinar, case study, customer interview, investor update, onboarding guide, product release). Its skeleton includes the Watch video slot, and a record of that type without a video keeps the slot, unseen.
  • The answer still being written draws its sources strip in its loading form (SourceChips loading, chips built like the real chip), so the strip is already there when the answer ends.

In-app links are inline boxes. A link in an answer that stays in the app is drawn as an inline box (InlineAppLinkChip), still routed through the host's NavLinkAnchor. Whether it stays is the runtime's one new-tab rule (computeIsNewTab, the decision the cards and source chips make); a link it sends to a new tab stays a plain link. The box is one component, InlineChip (the Tag badge as an inline span); openframe-oss-frontend's MentionTag draws it too (#749).

One card disclosure, by kind. "Watch video" is the generic ChatCardDisclosure. Kinds are CHAT_CARD_DISCLOSURE (VIDEO today; IMAGE and the like are one entry each), and a kind owns its action, how it finds its content on a record (fromItem) and how it draws it. Registry entries declare disclosure: CHAT_CARD_DISCLOSURE.VIDEO. It is built on the chat's ExpandChevron + useCollapsible, so it animates like the thinking, tool and approval expanders, and the content unmounts when the close has finished.

Measured in a browser, every 30 ms: card footer row 20px loading and 20px loaded; sources strip 61px loading and 61px loaded (one row).

Tested: chat and chat-protocol suites (1030 pass); checked end to end in openframe-oss-frontend against stage (desktop and phone), lint; a new test opens and closes a video and checks the DOM goes back to how it was. Checked in the hub's chat on localhost: a webinar answer loads with no player; Watch video opens it, Hide video closes it.

Change-Set: feat-mcp-in-app-links
ClickUp task: CU-17tkuw61kfy Refine Hub MCP responses with direct in-app links (e.g. device deployment)
Design-Doc: https://product-hub.flamingo.so/admin/design-docs/hub-mcp-server

🤖 Generated with Claude Code

Change set flamingo-stack/openframe-oss-lib#2870: these pull requests are one change, reviewed together.

Linked work

Linked by the Depends-On / Change-Set lines in these descriptions; this block is maintained by the hub.

…f growing the answer

A card whose record carries a video drew its player (a 16:9 box and its tab row) the moment it
resolved, under a skeleton one row tall, and an embedded video marker drew one as the answer
streamed: every recording made the chat jump. The card's footer row now carries "Watch video"
beside Ask, and the player opens below the card only when the reader asks; a marker with no card
of its own gets the same action on a row of its own (chat-video-toggle.tsx).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelassraf

Copy link
Copy Markdown
Member Author

@github-actions

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

Not reviewed yet. Reviews start when you ask, so the reviewer reads this pull request when it is ready, not when it is opened.

When it is ready:

  • Review this pull request

Or comment @flamingo-review. Add the flamingo-review-always label to review every push.

Updated 2026-10-29 01:09 UTC · workflow run

michaelassraf and others added 4 commits October 28, 2026 22:48
…height while loading

A card's skeleton now draws its footer row too, its actions in their
loading form (SourceActionButton and ChatVideoToggleButton take a
loading prop). A card type whose records can carry a video declares it
on its registry entry, so its Watch video slot is in the skeleton and
stays reserved, unseen, on a record without one. The answer still being
written draws its sources strip in its loading form (SourceChips
loading), so the strip is there when the answer ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e chip on a phone

Measured in the OpenFrame frontend on stage: in Mingo's narrow panel the
two skeleton chips wrapped to a second row (93px) and the strip shrank to
61px when the answer ended. The skeleton row no longer wraps (a chip that
does not fit is cut), and a phone draws one chip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… box

Mingo's links to the app's screens ([Devices → Add Device](/devices/new))
were drawn in the colour of the text around them. The chat now draws a
root-relative link as an inline chip in the Tag badge skin the host's
entity mentions use, still routed through the host's NavLinkAnchor. The
skin is exported (INLINE_CHIP_CLASS) so the host's mention chip uses the
same box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inline box (the Tag badge as a span, with its inline skin) is one
component the lib exports. The chat's link to a screen of the app draws
it, and so does the host's mention chip, instead of each drawing a Tag
with a copied class string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…creen link marker

Review of #2870:
- A card's "Watch video" is now the generic ChatCardDisclosure, with a
  variants table (video today). It opens and closes like every other chat
  expander (ExpandChevron + useCollapsible), and the content unmounts when
  the close has finished, so a closed player is not playing out of sight.
- A link to a screen of the app is no longer guessed from its path: the
  answer marks it with the link title "app-screen"
  ([Devices → Add Device](/devices/new "app-screen")). The marker lives in
  chat-protocol (APP_SCREEN_LINK_TITLE, appScreenLinkMarkdown,
  isAppScreenLink), shared with the hub's instruction to the model.
- The skeleton chip's one-line spacer is a named constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaelassraf and others added 2 commits October 29, 2026 09:44
…sclosures by kind

Review of #2870:
- No app-screen marker. Whether a link in an answer stays in the app is
  the runtime's one new-tab rule (computeIsNewTab, the decision the
  chat's cards and source chips make): a link it keeps in this window is
  drawn as the inline box, one it sends to a new tab stays a plain link.
  The chat-protocol export is removed.
- Card disclosures are by kind: CHAT_CARD_DISCLOSURE.VIDEO (one entry
  per kind, IMAGE and the like next). A kind owns its action, how it
  finds its content on a fetched record (fromItem, the old
  itemVideoMetadata) and how it draws it. Registry entries declare
  disclosure: CHAT_CARD_DISCLOSURE.VIDEO; CardWithVideo is
  CardWithDisclosure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelassraf
michaelassraf merged commit a20e555 into main Oct 29, 2026
17 of 18 checks passed
@michaelassraf
michaelassraf deleted the feat/mcp-in-app-links branch October 29, 2026 14:10
oleksandr-blip added a commit that referenced this pull request Oct 29, 2026
…0.0.815) into feature/directory-connection-customers. CU-17tkuw5z06b
romanivan-flamingo added a commit that referenced this pull request Oct 29, 2026
…dard (one switch, marked items, no hidden ones). CU-17tkuw5yk9q

The strip and the footer actions from #2870 left lib main with 5 loading-standard findings, which failed Test Node for every branch. FooterAction is now the one switch the footer actions go through; the strip draws its full skeleton count and marks its items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
romanivan-flamingo added a commit that referenced this pull request Oct 30, 2026
Conflicts: main fixed #2870's footer actions and sources strip its own way (FooterAction with icon props, LoadingItems), taken over ours; the ticket alerts cell follows main's navigation executor and keeps the compact variant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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