Skip to content

Regression tests for collab server - #961

Merged
chrismaddalena merged 4 commits into
masterfrom
hotfix/issue-959
Aug 10, 2026
Merged

Regression tests for collab server#961
chrismaddalena merged 4 commits into
masterfrom
hotfix/issue-959

Conversation

@chrismaddalena

Copy link
Copy Markdown
Collaborator

These changes add some regression tests relevant to issue #959.

These address issue 959
Copilot AI lite review requested due to automatic review settings August 10, 2026 22:54
@augmentcode

augmentcode Bot commented Aug 10, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds a focused regression check for the collaboration server's GraphQL authorization header.
Changes:

  • Extracts Apollo/Hasura client creation into a reusable collaboration-client module.
  • Updates the Hocuspocus server to obtain its per-context client from that module.
  • Adds a local HTTP-server test that verifies the scoped JWT is sent as a Bearer token.
  • Adds a Vite SSR test build and ignores its generated output directory.
Technical Notes: The client retains no-cache and GraphQL error-handling defaults while allowing the test to inject its endpoint.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread javascript/package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a small regression test harness for the collaboration server’s Hasura GraphQL client, aimed at preventing a repeat of the “No Authorization header found” failure mode described in issue #959.

Changes:

  • Refactors collab server GraphQL client creation into a dedicated createCollabGqlClient() helper.
  • Adds a Node/Vite-built regression test that asserts the outgoing GraphQL request includes the expected Authorization: Bearer … header.
  • Wires the test into javascript/package.json via a new test:collab-graphql-auth script and ignores the build output directory.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
javascript/vite.config.collab_client_test.ts Adds a Vite build config to bundle the collab GraphQL auth regression test for Node execution.
javascript/src/collab_server/index.ts Switches the collab server to use the new shared GraphQL client factory.
javascript/src/collab_server/graphql_client.ts Introduces a reusable Hasura Apollo client factory that injects the collaboration JWT into the Authorization header.
javascript/src/collab_server/graphql_client.test.ts Adds a regression test that spins up a local HTTP server and asserts the auth header is sent.
javascript/package.json Adds an npm script to build/run the regression test.
javascript/.gitignore Ignores the new test build output directory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread javascript/package.json Outdated
Comment thread javascript/src/collab_server/graphql_client.ts Outdated
Comment thread javascript/package.json
@chrismaddalena
chrismaddalena merged commit cdc2257 into master Aug 10, 2026
12 checks passed
@chrismaddalena
chrismaddalena deleted the hotfix/issue-959 branch August 10, 2026 23:33
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.

2 participants