Commit 6ca8c48
authored
feat: native comments, bug reports, dictionary, type safety (#200)
* feat: native comments, bug reports, word dictionary, and type safety overhaul
Comments system:
- Replace Giscus (GitHub Discussions) with native comment section on word pages
- Comments table in Postgres (shared with bug reports via type field)
- Real-time game result badges via single SQL query with correlated subquery
- Badge rules: N/maxGuesses for wordle modes, N guesses for semantic, skip speed
- Mode label only shown when user has 2+ badges for the same word
- Basic moderation: profanity filter, URL blocking, rate limiting, hidden flag
- Flat list, auth required to post, public to read
Bug reports & feedback:
- In-app report modal replacing GitHub Issues link in sidebar
- Reports stored in comments table (type='report'/'feedback')
- Auto-collects URL, browser, screen size, PWA status, language, mode
- Optional email notification via Resend (works without it)
Word page improvements:
- WordDictionary: full Wiktionary entries (senses, etymology, IPA, forms)
- WordTranslations: cross-language word links with SSR-safe language names
- Fix hydration mismatch: translations now use server-resolved names instead
of client-side cache (useNuxtData), eliminating 80+ hydration warnings that
were corrupting Vue's component tree and breaking teleports/event handlers
- Fix @unhead/vue dispose crash: merge 3 useHead/useSeoMeta calls into 1
- JSON-LD enriched with pronunciation and etymology from kaikki data
- Image handling moved from HEAD-probe to server-provided image_url
Type safety (45 errors → 0):
- Add type annotations to all implicit-any parameters across server utils
- Extend UiStrings and LanguageHelp types with missing optional properties
- Fix null vs undefined mismatches in Vue components
- Fix Nuxt route type recursion (ofetch import bypasses typed $fetch)
- Add trackCustomEvent to analytics composable
- Fix semantic.vue notification, game complete params, and compass types
- Add TargetNeighbor model to Prisma schema (was orphaned, 4.4M rows)
Passkey auth improvements (LoginModal rewrite):
- Multi-step flow: main → passkey choice → register/authenticate
- Platform-aware ordering (passkey first on iOS, Google first elsewhere)
- Email sign-in placeholder
Other:
- Dictionary import script (scripts/import_dictionary.py)
- Gitignore: design/, kaikki_processed/, public exploration files
- TODO: leaderboard comments, comment admin tooling, Resend setup
* style: format with Prettier + fix ruff lint errors1 parent ed89cff commit 6ca8c48
59 files changed
Lines changed: 4026 additions & 1036 deletions
File tree
- components
- account
- app
- game
- word
- composables
- pages
- [lang]
- word
- plugins
- prisma
- scripts
- server
- api
- [lang]
- semantic
- word-image
- word
- auth
- user
- webauthn
- routes/auth
- utils
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
0 commit comments