Skip to content

add CORS preflight example and bump deps#49

Merged
ianmacartney merged 1 commit intomainfrom
issue-17
May 5, 2026
Merged

add CORS preflight example and bump deps#49
ianmacartney merged 1 commit intomainfrom
issue-17

Conversation

@ianmacartney
Copy link
Copy Markdown
Member

@ianmacartney ianmacartney commented May 5, 2026

Fixes #17

CORS Docs

Adds an OPTIONS route handler for /chat-stream to support CORS preflight requests. This allows browsers to make POST requests to the Convex deployment when the app is served from a different origin. The handler responds with appropriate Access-Control-* headers permitting POST requests with Content-Type, Digest, and Authorization headers, with a 24-hour preflight cache.

## Summary
- Install and configure `@convex-dev/eslint-plugin`
- Auto-fix `explicit-table-ids` violations (adds table name as first arg to `db.get`/`db.patch`/`db.delete`/`db.replace`)
- Add eslint-disable annotations where table names are genuinely dynamic

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@convex-dev/persistent-text-streaming@49

commit: ff0cb31

@ianmacartney ianmacartney marked this pull request as ready for review May 5, 2026 03:38
@ianmacartney ianmacartney merged commit 375f835 into main May 5, 2026
3 of 4 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: get-convex/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c7888d5-30ec-426e-ae00-992d198b239a

📥 Commits

Reviewing files that changed from the base of the PR and between 9ccf6f4 and ff0cb31.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • README.md
  • eslint.config.js
  • example/convex/messages.ts
  • package.json
  • src/component/lib.ts

📝 Walkthrough

Walkthrough

This pull request addresses a CORS preflight issue by adding an OPTIONS route handler example to the README and updating the codebase to use explicit table names in Convex database operations. The README now documents how to properly respond to CORS preflight requests for the /chat-stream endpoint. Concurrently, the database operations in src/component/lib.ts and example/convex/messages.ts have been standardized to explicitly pass table names to ctx.db.get(), ctx.db.patch(), and ctx.db.delete() calls. Additionally, the ESLint configuration has been updated to include the Convex ESLint plugin and its recommended rules, with the corresponding package dependency added.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-17

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

CORS Error

1 participant