aboutsummaryrefslogtreecommitdiffstats
path: root/packages/plugins/queue-restate/src/service.ts (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-12-08fix: fix correctly accounting for text bookmark in import sessions. #2208Mohamed Bassem2-16/+58
2025-12-08fix: check import quota before importing bookmarks (#2232)Mohamed Bassem3-3/+54
* feat: check import quota before importing bookmarks Add quota validation before bookmark import to prevent users from exceeding their bookmark limits. The implementation includes: - New QuotaService.canImportBookmarks() method to check if user can import N bookmarks - New tRPC checkImportQuota procedure for client-side quota validation - Updated useBookmarkImport hook to parse files and check quota before import - Added error banner in ImportExport component to display quota errors - Optimized file parsing to avoid reading the file twice The quota check displays remaining bookmarks and provides clear error messages when the import would exceed the user's quota. * fix * some fixes --------- Co-authored-by: Claude <noreply@anthropic.com>
2025-12-08build: fix typecheck error in query explainerMohamed Bassem1-0/+10
2025-12-08fix: migrate to metascraper-x from metascraper-twitterMohamed Bassem3-297/+16
2025-12-08feat: add is:broken search qualifier for broken links (#2225)Mohamed Bassem7-0/+60
Add a new search qualifier `is:broken` that allows users to filter bookmarks with broken or failed links. This matches the functionality on the broken links settings page, where a link is considered broken if: - crawlStatus is "failure" - crawlStatusCode is less than 200 - crawlStatusCode is greater than 299 The qualifier supports negation with `-is:broken` to find working links. Changes: - Add brokenLinks matcher type definition - Update search query parser to handle is:broken qualifier - Implement query execution logic for broken links filtering - Add autocomplete support with translations - Add parser tests - Update search query language documentation Co-authored-by: Claude <noreply@anthropic.com>
2025-12-08feat: spread feed fetch scheduling deterministically over the hour (#2227)Mohamed Bassem1-0/+31
Previously, all RSS feeds were fetched at the top of each hour (minute 0), which could cause load spikes. This change spreads feed fetches evenly throughout the hour using a deterministic hash of the feed ID. Each feed is assigned a target minute (0-59) based on its ID hash, ensuring consistent scheduling across restarts while distributing the load evenly. Co-authored-by: Claude <noreply@anthropic.com>
2025-12-07fix: better extraction for youtube thumbnails. #2204Mohamed Bassem3-18/+241
2025-12-07fix: remove queue triggers outside of updateTags transactionMohamed Bassem1-15/+19
2025-12-06chore: add benchmarks (#2229)Mohamed Bassem15-0/+789
* chore: add benchmarks * upgrade deps * fixes * lint
2025-12-03build: dont update latest tags on releaseMohamed Bassem1-8/+19
2025-12-03deps: Upgrade nextjs to 15.3.6Mohamed Bassem2-55/+55
2025-11-30feat: add a notification badge for list invitationsMohamed Bassem2-0/+27
2025-11-30docs: add karakeep integration for Home Assistant (#2196)Flo1-0/+8
* Update 13-community-projects.md Add Karakeep integration for Home Assistant * Update docs/docs/13-community-projects.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs/docs/13-community-projects.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update 13-community-projects.md --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-30fix: regen turnstile token on signup resubmissionMohamed Bassem1-1/+14
2025-11-30feat(landing): Add more features to the homepageMohamed Bassem1-8/+47
2025-11-30ci: run arm docker image builds on arm machinesMohamed Bassem1-3/+3
2025-11-30ci: parallelize the docker workflow for platformsMohamed Bassem1-23/+112
2025-11-30fix: reenable idempotency key for search indexingMohamed Bassem1-2/+1
2025-11-30fix: fix bypass email verification in apiKey.exchangeMohamed Bassem2-0/+56
2025-11-30readme: add collaborative lists to the list of featuresMohamed Bassem1-0/+1
2025-11-30fix: Add restate queued idempotency (#2169)Mohamed Bassem4-5/+65
* fix: Add restate queued idempotency * return on failed to acquire
2025-11-30feat: add support for turnstile on signupMohamed Bassem8-0/+165
2025-11-29build: fix npm trusted publishingMohamed Bassem3-3/+12
2025-11-29release: cli, mcp and sdkMohamed Bassem3-3/+3
2025-11-29release(extension): Release version 1.2.8Mohamed Bassem1-1/+1
2025-11-29release(mobile): Bump mobile version to 1.8.3Mohamed Bassem1-3/+3
2025-11-29release(docs): release the 0.29 docsMohamed Bassem103-30/+6020
2025-11-29i18n: fix en_US translationMohamed Bassem1-57/+57
2025-11-29i18n: Sync weblate translationsHosted Weblate31-62/+3286
Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: OpenAI <noreply-mt-openai@weblate.org> Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ar/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/cs/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/da/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/de/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/el/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/en_US/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/es/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fa/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fi/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ga/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/gl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/hr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/hu/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/it/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ja/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ko/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/nb_NO/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/nl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pt/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pt_BR/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ru/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sk/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sv/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/tr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/uk/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/vi/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/zh_Hans/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/zh_Hant/ Translation: Karakeep/Karakeep
2025-11-29feat: autocomplete search terms (#2178)Mohamed Bassem4-61/+629
* refactor(web): split search autocomplete logic * some improvements * restructure the code * fix typesafety * add feed suggestions * fix
2025-11-29build: switch npm to trusted publishingMohamed Bassem4-39/+16
2025-11-29feat: Add automated bookmark backup feature (#2182)Mohamed Bassem32-8/+5697
* feat: Add automated bookmark backup system Implements a comprehensive automated backup feature for user bookmarks with the following capabilities: Database Schema: - Add backupSettings table to store user backup preferences (enabled, frequency, retention) - Add backups table to track backup records with status and metadata - Add BACKUP asset type for storing compressed backup files - Add migration 0066_add_backup_tables.sql Background Workers: - Implement BackupSchedulingWorker cron job (runs daily at midnight UTC) - Create BackupWorker to process individual backup jobs - Deterministic scheduling spreads backup jobs across 24 hours based on user ID hash - Support for daily and weekly backup frequencies - Automated retention cleanup to delete old backups based on user settings Export & Compression: - Reuse existing export functionality for bookmark data - Compress exports using Node.js built-in zlib (gzip level 9) - Store compressed backups as assets with proper metadata - Track backup size and bookmark count for statistics tRPC API: - backups.getSettings - Retrieve user backup configuration - backups.updateSettings - Update backup preferences - backups.list - List all user backups with metadata - backups.get - Get specific backup details - backups.delete - Delete a backup - backups.download - Download backup file (base64 encoded) - backups.triggerBackup - Manually trigger backup creation UI Components: - BackupSettings component with configuration form - Enable/disable automatic backups toggle - Frequency selection (daily/weekly) - Retention period configuration (1-365 days) - Backup list table with download and delete actions - Manual backup trigger button - Display backup stats (size, bookmark count, status) - Added backups page to settings navigation Technical Details: - Uses Restate queue system for distributed job processing - Implements idempotency keys to prevent duplicate backups - Background worker concurrency: 2 jobs at a time - 10-minute timeout for large backup exports - Proper error handling and logging throughout - Type-safe implementation with Zod schemas * refactor: simplify backup settings and asset handling - Move backup settings from separate table to user table columns - Update BackupSettings model to use static methods with users table - Remove download mutation in favor of direct asset links - Implement proper quota checks using QuotaService.checkStorageQuota - Update UI to use new property names and direct asset downloads - Update shared types to match new schema Key changes: - backupSettingsTable removed, settings now in users table - Backup downloads use direct /api/assets/{id} links - Quota properly validated before creating backup assets - Cleaner separation of concerns in tRPC models * migration * use zip instead of gzip * fix drizzle * fix settings * streaming json * remove more dead code * add e2e tests * return backup * poll for backups * more fixes * more fixes * fix test * fix UI * fix delete asset * fix ui * redirect for backup download * cleanups * fix idempotency * fix tests * add ratelimit * add error handling for background backups * i18n * model changes --------- Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28fix: making serverConfig readonlyMohamed Bassem1-1/+3
2025-11-28fix: fix react errors in signin and signup formsMohamed Bassem2-0/+10
2025-11-28fix: separate shared lists in the sidebar (#2180)Mohamed Bassem4-31/+237
* fix: separate shared lists in the sidebar * fix sub * i18n
2025-11-28fix: correctly render asset extracted text in the edit bookmark dialog. ↵Mohamed Bassem1-4/+24
fixes #2181
2025-11-28fix: lazy load js-tiktoken in prompts module (#2176)Mohamed Bassem5-37/+110
* feat: lazy load tiktoken to reduce memory footprint The js-tiktoken module loads a large encoding dictionary into memory immediately on import. This change defers the loading of the encoding until it's actually needed by using a lazy getter pattern. This reduces memory usage for processes that import this module but don't actually use the token encoding functions. * fix: use createRequire for lazy tiktoken import in ES module The previous implementation used bare require() which fails at runtime in ES modules (ReferenceError: require is not defined). This fixes it by using createRequire from Node's 'module' package, which creates a require function that works in ES module contexts. * refactor: convert tiktoken lazy loading to async dynamic imports Changed from createRequire to async import() for lazy loading tiktoken, making buildTextPrompt and buildSummaryPrompt async. This is cleaner for ES modules and properly defers the large tiktoken encoding data until it's actually needed. Updated all callers to await these async functions: - packages/trpc/routers/bookmarks.ts - apps/workers/workers/inference/tagging.ts - apps/workers/workers/inference/summarize.ts - apps/web/components/settings/AISettings.tsx (converted to useEffect) * feat: add untruncated prompt builders for UI previews Added buildTextPromptUntruncated and buildSummaryPromptUntruncated functions that don't require token counting or truncation. These are synchronous and don't load tiktoken, making them perfect for UI previews where exact token limits aren't needed. Updated AISettings.tsx to use these untruncated versions, eliminating the need for useEffect/useState and avoiding unnecessary tiktoken loading in the browser. * fix * fix --------- Co-authored-by: Claude <noreply@anthropic.com>
2025-11-27fix: fix colors in invitation formMohamed Bassem2-7/+7
2025-11-27fix: hide archived checkbox in shared listsMohamed Bassem1-1/+1
2025-11-27feat: improve font and colors of sidebar itemsMohamed Bassem2-11/+16
2025-11-27fix: Propagate group ids in queue calls (#2177)Mohamed Bassem11-37/+103
* fix: Propagate group ids * fix tests
2025-11-24feat: Introduce groupId in restate queue (#2168)Mohamed Bassem5-30/+381
* feat: Introduce groupId in restate queue * add group ids to the interface * use last served timestamp
2025-11-24fix: support invocation cancellation while awaiting sempahoreMohamed Bassem2-1/+13
2025-11-23docs: Add LOG_LEVEL to configuration documentation (#2166)Aaron Korte1-0/+1
* Add LOG_LEVEL to configuration options Added LOG_LEVEL configuration option for application logging. * Add missing trailing pipe
2025-11-23docs: fix link to raycast extension (#1923)David2-2/+2
* Update 13-community-projects.md Updated the Raycast Extension link * tests: Add a test for listing lists * fix link * empty * empty --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
2025-11-23tests: Add a test for listing listsMohamed Bassem1-0/+35
2025-11-23feat: add GET /api/version endpoint (#2167)Mohamed Bassem2-0/+18
Implements a new API endpoint that returns the server version from serverConfig. This will be used for Home Assistant integration to check for updates. Fixes #2148 Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com>
2025-11-23fix(mcp): propagate parent id to createList call. fixes: #2144Mohamed Bassem1-1/+2
2025-11-23feat(mobile): proper handling for shared list permissions (#2165)Mohamed Bassem6-146/+279
* feat(mobile): Restrict bookmark editing in shared lists Apply the same ownership-based restrictions that exist in the web app to the mobile app. Users can now only edit, delete, and manage their own bookmarks, even when viewing them in shared lists. Changes: - BottomActions: Hide edit actions (lists, tags, info, delete) for non-owners - BookmarkCard: Hide favorite button and action menu for non-owners - Info page: Make title, notes, tags, and lists read-only for non-owners - NotePreview: Hide "Edit Notes" button for non-owners All restrictions are based on comparing the current user ID (from useWhoAmI) with the bookmark's userId field. * some fixes * make tags non clickable for collaborators * add leave list --------- Co-authored-by: Claude <noreply@anthropic.com>
2025-11-23feat(mobile): Add highlights page to mobile app (#2156)Mohamed Bassem4-1/+276
* feat: Add highlights page to mobile app This commit adds a new highlights page to the mobile app where users can view all their highlights with the following features: - HighlightCard component: Displays individual highlights with colored borders, text, optional notes, timestamps, and a link to the source bookmark - HighlightList component: Renders a scrollable list of highlights with pull-to-refresh and infinite scroll pagination - UpdatingHighlightList component: Handles data fetching using tRPC infinite queries with automatic cache invalidation - New /dashboard/highlights route with large header title - Added navigation link in Settings tab under "App Settings" All components follow the existing mobile app patterns and integrate with the existing highlights API. * make it a tab --------- Co-authored-by: Claude <noreply@anthropic.com>