Skip to content

Feat/ai autcompletion#38

Merged
Shunseii merged 16 commits intofeat/polar-paymentsfrom
feat/ai-autcompletion
Apr 2, 2026
Merged

Feat/ai autcompletion#38
Shunseii merged 16 commits intofeat/polar-paymentsfrom
feat/ai-autcompletion

Conversation

@Shunseii
Copy link
Copy Markdown
Owner

@Shunseii Shunseii commented Apr 2, 2026

No description provided.

Shunseii and others added 14 commits March 1, 2026 11:13
…ries

- Add autofill button (definition, root, morphology) on both add and edit pages
- Add separate "Generate example" button in the examples section
- Use gpt-4o via Cloudflare AI Gateway with caching for autofill, no-cache for examples
- Add layered rate limiting (5/min, 50/hr, 150/day) with array support in middleware
- Gate AI features behind Pro plan with tooltips for non-Pro users
- Add error toasts for rate limits and failures
- Fix inflection/gender Select components to use controlled `value` prop
- Improve AI prompt: Arabic-only definitions, attested plurals only, omit gender for masadir
- Remove unused AI adapter packages (anthropic, gemini, openai)
- Add shimmer loading animation
- Translate all new strings to Arabic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add revlog recording for flashcard reviews and backlog clearing via
new stats API routes. Fix Eden Treaty input types resolving as `any`
by installing @types/bun in the web app (elysiajs/eden#189) and
pinning elysia to 1.4.27 to deduplicate the package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace raw SQL queries and prepared statements with Drizzle's
query builder for the clearBacklog generator. This gives us proper
type inference on query results (e.g. direction is now correctly
typed without manual casting).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fuzzy tolerance was calculated from the raw input length, but Orama
applies it against stemmed tokens in the index. Arabic words that stem
shorter (e.g. مهرجان→مهرج) got tolerance=2 on a 4-char stem, matching
nearly everything. Also replaced exact:true with tolerance:0 since
exact:true bypasses stemming on the query and never matched stemmed
index tokens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sync-wasm doesn't support ON DELETE CASCADE, so flashcard rows were
orphaned when a dictionary entry was deleted. This caused empty
flashcards to appear in the review queue until the next remote sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Shunseii Shunseii self-assigned this Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c03a04f8-7947-489e-94ca-8d0d784fdd7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ai-autcompletion

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.

Shunseii and others added 2 commits April 1, 2026 20:33
- ts-ignore Polar SDK deep import that fails under Bundler moduleResolution
- Add explicit return in userRateLimit middleware to satisfy noImplicitReturns
- Cast response type in http-logger to access status property
- Guard against undefined type in autofill mutation for add/edit routes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 2, 2026

Deploying bahar with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1955a4d
Status: ✅  Deploy successful!
Preview URL: https://5555bc65.bahar-5xu.pages.dev
Branch Preview URL: https://feat-ai-autcompletion.bahar-5xu.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 2, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bahar-marketing 1955a4d Commit Preview URL Apr 02 2026, 12:53 AM

@Shunseii Shunseii merged commit bf33449 into feat/polar-payments Apr 2, 2026
3 checks passed
@Shunseii Shunseii deleted the feat/ai-autcompletion branch April 2, 2026 00:54
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