Skip to content

Add duden extension#26573

Merged
raycastbot merged 8 commits intoraycast:mainfrom
ahinderling:ext/duden
Apr 18, 2026
Merged

Add duden extension#26573
raycastbot merged 8 commits intoraycast:mainfrom
ahinderling:ext/duden

Conversation

@ahinderling
Copy link
Copy Markdown
Contributor

@ahinderling ahinderling commented Mar 23, 2026

Description

Lookup lemma from the online DUDEN (German language dictionary)

Screencast

Checklist

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

- update title to proper case
- Fix TypeScript cache type error
- removed obsolete asset file
@ahinderling ahinderling marked this pull request as ready for review March 23, 2026 10:09
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 23, 2026

Greptile Summary

This PR adds a new Duden (German dictionary) extension that scrapes Duden.de using cheerio, displays word details (part of speech, frequency, meanings, synonyms, etymology, IPA), and uses useNavigation().push() for proper back-navigation. The extension is well-structured with caching, request timeouts, and correct Raycast conventions throughout.

Confidence Score: 5/5

Safe to merge — all remaining findings are P2 style suggestions that do not affect runtime behavior.

Navigation is correctly handled with useNavigation().push(), the frequency display is protected against out-of-range values, the changelog uses the {PR_MERGE_DATE} placeholder, and categories are correctly set to Documentation + Web. The only open finding is the redundant @types/cheerio devDependency, which is a cleanup suggestion and not a blocker.

extensions/duden/package.json — redundant @types/cheerio devDependency

Important Files Changed

Filename Overview
extensions/duden/src/api/duden.ts Well-structured API client with request timeout, AbortController, manual TTL-based caching, and correct error handling for 404s.
extensions/duden/src/utils/parser.ts Solid cheerio-based HTML parser; frequency is extracted via text-length heuristic which is fragile but clamped downstream. Uses cheerio.Cheerio type annotation that relies on the redundant @types/cheerio@0.22.35.
extensions/duden/src/components/WordDetails.tsx Clean Detail view; frequency is clamped with Math.min/Math.max so repeat() never receives a negative argument. Proper ActionPanel with copy and open-in-browser actions.
extensions/duden/src/search-duden-de.tsx Uses useNavigation().push() for proper back-navigation; loading state is correctly reset on early-return (< 3 chars); cancellation flag prevents stale state updates.
extensions/duden/package.json Categories correctly set to Documentation + Web; @types/cheerio is a redundant devDependency that should be removed since cheerio@1.0.0 ships its own types.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/duden/package.json
Line: 34

Comment:
**`@types/cheerio` is redundant with cheerio@1.0.0**

`cheerio@1.0.0` ships its own bundled TypeScript types; `@types/cheerio@0.22.35` was the DefinitelyTyped package for the old `v0.x` API and is no longer needed. TypeScript prefers a package's own bundled types, so this entry is effectively unused and can cause confusion if the `v0.x` type shapes (e.g. the non-generic `Cheerio` namespace members) differ from what cheerio@1's bundled types export.

```suggestion
    "@types/node": "22.13.10",
```

**Rule Used:** What: Every dependency listed in package.json must... ([source](https://app.greptile.com/review/custom-context?memory=bffc60eb-f9f2-4219-b804-76e29e267d43))

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

Reviews (5): Last reviewed commit: "fix stuck loading indicator when search ..." | Re-trigger Greptile

Comment thread extensions/duden/src/search-duden-de.tsx Outdated
Comment thread extensions/duden/CHANGELOG.md Outdated
Comment thread extensions/duden/src/search-duden-de.tsx
Comment thread extensions/duden/package.json
- Remove unused DudenWord import
- Fix double debouncing: Remove manual setTimeout, keep throttle prop
- Fix navigation: Use Raycast navigation stack instead of conditional rendering
- use \'Documentation\' as primary category
- use {PR_MERGE_DATE} placeholder in changelog
@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 Apr 6, 2026
@ahinderling
Copy link
Copy Markdown
Contributor Author

👋 this is not stale - just waiting for review

@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Apr 6, 2026
@0xdhrv 0xdhrv self-assigned this Apr 14, 2026
Comment thread extensions/duden/assets/dudenicon.png
Comment thread extensions/duden/CHANGELOG.md
Comment thread extensions/duden/src/search-duden-de.tsx
Comment thread extensions/duden/package.json Outdated
Comment thread extensions/duden/src/api/duden.ts Outdated
Comment thread extensions/duden/src/types/duden.ts Outdated
Comment thread extensions/duden/src/api/duden.ts Outdated
Copy link
Copy Markdown
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

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

Hey @ahinderling 👋

I have added a few comments for you to address.

I'm looking forward to testing this extension again 🔥

Feel free to contact me here or at Slack if you have any questions.


I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

@0xdhrv 0xdhrv marked this pull request as draft April 14, 2026 06:54
- remove unused clearCache function
- remove unused DudenApiError interface declaration
- add cleanup effect using isCancelled flag
- switch to raycast\'s built in cache for caching
- remove unused dependencies from package.json
- improve extension icon to work better in both light and dark mode
- update changelog: less technical, more user facing
@ahinderling ahinderling marked this pull request as ready for review April 14, 2026 10:59
Comment thread extensions/duden/src/components/WordDetails.tsx Outdated
@ahinderling ahinderling requested a review from 0xdhrv April 14, 2026 12:50
Comment on lines +60 to +66
const response = await fetch(url, {
signal: controller.signal,
headers: {
"User-Agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
},
});
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.

issue: scraping might violate duden ToS

The extension scrapes Duden.de HTML while impersonating a regular Chrome browser. This is deceptive and may violate Duden.de's Terms of Service.

Copy link
Copy Markdown
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

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

Hey @ahinderling 👋

I have added a comment for you to address.

I'm looking forward to testing this extension again 🔥

Feel free to contact me here or at Slack if you have any questions.


I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

@0xdhrv 0xdhrv marked this pull request as draft April 15, 2026 12:58
@ahinderling
Copy link
Copy Markdown
Contributor Author

Hey @0xdhrv 👋 thanks for flagging this.

I've updated the User-Agent in src/api/duden.ts to honestly identify the extension:

Raycast Duden Extension (https://github.com/raycast/extensions)

This removes the "impersonating Chrome" concern — Duden can now recognize the traffic and contact the project or block it if they want.

On the ToS question, I checked both robots.txt and the AGB and couldn't find a violation:

robots.txt (https://www.duden.de/robots.txt)

  • /rechtschreibung/* (the path this extension hits) is not disallowed for User-agent: *. Only /suche/, /suchen/, /admin/, /user/, /profiles/, /node, and /filter/tips are blocked.
  • AI training crawlers (GPTBot, ClaudeBot, anthropic-ai, CCBot, Bytespider, …) are explicitly blocked site-wide — but this is about bulk training data, not user-initiated lookups.

AGB (https://www.duden.de/service/agb)

  • No clause prohibits automated access, scraping, third-party clients, or non-browser user agents.
  • § 6 (11) reserves text/data mining rights under § 44b UrhG — this is a blanket reservation against bulk data mining, not individual user queries.
  • § 11 (1–3) covers copyright (no redistribution, no removal of notices). The extension doesn't republish content; it displays results to the user who initiated the query, the same as the browser would.

Happy to reconsider if you're aware of a specific clause I missed, or if Raycast has a stricter internal policy for scraping-based extensions. Otherwise I think the honest User-Agent is the right fix here and I'll mark the PR ready for review.

@ahinderling ahinderling marked this pull request as ready for review April 15, 2026 14:22
Comment thread extensions/duden/src/search-duden-de.tsx
@ahinderling ahinderling requested a review from 0xdhrv April 15, 2026 17:11
Copy link
Copy Markdown
Contributor

@0xdhrv 0xdhrv left a comment

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 da53f2d into raycast:main Apr 18, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/c76b7srxxm/duden

@raycastbot
Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@ahinderling).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

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.

3 participants