1557 Commits

Author SHA1 Message Date
Mohamed Bassem
80278ecfb6 deps: Upgrade nextjs to 15.3.8 2025-12-12 08:59:45 +00:00
Mohamed Bassem
74bdc186cd deps: Upgrade nextjs to 15.3.7 2025-12-11 22:57:15 +00:00
Mohamed Bassem
683083f4bb fix: add more indicies for faster bookmark queries (#2246) 2025-12-11 10:27:03 +00:00
Claude
91784cd20c feat: make asset preprocessing worker timeout configurable
- Added ASSET_PREPROCESSING_JOB_TIMEOUT_SEC environment variable with default of 60 seconds (increased from hardcoded 30 seconds)
- Updated worker to use the configurable timeout from serverConfig
- Added documentation for the new configuration option
2025-12-10 08:23:43 +00:00
Mohamed Bassem
3e8cc745dd fix: Add cache control header on asset endpoints 2025-12-10 08:04:15 +00:00
Mohamed Bassem
265b677302 chore: Allowing multi user benchmarks and adding more coverage 2025-12-09 20:17:10 +00:00
Mohamed Bassem
69a756aadd feat(cli): Add ability to list users for the admin in the CLI 2025-12-08 11:02:59 +00:00
Mohamed Bassem
6886385ce2 fix: fix correctly accounting for text bookmark in import sessions. #2208 2025-12-08 10:47:13 +00:00
Mohamed Bassem
20d3761c89 fix: check import quota before importing bookmarks (#2232)
* 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-08 10:35:17 +00:00
Mohamed Bassem
b6c2dadd88 build: fix typecheck error in query explainer 2025-12-08 00:42:54 +00:00
Mohamed Bassem
c6f93b3b9b fix: migrate to metascraper-x from metascraper-twitter 2025-12-08 00:36:39 +00:00
Mohamed Bassem
1f43f232f7 feat: add is:broken search qualifier for broken links (#2225)
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-08 00:31:46 +00:00
Mohamed Bassem
13a090c411 feat: spread feed fetch scheduling deterministically over the hour (#2227)
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-08 00:30:11 +00:00
Mohamed Bassem
e3cc546363 fix: better extraction for youtube thumbnails. #2204 2025-12-07 11:43:14 +00:00
Mohamed Bassem
cf2a12c804 fix: remove queue triggers outside of updateTags transaction 2025-12-07 09:20:54 +00:00
Mohamed Bassem
6180c6622c chore: add benchmarks (#2229)
* chore: add benchmarks

* upgrade deps

* fixes

* lint
2025-12-06 16:07:11 +00:00
Mohamed Bassem
de98873a06 build: dont update latest tags on release 2025-12-03 16:49:22 +00:00
Mohamed Bassem
20081a3a6c deps: Upgrade nextjs to 15.3.6 2025-12-03 16:16:11 +00:00
Mohamed Bassem
3c6b8e97be feat: add a notification badge for list invitations 2025-11-30 15:46:44 +00:00
Flo
9a33938529 docs: add karakeep integration for Home Assistant (#2196)
* 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-30 15:22:53 +00:00
Mohamed Bassem
9257b534f7 fix: regen turnstile token on signup resubmission 2025-11-30 11:38:58 +00:00
Mohamed Bassem
9a6d36f2e9 feat(landing): Add more features to the homepage 2025-11-30 10:09:55 +00:00
Mohamed Bassem
3421246dda ci: run arm docker image builds on arm machines 2025-11-30 01:35:35 +00:00
Mohamed Bassem
2e88961757 ci: parallelize the docker workflow for platforms 2025-11-30 01:20:02 +00:00
Mohamed Bassem
2ef751ef49 fix: reenable idempotency key for search indexing 2025-11-30 00:31:15 +00:00
Mohamed Bassem
e4f434e730 fix: fix bypass email verification in apiKey.exchange 2025-11-30 00:27:20 +00:00
Mohamed Bassem
d6d319d3a8 readme: add collaborative lists to the list of features 2025-11-30 00:27:20 +00:00
Mohamed Bassem
a71b9505ea fix: Add restate queued idempotency (#2169)
* fix: Add restate queued idempotency

* return on failed to acquire
2025-11-30 00:19:28 +00:00
Mohamed Bassem
b12c1c3a82 feat: add support for turnstile on signup 2025-11-30 00:01:07 +00:00
Mohamed Bassem
4898b6be87 build: fix npm trusted publishing cli/v0.29.0 sdk/v0.29.0 mcp/v0.29.0 2025-11-29 18:53:44 +00:00
Mohamed Bassem
28d6750ecc release: cli, mcp and sdk 2025-11-29 18:35:52 +00:00
Mohamed Bassem
fdea0861b0 release(extension): Release version 1.2.8 extension/v1.2.8 android/v1.8.3-0 ios/v1.8.3-0 2025-11-29 18:34:01 +00:00
Mohamed Bassem
8da5b59821 release(mobile): Bump mobile version to 1.8.3 2025-11-29 18:33:23 +00:00
Mohamed Bassem
97c386a4d1 release(docs): release the 0.29 docs 2025-11-29 18:32:19 +00:00
Mohamed Bassem
f01d96fd91 i18n: fix en_US translation v0.29.0 2025-11-29 17:07:02 +00:00
Hosted Weblate
e1ad2cfd32 i18n: Sync weblate translations
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-29 17:33:36 +01:00
Mohamed Bassem
ebafbe599d feat: autocomplete search terms (#2178)
* refactor(web): split search autocomplete logic

* some improvements

* restructure the code

* fix typesafety

* add feed suggestions

* fix
2025-11-29 16:31:25 +00:00
Mohamed Bassem
335a84bb59 build: switch npm to trusted publishing 2025-11-29 14:55:02 +00:00
Mohamed Bassem
86a4b39665 feat: Add automated bookmark backup feature (#2182)
* 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-29 14:53:31 +00:00
Mohamed Bassem
e67c33e466 fix: making serverConfig readonly 2025-11-28 21:38:33 +00:00
Mohamed Bassem
6ab79845f2 fix: fix react errors in signin and signup forms 2025-11-28 21:04:57 +00:00
Mohamed Bassem
2619f4cfef fix: separate shared lists in the sidebar (#2180)
* fix: separate shared lists in the sidebar

* fix sub

* i18n
2025-11-28 15:39:57 +00:00
Mohamed Bassem
9ed338fe81 fix: correctly render asset extracted text in the edit bookmark dialog. fixes #2181 2025-11-28 15:19:18 +00:00
Mohamed Bassem
e2877b458f fix: lazy load js-tiktoken in prompts module (#2176)
* 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-28 10:29:49 +00:00
Mohamed Bassem
a13a227e20 fix: fix colors in invitation form 2025-11-27 23:12:22 +00:00
Mohamed Bassem
adde809909 fix: hide archived checkbox in shared lists 2025-11-27 21:36:21 +00:00
Mohamed Bassem
5bea5d39f8 feat: improve font and colors of sidebar items 2025-11-27 18:57:50 +00:00
Mohamed Bassem
6821257def fix: Propagate group ids in queue calls (#2177)
* fix: Propagate group ids

* fix tests
2025-11-27 16:02:18 +00:00
Mohamed Bassem
5426875949 feat: Introduce groupId in restate queue (#2168)
* feat: Introduce groupId in restate queue

* add group ids to the interface

* use last served timestamp
2025-11-24 01:23:06 +00:00
Mohamed Bassem
38842f77e5 fix: support invocation cancellation while awaiting sempahore 2025-11-24 00:47:03 +00:00