Repository navigation
Pulse Videos Play Inline With Their Thumbnail, Wherever They Show - #616
morepriyam wants to merge 1 commit into
Conversation
🚀 Preview Deployment Ready
Preview auto-deletes when this PR is closed. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Ticket and clock videos cross-posted into Huddle cannot currently resolve their stored thumbnails, and the core linkage path lacks automated coverage.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds inline Pulse video cards across Huddle posts, tickets, and clock-session attachments.
Changes:
- Links Pulse thumbnails during upload and via startup backfill.
- Adds secure GenUI cards with lazy inline playback.
- Updates search behavior, tests, documentation, and release notes.
| File | Description |
|---|---|
meteor-backend/server/pulsevault.js |
Links and backfills video thumbnails. |
meteor-backend/server/huddle.js |
Enriches post videos with thumbnails. |
src/features/pulse-upload/PulseVideoPlayer.tsx |
Adds shared poster/player UI. |
src/features/huddle/PulseVideoCard.tsx |
Connects GenUI to the player. |
src/features/huddle/pulseVideoBlock.ts |
Defines validated card payloads. |
src/features/huddle/superChatFeed.ts |
Emits cards and excludes payloads from search. |
src/features/clock/AttachmentsPanel.tsx |
Renders attachment videos inline. |
src/pages/Huddle.tsx |
Registers the GenUI plugin. |
tests/e2e/huddle/pulsevault-video.spec.ts |
Covers Huddle card playback. |
tests/e2e/tickets/pulsevault.spec.ts |
Updates ticket card assertions. |
tests/e2e/tickets/helpers.ts |
Waits for the card after upload. |
release-notes/1.0.5.md |
Documents inline video cards. |
docs/superchat-inbox-gaps.md |
Updates the Pulse-card capability status. |
.attic/raw-video-uploads/README.md |
Documents backend thumbnail linking. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4a466ad to
7b8b454
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Thumbnail metadata read failures are silently swallowed, potentially leaving successfully uploaded posters permanently unlinked.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (2)
7b8b454 to
242ea5d
Compare
242ea5d to
a73da9c
Compare
a73da9c to
b107903
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Long attachment titles can generate card payloads that fail their own schema validation, and several API/test contract gaps remain.
Review effort: Balanced
Findings: 3
Open (5)
Limit attachment titles to the GenUI schema maximum · New Assert the ticket video ID is preserved in the artifact URL · New Require successful attachment creation before asserting ignored fields · New Document the PulseVault posters endpoint in the OpenAPI spec · New Test search stripping of Pulse attachment widget payloads · New
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The poster lifecycle, inline playback, validation, cleanup, and primary edge cases are coherently implemented and covered by automated tests.
Review effort: Balanced
Findings: 2
Open (4)
Resolved since last review (1)
00b3d72 to
d5befca
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Inbox search still indexes JSON from manually authored Pulse video blocks, while API documentation and one cross-post assertion remain incomplete.
Review effort: Balanced
Findings: 3
Open (5)
Strip GenUI payloads from both search text sources · New Require successful attachment creation before asserting ignored fields Assert the ticket video ID is preserved in the artifact URL Test search stripping of Pulse attachment widget payloads Document the PulseVault posters endpoint in the OpenAPI spec
| const FENCE = '```'; | ||
| /** | ||
| * A `pulse_video` GenUI block, one line or pretty-printed. Fences are whole | ||
| * lines, as in Markdown, so backticks inside the JSON (a title) don't end it. | ||
| */ | ||
| const PULSE_CARD_BLOCK = new RegExp( | ||
| `(^|\\n)${FENCE}genui\\n(?:(?!\\n${FENCE})[\\s\\S])*?"widget"\\s*:\\s*"${PULSE_VIDEO_WIDGET}"(?:(?!\\n${FENCE})[\\s\\S])*\\n${FENCE}(?=\\n|$)`, | ||
| 'g', | ||
| ); | ||
|
|
||
| /** | ||
| * Text as a reader sees it: no markdown link targets and no Pulse card | ||
| * payloads, so media URLs, the widget name and artifact ids don't match every | ||
| * query. Other GenUI blocks show as code, so their text stays searchable. | ||
| */ | ||
| function searchableText(text: string): string { | ||
| return text.replace(/\]\([^)]*\)/g, ']').replace(PULSE_CARD_BLOCK, '$1'); | ||
| } |
…e a Pulse video shows A Pulse video shows as its poster frame with a play button, and plays inline on a tap, instead of a link to a file: in Huddle posts (a `pulse_video` GenUI widget whose payload is the artifact id only, validated by zod), on ticket, Redmine and clock-session Videos, and as a timesheet change's walkthrough in review. Starting one pauses the other; nothing loads until played. Ported from the original #616 branch onto main. The poster is PulseVault 0.6's own `GET /artifacts/:id/poster` (the thumbnail related to the video), so #616's server-side thumbnail linking, backfill and /posters route are not needed: the poster shows whichever order Pulse uploaded the two in, and for videos from before this change. Clients can no longer set an attachment's thumbnail. Every artifact path is built in one place (pulse-upload/artifact.ts). The e2e checks that looked for a video link now play the card and check the artifact it loads.
557df5e to
2648a59
Compare
| {videoId ? ( | ||
| <figure className="attachment-video min-w-0"> | ||
| <PulseVideoPlayer video={videoId} title={a.title ?? undefined} /> |
| await expect(play).toBeVisible({ timeout }); | ||
| await play.click(); | ||
| const player = scope.locator( | ||
| `.pulse-video-card video[src*="/pulsevault/artifacts/${videoid ?? ''}"]`, | ||
| ); | ||
| await expect(player.first()).toBeVisible(); |
| await expect(post.locator('a[href*="/pulsevault/artifacts/"]')).toBeVisible({ | ||
| timeout: 10000, | ||
| }); | ||
| await playPulseVideoCard(post); |



Summary
Pulse videos now show as a card, the video's poster frame with a ▶, that plays inline. Before, they were a link to a file. The card appears in Huddle posts, on a ticket's, Redmine issue's and clock session's Videos, and as a timesheet change's walkthrough in review.
Rebuilt on #709: this PR used to stack on #615 (closed) and was 248 commits behind
main. It's now one commit on #709. Its server code is gone: PulseVault 0.6.0 (from #709) serves a video's poster itself. See What changed from the original #616 and Stack and merge order below.How it works
A card asks for its poster by the video's id, so nothing is copied onto posts or attachments, and a poster that lands after its video is still found.
flowchart LR PulseApp["Pulse app"] -->|"video, and its thumbnail relatedTo it"| Vault["PulseVault 0.6"] Card["Video card: Huddle post, ticket,<br/>Redmine issue, clock session, walkthrough"] -->|"GET /pulsevault/artifacts/:videoId/poster"| Vault Vault -->|"the thumbnail, or 404 (plain card with ▶)"| Card Card -->|"press ▶: inline player on /pulsevault/artifacts/:videoId"| Vault classDef client fill:#fde8e8,stroke:#ff383c,color:#111 classDef server fill:#e8f0fe,stroke:#4a6fd8,color:#111 class PulseApp,Card client class Vault serverChanges
PulseVideoPlayer(new), shared by the Huddle card,AttachmentsPaneland the timesheet approvals panel. It loads nothing until played: the poster is a plain image, and<video>mounts on the tap and starts from it, so iOS doesn't ask for a second tap. It's named after the video ("Play …"), keeps keyboard focus on the player, and starting one video pauses any other. A missing poster shows a plain box with the ▶.pulse_videowidget for SuperChat's GenUI plugin (pulseVideoBlock.ts, lazyPulseVideoCard.tsx), registered inHuddle.tsx. Post text is user-written, so the payload carries only the video's artifact id (zod-validated as a UUID) and an optional title; the card builds every URL itself. A hand-typed block can only point at this backend's PulseVault. A title's backticks are encoded so they can't close the fence.pulse-upload/artifact.ts(new): the one place artifact paths are built (artifactPath,posterPath→ PulseVault's/artifacts/:id/poster,pulseArtifactId).TimesheetJustificationFields'artifactUrland the Huddle upload's inline path use it now.attachments.addno longer takes athumbnailfrom the client (attachments.js,main.js,api.ts): nobody can set the poster another person's video shows.huddle/pulsevault-video×3,huddle/composer-actions,tickets/video-upload) now play the card and check the artifact it loads, viatests/e2e/fixtures/pulseVideo.ts.docs/superchat-inbox-gaps.mdrow 3.7; release note "Videos play where they're posted" inrelease-notes/1.0.7.md.What changed from the original #616
pulse_uploadsrecord, backfilled old ones at startup, and servedGET /pulsevault/posters/:videoId.mainno longer haspulse_uploads, and PulseVault 0.6.0 servesGET /artifacts/:id/poster(the newest finished thumbnailrelatedTothe video), already in/pulsevault/docs. So none of that is needed, and posters for videos from before this change work without a backfill.thumbnailhardening.Not in this PR
@mieweb/ui(gap 1.2 indocs/superchat-inbox-gaps.md).Tests
typecheck,lint,formatclean; unit tests 612 / 612 (pulseVideoBlock.test.ts,superChatFeed.test.ts).relatedToit, then the video) gets its poster from/artifacts/:id/posterand the card draws it. Videos uploaded from a file have no thumbnail and show the plain card; the browser logs each poster's 404.Stack and merge order
This work used to ship as one PR (#678). It is now five, so each can be reviewed on its own and the universal links can wait for Pulse's store release without holding the rest back.
mainThe three PRs in step 2 are independent of each other and can merge in any order once #709 is in. #711 follows #710. When a base PR merges, retarget the next one to
main(GitHub does it when the merged branch is deleted).Expected conflicts when the step-2 PRs merge after each other, all small:
release-notes/1.0.7.md: every PR adds its own section and its own line to the PR list. Keep both sides.src/features/pulse-upload/PulseButton.tsx(Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links #678 against The Clock Page's Pulse Card, a Pending Change and an Upload's Progress Fit Every Screen #710/Timesheets as a List of Sessions, and the Work Page in One Layout, on Every Screen #711): one comment abovenote. Keep The Clock Page's Pulse Card, a Pending Change and an Upload's Progress Fit Every Screen #710's code with Pulse Opens Through Its Universal Links in One Tap, and TimeHuddle No Longer Manages Pulse's App Store Links #678's wording ("Beside the chip, the same words the window uses…").Merged together, the five come out identical to the old #678 head plus the timesheet work and the video cards (checked file by file). The old heads are tagged
backup/video-conform-2026-10-13andbackup/pulse-video-cards-2026-10-13.