diff --git a/.github/workflows/build_and_push_nonproduction_images.yml b/.github/workflows/build_and_push_nonproduction_images.yml index fd984447..ebaf583d 100644 --- a/.github/workflows/build_and_push_nonproduction_images.yml +++ b/.github/workflows/build_and_push_nonproduction_images.yml @@ -182,6 +182,7 @@ jobs: NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=${{ vars.BACKEND_SERVICE_API_PATH }} NEXT_PUBLIC_BACKEND_API_VERSION=${{ vars.BACKEND_API_VERSION }} NEXT_PUBLIC_TIPTAP_APP_ID=${{ vars.TIPTAP_APP_ID }} + NEXT_PUBLIC_DOCS_COLLAB_URL=${{ vars.DOCS_COLLAB_URL }} GIT_COMMIT_SHA=${{ github.sha }} FRONTEND_SERVICE_PORT=${{ vars.FRONTEND_SERVICE_PORT }} FRONTEND_SERVICE_INTERFACE=${{ vars.FRONTEND_SERVICE_INTERFACE }} diff --git a/.github/workflows/build_and_push_production_images.yml b/.github/workflows/build_and_push_production_images.yml index ebb687e7..06b95362 100644 --- a/.github/workflows/build_and_push_production_images.yml +++ b/.github/workflows/build_and_push_production_images.yml @@ -116,6 +116,7 @@ jobs: NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=${{ vars.BACKEND_SERVICE_API_PATH }} NEXT_PUBLIC_BACKEND_API_VERSION=${{ vars.BACKEND_API_VERSION }} NEXT_PUBLIC_TIPTAP_APP_ID=${{ vars.TIPTAP_APP_ID }} + NEXT_PUBLIC_DOCS_COLLAB_URL=${{ vars.DOCS_COLLAB_URL }} FRONTEND_SERVICE_PORT=${{ vars.FRONTEND_SERVICE_PORT }} FRONTEND_SERVICE_INTERFACE=${{ vars.FRONTEND_SERVICE_INTERFACE }} tags: ${{ steps.tags.outputs.frontend_tags }} # Use "stable" tag from previous step diff --git a/Dockerfile b/Dockerfile index debf2b05..30a0f923 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ ARG NEXT_PUBLIC_BACKEND_SERVICE_PORT ARG NEXT_PUBLIC_BACKEND_SERVICE_API_PATH ARG NEXT_PUBLIC_BACKEND_API_VERSION ARG NEXT_PUBLIC_TIPTAP_APP_ID +ARG NEXT_PUBLIC_DOCS_COLLAB_URL ARG NEXT_PUBLIC_BASE_PATH ARG GIT_COMMIT_SHA ARG FRONTEND_SERVICE_INTERFACE @@ -50,6 +51,7 @@ ARG NEXT_PUBLIC_BACKEND_SERVICE_PORT ARG NEXT_PUBLIC_BACKEND_SERVICE_API_PATH ARG NEXT_PUBLIC_BACKEND_API_VERSION ARG NEXT_PUBLIC_TIPTAP_APP_ID +ARG NEXT_PUBLIC_DOCS_COLLAB_URL ARG NEXT_PUBLIC_BASE_PATH ARG GIT_COMMIT_SHA @@ -60,6 +62,7 @@ ENV NEXT_PUBLIC_BACKEND_SERVICE_PORT=$NEXT_PUBLIC_BACKEND_SERVICE_PORT ENV NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=$NEXT_PUBLIC_BACKEND_SERVICE_API_PATH ENV NEXT_PUBLIC_BACKEND_API_VERSION=$NEXT_PUBLIC_BACKEND_API_VERSION ENV NEXT_PUBLIC_TIPTAP_APP_ID=$NEXT_PUBLIC_TIPTAP_APP_ID +ENV NEXT_PUBLIC_DOCS_COLLAB_URL=$NEXT_PUBLIC_DOCS_COLLAB_URL ENV NEXT_PUBLIC_BASE_PATH=$NEXT_PUBLIC_BASE_PATH ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA @@ -93,6 +96,7 @@ ARG NEXT_PUBLIC_BACKEND_SERVICE_PORT ARG NEXT_PUBLIC_BACKEND_SERVICE_API_PATH ARG NEXT_PUBLIC_BACKEND_API_VERSION ARG NEXT_PUBLIC_TIPTAP_APP_ID +ARG NEXT_PUBLIC_DOCS_COLLAB_URL ARG NEXT_PUBLIC_BASE_PATH ARG GIT_COMMIT_SHA ARG FRONTEND_SERVICE_INTERFACE @@ -104,6 +108,7 @@ ENV NEXT_PUBLIC_BACKEND_SERVICE_PORT=$NEXT_PUBLIC_BACKEND_SERVICE_PORT ENV NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=$NEXT_PUBLIC_BACKEND_SERVICE_API_PATH ENV NEXT_PUBLIC_BACKEND_API_VERSION=$NEXT_PUBLIC_BACKEND_API_VERSION ENV NEXT_PUBLIC_TIPTAP_APP_ID=$NEXT_PUBLIC_TIPTAP_APP_ID +ENV NEXT_PUBLIC_DOCS_COLLAB_URL=$NEXT_PUBLIC_DOCS_COLLAB_URL ENV NEXT_PUBLIC_BASE_PATH=$NEXT_PUBLIC_BASE_PATH ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA diff --git a/__tests__/components/ui/coaching-sessions/coaching-notes/connection-status.test.tsx b/__tests__/components/ui/coaching-sessions/coaching-notes/connection-status.test.tsx index f795892f..fcf147fb 100644 --- a/__tests__/components/ui/coaching-sessions/coaching-notes/connection-status.test.tsx +++ b/__tests__/components/ui/coaching-sessions/coaching-notes/connection-status.test.tsx @@ -34,7 +34,7 @@ vi.mock('@/lib/hooks/logout-cleanup-registry', () => { vi.mock('@/site.config', () => ({ siteConfig: { env: { - tiptapAppId: 'test-app-id' + docsCollabUrl: 'http://test-collab' } } })) diff --git a/__tests__/components/ui/coaching-sessions/editor-cache-context.test.tsx b/__tests__/components/ui/coaching-sessions/editor-cache-context.test.tsx index 1aa17044..1db61654 100644 --- a/__tests__/components/ui/coaching-sessions/editor-cache-context.test.tsx +++ b/__tests__/components/ui/coaching-sessions/editor-cache-context.test.tsx @@ -32,7 +32,7 @@ vi.mock('@/lib/hooks/logout-cleanup-registry', () => { vi.mock('@/site.config', () => ({ siteConfig: { env: { - tiptapAppId: 'test-app-id' + docsCollabUrl: 'http://test-collab' } } })) diff --git a/src/components/ui/coaching-sessions/editor-cache-context.tsx b/src/components/ui/coaching-sessions/editor-cache-context.tsx index 44d92cfa..d0686889 100644 --- a/src/components/ui/coaching-sessions/editor-cache-context.tsx +++ b/src/components/ui/coaching-sessions/editor-cache-context.tsx @@ -288,7 +288,7 @@ export const EditorCacheProvider: FC = ({ // Provider initialization: sets up TipTap collaboration with awareness const initializeProvider = useCallback(async () => { - if (!jwt || !siteConfig.env.tiptapAppId || !userSession) { + if (!jwt || !siteConfig.env.docsCollabUrl || !userSession) { return; } @@ -297,7 +297,7 @@ export const EditorCacheProvider: FC = ({ try { const provider = new TiptapCollabProvider({ name: jwt.sub, - appId: siteConfig.env.tiptapAppId, + baseUrl: siteConfig.env.docsCollabUrl, token: jwt.token, document: doc, user: userSession.display_name, diff --git a/src/site.config.ts b/src/site.config.ts index 27c25f25..fa0bff86 100644 --- a/src/site.config.ts +++ b/src/site.config.ts @@ -27,6 +27,7 @@ export const siteConfig = { frontendServicePort: process.env.FRONTEND_SERVICE_PORT, frontendServiceInterface: process.env.FRONTEND_SERVICE_INTERFACE, tiptapAppId: process.env.NEXT_PUBLIC_TIPTAP_APP_ID, + docsCollabUrl: process.env.NEXT_PUBLIC_DOCS_COLLAB_URL, }, };