Skip to content

fix(docs): migrate domain from docs.gitlab-mcp to gitlab-mcp.sw.foundation#155

Merged
polaz merged 19 commits intomainfrom
feat/#145-featdocs-add-report-a-bug-feedback-widget-to-docum
Jan 23, 2026
Merged

fix(docs): migrate domain from docs.gitlab-mcp to gitlab-mcp.sw.foundation#155
polaz merged 19 commits intomainfrom
feat/#145-featdocs-add-report-a-bug-feedback-widget-to-docum

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 23, 2026

Summary

  • Move docs site from 4th level docs.gitlab-mcp.sw.foundation to 3rd level gitlab-mcp.sw.foundation
  • Cloudflare free SSL only covers *.sw.foundation, not *.gitlab-mcp.sw.foundation
  • This enables Cloudflare proxy (orange cloud) and Worker route interception for the bug report API

Changes

  • Update CNAME to gitlab-mcp.sw.foundation
  • Update Worker route in wrangler.toml
  • Update ALLOWED_ORIGINS in worker and utils
  • Update all doc links in README.md

Required DNS changes (Cloudflare sw.foundation zone)

  • gitlab-mcp CNAME → structured-world.github.io (Proxied)
  • gm A/CNAME → lb1 target (DNS only)
  • Delete docs.gitlab-mcp record

Test plan

  • yarn test — 3746 passed
  • After DNS propagation: curl https://gitlab-mcp.sw.foundation/api/report-bug returns Worker response

polaz added 16 commits January 23, 2026 18:36
- Add BugReportWidget.vue: persistent side-tab with expandable form,
  success/error states, responsive design (side panel on desktop,
  bottom sheet on mobile), dark mode support, and prefers-reduced-motion
- Add Cloudflare Pages Function (docs/functions/api/report-bug.ts):
  creates GitHub issues via GitHub App installation token with
  honeypot anti-spam, IP-based rate limiting via KV, input validation,
  and CORS restricted to docs domain
- Add VitePress custom theme extending default with layout-bottom slot
- Add .github/ISSUE_TEMPLATE/bug.yml as fallback for direct GitHub reports
- Add @cloudflare/workers-types and docs/functions/tsconfig.json
- Exclude docs/ from main tsconfig to avoid type conflicts

Closes #145
- Fix PKCS#1 vs PKCS#8 PEM detection: use "BEGIN RSA" presence to
  correctly identify PKCS#1 format (GitHub App PEMs) vs PKCS#8
- Add aria-modal="true" and focus trap to dialog panel for
  screen reader and keyboard-only accessibility
- Return focus to trigger button when dialog closes
- Extract pure utility functions to utils.ts for testability
- Add 27 unit tests covering validation, CORS, base64url encoding,
  ASN.1 length encoding, and buffer concatenation
Import CATEGORIES and MIN_DESCRIPTION_LENGTH from shared utils into the
Vue widget instead of duplicating values. Add explicit local variable
narrowing in validateReport for stricter TypeScript compatibility.
The trigger button uses v-if and is recreated on state change. Focus
must wait for DOM patch before the new element ref is available.
GitHub Pages returns 405 for POST requests because it's static-only hosting.
The CF Pages Function in docs/functions/ was never deployed.

Solution: standalone Cloudflare Worker at docs/worker/ with route rule
docs.gitlab-mcp.sw.foundation/api/* intercepting requests before GitHub Pages.

- Add docs/worker/ with wrangler.toml and Worker-format handler
- Add deploy-worker job to docs.yml CI workflow
- Add https://docs.gitlab-mcp.sw.foundation to ALLOWED_ORIGINS
- Update test expectation for new primary origin

Closes #153
- Widget: move from vertical side tab to floating bottom-right button
  with pulse animation and "Report Bug" label (more discoverable)
- Logo: add project logo to navbar and hero section on landing page
- Layout: add custom CSS with @media queries for wider content on
  screens >1440px and >1600px (reduces wasted horizontal space)
…d-report-a-bug-feedback-widget-to-docum

# Conflicts:
#	docs/.vitepress/theme/components/BugReportWidget.vue
#	docs/.vitepress/theme/index.ts
#	docs/functions/api/utils.ts
#	tests/unit/docs/report-bug-handler.test.ts
4th level domain (docs.gitlab-mcp.sw.foundation) is not covered by
Cloudflare free SSL certificate (only *.sw.foundation). Moving to
3rd level enables Cloudflare proxy and Worker route interception.

- CNAME: gitlab-mcp.sw.foundation
- Worker route: gitlab-mcp.sw.foundation/api/*
- MCP server moves to gm.sw.foundation (DNS only, via lb1 Envoy)
Copilot AI review requested due to automatic review settings January 23, 2026 21:13
Copy link
Copy Markdown

Copilot AI left a comment

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 migrates the documentation site from a 4th-level subdomain (docs.gitlab-mcp.sw.foundation) to a 3rd-level subdomain (gitlab-mcp.sw.foundation) to enable Cloudflare free SSL and proxy support. The migration introduces a standalone Cloudflare Worker to handle the /api/* routes via route interception before GitHub Pages serves static content.

Changes:

  • Update CNAME and all documentation links to the new domain
  • Add new Cloudflare Worker implementation with wrangler configuration
  • Update CORS allowed origins in both Worker and utilities
  • Add Worker deployment job to GitHub Actions workflow
  • Add logo assets and enhance documentation UI styling

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/public/CNAME Updated to point to new 3rd-level domain
docs/worker/wrangler.toml New Worker configuration with route pattern for sw.foundation zone
docs/worker/tsconfig.json TypeScript configuration for Worker compilation
docs/worker/src/index.ts New standalone Worker implementing bug report API with GitHub App authentication
docs/worker/package.json Worker dependencies for Cloudflare Workers and TypeScript
docs/functions/api/utils.ts Added new domain to ALLOWED_ORIGINS list
tests/unit/docs/report-bug-handler.test.ts Updated expected CORS header to reflect new production domain
README.md Updated all documentation links to new domain
.github/workflows/docs.yml Added deploy-worker job for Worker deployment
docs/.vitepress/config.mts Added logo configuration
docs/.vitepress/theme/index.ts Imported custom style overrides
docs/.vitepress/theme/style.css New custom theme styles for wider layout and hero image sizing
docs/.vitepress/theme/components/BugReportWidget.vue Redesigned from side tab to floating bottom-right button with pulse animation
docs/index.md Added hero logo image configuration
docs/public/logo.png New logo asset for navigation header

- Delete docs/functions/api/report-bug.ts (never executed on GitHub Pages)
- Rewrite handler tests to import and test the CF Worker directly
- Add needs:deploy dependency to deploy-worker CI job
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

- Add favicon.ico + 16/32px PNGs from project logo
- Add og:image (1200x630) for link preview in messengers
- Crop hero image by 24px from each side for better framing
- Configure head meta in VitePress (favicon, OG tags)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.33.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants