Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Backend CI

# Reusable backend quality gates (no-infra unit/integration + real-infra E2E).
# Called only by the prod pipeline, gated on `has_back || app_deploy` — every
# deploy migrates the database and rolls the backend, so every deploy runs these.
# Stage and pull requests never invoke it.
# Pull requests run the backend suites without services.
# Production build triggers also run E2E against Postgres and Redis.
on:
workflow_call: {}
workflow_call:
inputs:
run_e2e:
description: Run the Postgres and Redis E2E suites
type: boolean
default: true

permissions:
contents: read
Expand Down Expand Up @@ -39,6 +42,7 @@ jobs:
run: bun run test

backend-e2e:
if: inputs.run_e2e
name: 🧪 Backend E2E (real Postgres + Redis)
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/prod.docs.plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,10 @@ jobs:
# runs the Prisma migration and rolls all three backend services. Gating on
# `has_back` alone let a `(build): front` push deploy backend code no test
# had ever touched. `has_back` stays so `(build): back no-deploy` still runs.
if: needs.triage.outputs.has_back == 'true' || needs.triage.outputs.app_deploy == 'true'
if: github.event_name == 'pull_request' || needs.triage.outputs.has_back == 'true' || needs.triage.outputs.app_deploy == 'true'
uses: ./.github/workflows/backend-ci.yml
with:
run_e2e: ${{ github.event_name != 'pull_request' }}

extension-tests:
name: 🧪 Ext (${{ matrix.ext }})
Expand Down Expand Up @@ -386,6 +388,8 @@ jobs:
- name: 🏗️ Build Webapp
run: bun run --filter @docs.plus/webapp build:ci
env:
# This build checks compilation only; deployment builds use the host's environment.
NEXT_PUBLIC_RESTAPI_URL: http://localhost:4000
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL || 'http://localhost:54321' }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY || 'dummy-key' }}

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stage.docs.plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ jobs:
- name: 🏗️ Build Webapp
run: bun run --filter @docs.plus/webapp build:ci
env:
# This build checks compilation only; deployment builds use the host's environment.
NEXT_PUBLIC_RESTAPI_URL: http://localhost:4000
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL || 'http://localhost:54321' }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY || 'dummy-key' }}

Expand Down
3 changes: 3 additions & 0 deletions extensions/extension-hypermultimedia/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ historical Conventional Commits format. The project adheres to

### Fixed

- Preserve the path hash in unlisted Vimeo URLs through insertion and HTML round-trips.
Query-string hashes keep precedence. Addresses [the standalone contribution](https://github.com/HMarzban/extension-hypermultimedia/pull/4).

- Iframe embeds no longer set `allowfullscreen` when `allow` already includes
`fullscreen`. Chrome treats `allow` as the winner and warned on Vimeo, Loom,
and Spotify. YouTube still emits `allowfullscreen` because its `allow` list
Expand Down
2 changes: 2 additions & 0 deletions extensions/extension-hypermultimedia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ editor.commands.setLoom({ src: 'https://www.loom.com/share/abcdef1234567890' })
editor.commands.updateImageDimensions({ keyId: 'abc123', width: 480, height: 320 })
```

For unlisted Vimeo videos, pass the full URL with its path hash or `h` query parameter. HTML export and import preserve that hash.

`updateImageDimensions` edits an image that already sits in the document. It finds the node by its `keyId` attribute and writes `width` and `height`. It returns `false` when no image carries that `keyId`, so `editor.can()` reports a miss. `setImage` writes a fresh `keyId` on every insert, and a host reads it back with `node.attrs.keyId`.

Chain any of them like a normal Tiptap command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@ describe('Vimeo and SoundCloud embed hosts', () => {
cy.nodeCount('vimeo').should('eq', 1)
})

for (const { label, src, hash } of [
{ label: 'watch URL path', src: 'https://vimeo.com/123456789/deadbeef', hash: 'deadbeef' },
{ label: 'watch URL query', src: 'https://vimeo.com/123456789?h=abc123', hash: 'abc123' },
{
label: 'player URL query',
src: 'https://player.vimeo.com/video/123456789?h=abc123',
hash: 'abc123'
},
{
label: 'query before path',
src: 'https://vimeo.com/123456789/deadbeef?h=abc123',
hash: 'abc123'
}
]) {
it(`preserves the unlisted Vimeo hash from the ${label} through HTML round-trip`, () => {
cy.getEditor().then((editor) => {
editor.commands.setVimeo({ src })
})
const checkPlayer = () => {
cy.get('#editor iframe').should(($iframe) => {
const url = new URL($iframe.attr('src')!)
expect(url.origin).to.eq('https://player.vimeo.com')
expect(url.pathname).to.eq('/video/123456789')
expect(url.searchParams.get('h')).to.eq(hash)
})
}
checkPlayer()
cy.getEditor().then((editor) => {
editor.commands.setContent(editor.getHTML())
})
checkPlayer()
})
}

it('inserts a SoundCloud embed with w.soundcloud.com player src', () => {
cy.getEditor().then((editor) => {
editor.commands.setSoundCloud({ src: 'https://soundcloud.com/forss/flickermood' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ HyperMultimediaKit.configure({

Configure defaults on `HyperMultimediaKit.configure({ Vimeo: { … } })`. Each node stores its own attributes; unset values fall back to kit defaults when the embed URL is built.

Override player behavior per insert with `setVimeo({ … })`. The node `start` attribute (seconds) maps to Vimeo `start_time`. Unlisted videos need the full watch URL including the `h` query param — it is preserved in the embed URL.
Override player behavior per insert with `setVimeo({ … })`. The node `start` attribute (seconds) maps to Vimeo `start_time`. Unlisted videos need their full watch URL, including the path hash (`/123456789/deadbeef`) or `h` query parameter. The embed preserves that hash through HTML export and import. An explicit `h` query parameter takes precedence over a path hash.

Query names follow [Vimeo embed options](https://developer.vimeo.com/player/sdk/embed) (`start_time`, `end_time`, etc.).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export const parseVimeoVideoRef = (url: string): { id: string; h?: string } | nu
if (host === 'vimeo.com') {
const id = parsed.pathname.match(/\/(\d+)/)?.[1]
if (!id) return null
const h = parsed.searchParams.get('h') ?? undefined
const pathHash = parsed.pathname.match(/\/\d+\/([0-9a-f]+)\/?$/i)?.[1]
const h = parsed.searchParams.get('h') ?? pathHash
return { id, h }
}
} catch {
Expand Down
1 change: 1 addition & 0 deletions scripts/check-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const SHARED_PREFIXES = [
]

const SUPABASE_STUB = {
NEXT_PUBLIC_RESTAPI_URL: process.env.NEXT_PUBLIC_RESTAPI_URL || 'http://localhost:4000',
NEXT_PUBLIC_SUPABASE_URL: process.env.NEXT_PUBLIC_SUPABASE_URL || 'http://localhost:54321',
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || 'dummy-key',
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3003',
Expand Down
Loading