Skip to content

feat(issue-reporter): implement in-app issue reporter modal and Cloudflare API#225

Closed
ThisIs-Developer wants to merge 2 commits into
mainfrom
feat/in-app-issue-reporter
Closed

feat(issue-reporter): implement in-app issue reporter modal and Cloudflare API#225
ThisIs-Developer wants to merge 2 commits into
mainfrom
feat/in-app-issue-reporter

Conversation

@ThisIs-Developer

Copy link
Copy Markdown
Owner

What changed

  • Replaced direct link redirect to GitHub with an in-application Report an Issue modal (#report-issue-modal) in \index.html.
  • Implemented frontend modal logic, client-side validation, drag-and-drop attachment upload (with file preview, size formatting, and removal), environment metadata collection, double-click submission lock, loading indicators, and fallback handling in \script.js.
  • Styled the modal in \styles.css\ matching the design system of Share Snapshot and Live Share (Dark/Light themes, typography, overlays, border radius, animations, and mobile responsiveness).
  • Created Cloudflare Pages Function endpoint \ unctions/api/report-issue.js\ for secure server-side issue creation via the GitHub REST API (supports GitHub App installation tokens, \GITHUB_TOKEN\ secrets, origin checks, IP rate limiting, Turnstile verification, and Cloudflare R2 attachment uploads).
  • Configured Cloudflare R2 bucket binding (\ATTACHMENTS_R2) in \wrangler.toml.
  • Added comprehensive setup documentation in \docs/issue-reporter-setup.md.
  • Added Playwright E2E test suite in \ ests/e2e/report-issue.spec.js\ and updated build verification in \ ests/helpers/static-build-check.mjs.

Why it changed

  • Allows users to report bugs, request features, and submit UI/UX/performance feedback directly within the Markdown Viewer application without leaving the workspace.
  • Backend Cloudflare Function protects GitHub tokens, private keys, and Cloudflare R2 storage credentials from being exposed in client-side code.

How it was tested


  • pm run build: Static build check passed.

  • px playwright test tests/e2e/report-issue.spec.js: 5 E2E tests passed (modal open/close, Escape key dismiss, field validation, mock successful submission, error & fallback button).

  • pm test: Full Playwright E2E test suite passed (91 tests).

Privacy and Storage Notes

  • Environment info collection is enabled by default and strictly limited to non-sensitive environment data (App version, Browser name/version, OS, Screen resolution, Viewport size, Mode, Page URL, Language, Timestamp).
  • NO Markdown document content, document titles, or local workspace files are collected or uploaded.
  • Attachments are stored in Cloudflare R2 (\ATTACHMENTS_R2) using non-predictable UUID keys.

Documentation Updates

  • Created \docs/issue-reporter-setup.md\ detailing GitHub App creation, required permissions (\Issues: Read and write), Cloudflare secrets, R2 bucket binding, Turnstile setup, allowed origins, local testing, and fallback behavior.

…flare API

- Replace direct GitHub new-issue link redirect with an in-app popup modal matching Share Snapshot / Live Share UI design.
- Implement Cloudflare Pages Function at /api/report-issue for secure server-side GitHub Issue creation via GitHub REST API.
- Support issue types, title, description, steps to reproduce, expected/actual behavior, drag-and-drop attachments (R2 storage), and environment metadata.
- Implement rate limiting, origin validation, Turnstile support, client validation, double-click lock, and backward-compatible fallback mode.
- Add setup documentation in docs/issue-reporter-setup.md.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62de12e
Status: ✅  Deploy successful!
Preview URL: https://f53e7a4d.markdownviewer.pages.dev
Branch Preview URL: https://feat-in-app-issue-reporter.markdownviewer.pages.dev

View logs

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Jul 22, 2026 9:23am

Prevent Cloudflare Pages publish failure when the R2 bucket 'markdown-viewer-attachments' is not pre-provisioned in the deployment environment. R2 bucket can be bound optionally in Cloudflare Pages settings.
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.

1 participant