Skip to content

Add vocabuilder extension - #25853

Merged
raycastbot merged 14 commits into
raycast:mainfrom
lavrovpy:ext/vocabuilder
Apr 8, 2026
Merged

raycastbot merged 14 commits into
raycast:mainfrom
lavrovpy:ext/vocabuilder

Conversation

@lavrovpy

@lavrovpy lavrovpy commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds a new Raycast extension: VocaBuilder.

VocaBuilder helps users build vocabulary across 17 languages with translation and review workflows powered by Gemini.

Commands

  • Translate — Translates words and short texts between any configured language pair using Gemini. Returns translation, part of speech, and example sentence with translation. Supports immediate submit on Enter and auto-translate with 1.5s debounce for words, manual submit for longer text.
  • Translation History — Saves successful translations locally. Lets users search, view details, delete entries, and clear history.
  • Flashcards — Reviews saved words with spaced repetition using the SM-2 algorithm (Again / Good / Easy flow). Persists progress and prioritizes due cards in each review session.

Features

  • Configurable source and target language (17 languages: English, Ukrainian, Russian, Belarusian, Polish, German, French, Spanish, Italian, Portuguese, Dutch, Czech, Swedish, Japanese, Korean, Chinese, Turkish).
  • Color-coded part-of-speech chips: nouns (blue), verbs (red), adjectives (green), adverbs (magenta), prepositions (yellow), pronouns (purple), conjunctions (orange).
  • Typo correction — misspelled words are auto-corrected before translation.
  • Short text and sentence translation support with detail panel.
  • Abort of in-flight requests on search text change.

Quality & hardening

  • Runtime schema validation for Gemini responses and stored data (Zod).
  • Stable, user-safe error messages for API/storage failures.
  • Safe clipboard prefill behavior and strict input validation.
  • Escaped markdown rendering for translation/example content.
  • Store assets completed (icon, metadata screenshots, README, changelog).

Screenshots

Raycast 2026-03-12 at 15 40 24 vocabuilder 2026-03-12 at 15 42 07 vocabuilder 2026-03-12 at 15 41 53 vocabuilder 2026-03-12 at 15 42 30

- Add .claude/ to .gitignore
- Prepare extension for Raycast Store submission
- Add custom extension icon (open book with A/Я translation motif)
- Improve translate UX: clipboard suggestion list item + 1.5s debounce
- Add Flashcards command with SM-2 spaced repetition
- Initial commit — VocaBuilder Raycast extension
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Feb 26, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

- install prettier
- chore: prep Raycast publish and prune internal exports
- Implement SM-2 flashcard progress update
- refactor: replace decorative section comments with jsdoc
- Translate immediately on Enter
- Add Raycast changelog for store validation
- chore: standardize project on npm
- Harden input validation and storage corruption handling
- Harden clipboard suggestion handling
- Harden Gemini integration and markdown rendering
@lavrovpy
lavrovpy marked this pull request as ready for review February 26, 2026 17:42
@greptile-apps

greptile-apps Bot commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds the VocaBuilder extension: a vocabulary-building tool with Translate, Translation History, and Flashcards commands backed by Gemini and local storage.

  • Flashcards SM-2 interval bug: updateProgress gives 6 days on the first correct answer and skips the standard 1-day step — the ternary repetitions === 1 ? 6 : 1 can only ever resolve to 6 after the increment, contradicting the SM-2 spec the PR advertises.

Confidence Score: 4/5

Mostly safe to merge, but the SM-2 interval inversion in the core flashcard feature should be fixed first.

One P1 logic bug in the flashcard spaced-repetition algorithm (first interval is 6 days instead of 1, second step skipped entirely) means the flagship review feature won't behave as documented. All other findings are P2 style nits.

extensions/vocabuilder/src/flashcards.tsx — SM-2 updateProgress interval logic

Important Files Changed

Filename Overview
extensions/vocabuilder/src/flashcards.tsx SM-2 first-interval is 6 days (always) instead of the correct 1-day → 6-day progression; dead code in ternary
extensions/vocabuilder/src/translate.tsx Main translate command; solid abort/debounce handling; minor style nit on error-code guard
extensions/vocabuilder/src/lib/gemini.ts Gemini API integration with Zod validation, abort support, dedup, and markdown stripping — clean
extensions/vocabuilder/src/lib/storage.ts LocalStorage layer with corruption detection and backup; correct dedup logic for history
extensions/vocabuilder/package.json Extension manifest; valid Productivity category, correct dependencies and preference definitions
extensions/vocabuilder/src/history.tsx History list with search, delete, clear, and export (JSON/Anki/Quizlet) — well-structured
extensions/vocabuilder/src/lib/export.ts File export helpers for JSON, Anki, and Quizlet formats writing to ~/Downloads
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/vocabuilder/src/flashcards.tsx
Line: 26

Comment:
**SM-2 first-interval logic always resolves to 6**

After incrementing `repetitions = prevRepetitions + 1`, the guard `repetitions < 2` is only true when `repetitions === 1` (i.e. the card's very first correct answer). The ternary `repetitions === 1 ? 6 : 1` therefore always evaluates to `6` — the `1` branch is dead code. Per the SM-2 spec the first-repetition interval should be **1 day** and the second **6 days**, but the current code gives **6 days** on the first correct answer and skips the hardcoded second step entirely, causing later intervals (`Math.round(6 * 2.5) = 15`) to diverge from the algorithm the PR advertises.

```suggestion
      interval = repetitions === 1 ? 1 : repetitions === 2 ? 6 : Math.round(prevInterval * prevEaseFactor);
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/vocabuilder/src/translate.tsx
Line: 438

Comment:
**Prefer errorCode over message substring for action guard**

`error.includes("API key")` ties the conditional to the human-readable message string. `errorCode` is already tracked in state and is the stable identifier here.

```suggestion
              {errorCode === "INVALID_API_KEY" && (
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "Update vocabuilder extension" | Re-trigger Greptile

@greptile-apps greptile-apps Bot 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.

22 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@pernielsentikaer pernielsentikaer self-assigned this Mar 10, 2026

@pernielsentikaer pernielsentikaer 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.

Hi @lavrovpy 👋

I updated the code a bit. Can you make sure I didn't break anything while doing that?

This is English-to-Ukrainian only — pretty niche - could it make sense to expand at some point?

- Fix unused-var lint errors and apply formatter
- Add Russian and Belarusian to supported languages
- Merge pull request raycast#5 from lavrovpy/feature/colored-pos-chips
- Add color-coded part-of-speech chips
- Improve flashcard rating UX: reorder actions and simplify labels
- Update CHANGELOG with recent features and add publishing docs to AGENTS.md
- Merge maintainer contributions (eslint-config, prettierrc, type deps)
- Pull contributions
- Merge pull request raycast#4 from lavrovpy/add-unit-tests
- Add unit tests with Vitest for src/lib/ business logic
- Merge pull request raycast#3 from lavrovpy/text-translation-support
- Cancel in-flight requests on search text change
- Show translation before original in text detail panel
- Show detail panel for text translation results
- Fix stale result blocking text translation flow
- Rename "Translate Word" command to "Translate"
- Add long text and sentence translation support
- Update README with typo correction feature
- Add typo correction support to translation flow
- Merge pull request raycast#1 from lavrovpy/multiple-languages-support
- Fix Rules of Hooks violation and TS narrowing in all commands
- Add graceful error handling for invalid language configuration
- Validate source ≠ target language and remove unused nativeName
- Remove legacy en→uk storage migration code
- Merge branch \'main\' into multiple-languages-support
- Merge pull request raycast#2 from lavrovpy/add-claude-github-actions-1772448681462
- "Claude Code Review workflow"
- "Claude PR Assistant workflow"
- Add configurable source/target language support
@lavrovpy

Copy link
Copy Markdown
Contributor Author

Hi @pernielsentikaer,
thank you for your review and update!

I added support for 15 more languages, automatic typo correction and longer texts support.

Could you take another look at the extension?

@pernielsentikaer pernielsentikaer 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.

Hi 👋

I just checked our store and found quite a few similar extensions that I hadn't noticed before. It might make more sense to check them out; maybe they already cover what you need?

  • Extension: Lingorep • What it does: Translate + save + spaced repetition • Overlap: Very high — same core concept (translate, save, review with SRS)
  • Extension: Word4you • What it does: AI-powered word learning/collecting • Overlap: High — AI translation + word saving
  • Extension: Anki • What it does: Anki flashcard integration • Overlap: Medium — flashcards but requires the external Anki app
  • Extension: Mochi • What it does: Create Mochi flashcards • Overlap: Low — just card creation, different service

Lingorep is the closest match — it literally "translates, saves, and repeats translations to increase your vocabulary" with spaced repetition. VocaBuilder adds Gemini-powered translation (compared to whatever Lingorep uses), typo correction, part-of-speech tagging, example sentences, text/sentence translation, and configurable language pairs. But the core value proposition is identical.

Could you please check them out? If anything is missing, it would be better to enhance it. I'm sorry for not spotting them at first.

@pernielsentikaer
pernielsentikaer marked this pull request as draft March 17, 2026 11:12
@raycastbot

Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Mar 31, 2026
- Add export actions to history page (raycast#9)
- Add CI quality gate workflow (raycast#8)
- Add multi-sense word translation (raycast#7)
- Add toggle languages action (raycast#6)
- Fix LanguagePair null-narrowing TypeScript errors
@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Apr 2, 2026
- Update README for current extension behavior (raycast#13)
- Improve flashcard finish-screen primary action (raycast#12)
- Handle offline errors with user-friendly feedback (raycast#11)
- Fix sense picker layout truncation (raycast#10)
@lavrovpy

lavrovpy commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @pernielsentikaer, thanks for your feedback! I reviewed each extension you listed. Lingorep is the closest match on paper, so compared it with my extension.

Lingorep is a SaaS client, not a standalone extension. It translates via Google Translate API, requires OAuth to save anything, stores words on their cloud, and redirects to lingorep.com/learn for spaced repetition review. The free tier caps at 150 saved words before requiring a paid subscription. The Raycast extension itself exposes a single command - translate and save.

VocaBuilder is local-first and self-contained extension that doesn't require account creation and doesn't have a word cap. Translation, history, and flashcard review all happen inside Raycast. The user brings their own Gemini API key, and data stays in LocalStorage.

The feature gap is significant:

  • Multi-sense translation — Gemini returns up to 5 distinct senses for polysemous words (different translations, different parts of speech). The user picks which sense to save. Lingorep shows flat Google Translate dictionary entries with no selection workflow.
  • Example sentences - each sense includes a target-language example and its source-language translation. Lingorep does not provide this.
  • Typo correction - misspelled input is corrected before translation, with a visual indicator showing the original. Not present in Lingorep.
  • Flashcards in Raycast - full SM-2 spaced repetition sessions (Again / Good / Easy), run natively. Lingorep has no review flow inside Raycast.
  • History browser - searchable, with detail views and export to JSON, Anki TSV, and Quizlet TSV.
  • Language toggle - swap source and target direction on the fly without leaving the command.

Since your last review, I've added multi-sense word support (#7), language toggling (#6) and Anki/Quizlet export (#9).

The extensions target different users. Lingorep is for people who want cloud sync and a web-based review loop. VocaBuilder is for users who want everything local, inside Raycast, with richer linguistic output from Gemini.

@lavrovpy
lavrovpy marked this pull request as ready for review April 3, 2026 15:38
easeFactor = Math.max(1.3, prevEaseFactor - 0.2);
} else {
repetitions = prevRepetitions + 1;
interval = repetitions < 2 ? (repetitions === 1 ? 6 : 1) : Math.round(prevInterval * prevEaseFactor);

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.

P1 SM-2 first-interval logic always resolves to 6

After incrementing repetitions = prevRepetitions + 1, the guard repetitions < 2 is only true when repetitions === 1 (i.e. the card's very first correct answer). The ternary repetitions === 1 ? 6 : 1 therefore always evaluates to 6 — the 1 branch is dead code. Per the SM-2 spec the first-repetition interval should be 1 day and the second 6 days, but the current code gives 6 days on the first correct answer and skips the hardcoded second step entirely, causing later intervals (Math.round(6 * 2.5) = 15) to diverge from the algorithm the PR advertises.

Suggested change
interval = repetitions < 2 ? (repetitions === 1 ? 6 : 1) : Math.round(prevInterval * prevEaseFactor);
interval = repetitions === 1 ? 1 : repetitions === 2 ? 6 : Math.round(prevInterval * prevEaseFactor);
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/vocabuilder/src/flashcards.tsx
Line: 26

Comment:
**SM-2 first-interval logic always resolves to 6**

After incrementing `repetitions = prevRepetitions + 1`, the guard `repetitions < 2` is only true when `repetitions === 1` (i.e. the card's very first correct answer). The ternary `repetitions === 1 ? 6 : 1` therefore always evaluates to `6` — the `1` branch is dead code. Per the SM-2 spec the first-repetition interval should be **1 day** and the second **6 days**, but the current code gives **6 days** on the first correct answer and skips the hardcoded second step entirely, causing later intervals (`Math.round(6 * 2.5) = 15`) to diverge from the algorithm the PR advertises.

```suggestion
      interval = repetitions === 1 ? 1 : repetitions === 2 ? 6 : Math.round(prevInterval * prevEaseFactor);
```

How can I resolve this? If you propose a fix, please make it concise.

lavrovpy added 2 commits April 5, 2026 12:50
- Add word pronunciation via Gemini TTS (raycast#17)
- Add husky pre-commit hook for linting (raycast#16)
- Fix primary action on error screen (raycast#15)
@lavrovpy

lavrovpy commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Also, I've added TTS pronunciation powered by Gemini 2.5, user now can press Cmd+O to hear the correct pronunciation of any word

@pernielsentikaer pernielsentikaer 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.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 0a27e1c into raycast:main Apr 8, 2026
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@lavrovpy
lavrovpy deleted the ext/vocabuilder branch May 23, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants