aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat(ai): Support restricting AI tags to a subset of existing tags (#2444)Mohamed Bassem14 days4-0/+10
| | | | | * feat(ai): Support restricting AI tags to a subset of existing tags Co-authored-by: Claude <noreply@anthropic.com>
* fix: correctly sum low pri and normal crawl queue sizeMohamed Bassem14 days2-4/+11
|
* feat: add source filter to query language (#2465)Mohamed Bassem2026-02-081-0/+16
| | | | | | | | | | | * feat: add source filter to query language Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * autocomplete source --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: treat bookmark not found as a no-op in rule engine instead of a failure ↵Mohamed Bassem2026-02-082-13/+15
| | | | | | | | | | | (#2464) When a bookmark is deleted before the rule engine worker processes its event, the worker would throw an error, triggering failure metrics, error logging, and retries. This changes both the worker and RuleEngine.forBookmark to gracefully skip processing with an info log instead. Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add separate queue for import link crawling (#2452)Mohamed Bassem2026-02-081-1/+7
| | | | | | | * feat: add separate queue for import link crawling --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: lower the priority of recrawlingMohamed Bassem2026-02-082-9/+15
|
* fix: lower priority of mass admin actionsMohamedBassem2026-02-041-12/+33
|
* feat: Import workflow v3 (#2378)Mohamed Bassem2026-02-044-109/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: import workflow v3 * batch stage * revert migration * cleanups * pr comments * move to models * add allowed workers * e2e tests * import list ids * add missing indicies * merge test * more fixes * add resume/pause to UI * fix ui states * fix tests * simplify progress tracking * remove backpressure * fix list imports * fix race on claiming bookmarks * remove the codex file
* fix(web): don't bundle tiktoken in client bundlesMohamed Bassem2026-02-011-1/+1
|
* feat: add support for redirectUrl after signup (#2439)Mohamed Bassem2026-02-014-7/+29
| | | | | | | | | | | * feat: add support for redirectUrl after signup * pr review * more fixes * format * another fix
* refactor: migrate trpc to the new react query integration mode (#2438)Mohamed Bassem2026-02-011-1/+1
| | | | | | | | | * refactor: migrate trpc to the new react query integration mode * more fixes * more migrations * upgrade trpc client
* chore: add an endpoint for propagating client configs to the mobile appMohamed Bassem2026-02-012-0/+12
|
* fix: use user's preferred language for manual summarization (#2429)Mohamed Bassem2026-01-281-1/+9
|
* feat: disable karakeep 2025 wrappedMohamed Bassem2026-01-191-0/+8
|
* feat: Add attachedBy field to update tags endpoint (#2281)Mohamed Bassem2026-01-182-12/+110
| | | | | | | | | | | | | | | | | | | | | | * feat: Add attachedBy field to updateTags endpoint This change allows callers to specify the attachedBy field when updating tags on a bookmark. The field defaults to "human" if not provided, maintaining backward compatibility with existing code. Changes: - Added attachedBy field to zManipulatedTagSchema with default "human" - Updated updateTags endpoint to use the specified attachedBy value - Created mapping logic to correctly assign attachedBy to each tag * fix(cli): migrate bookmark source in migration command * fix * reduce queries --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: track api key usage datesMohamed Bassem2026-01-182-1/+17
|
* feat(rules): add "Title Contains" condition to Rule Engine (#1670) (#2354)Andrii Mokhovyk2026-01-182-0/+50
| | | | | | | | * feat(rules): add "Title Contains" condition to Rule Engine (#1670) * feat(rules): hide title conditions for bookmark created trigger * fix typecheck
* feat: privacy-respecting bookmark debugger admin tool (#2373)Mohamed Bassem2026-01-114-15/+592
| | | | | | | | | | | | | * fix: parallelize queue enqueues in bookmark routes * fix: guard meilisearch client init with mutex * feat: add bookmark debugging admin tool * more fixes * more fixes * more fixes
* fix: depri mass admin actionsMohamed Bassem2026-01-101-10/+31
|
* fix: parallelize queue enqueues in bookmark routesMohamed Bassem2026-01-101-35/+42
|
* feat: Add retry buttons for pending bookmarks in admin panel (#2341)Mohamed Bassem2026-01-031-2/+2
|
* fix: fix wrapped feature to only show bookmarks in 2025Mohamed Bassem2026-01-011-1/+11
|
* fix: don't switch the bookmark back to pending on recrawlMohamed Bassem2026-01-011-7/+0
|
* feat: add "URL Does Not Contain" condition to rule engine (#2280)Mohamed Bassem2025-12-302-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add "URL Does Not Contain" condition to rule engine Add a new condition type `urlDoesNotContain` that allows users to create rules based on URLs that do NOT contain specific strings. This enables more flexible rule configurations, such as: - Automatically adding bookmarks to a "Read Later" list if the URL does not contain "reddit.com" or "youtube.com" Changes: - Added `urlDoesNotContain` condition type to Zod schema - Implemented evaluation logic in RuleEngine - Added UI support in ConditionBuilder component - Added translation key for new condition type - Added test coverage for the new condition Fixes #2259 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * fix type link --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com>
* feat: 2025 wrapped (#2322)Mohamed Bassem2025-12-302-1/+315
| | | | | * feat: 2025 wrapped * don't add wrapped for new users
* ci: fix testsMohamed Bassem2025-12-301-1/+1
|
* chore: add tracing for email functionsMohamed Bassem2025-12-291-124/+118
|
* feat: Add open telemetry (#2318)Mohamed Bassem2025-12-292-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add OpenTelemetry tracing infrastructure Introduce distributed tracing capabilities using OpenTelemetry: - Add @opentelemetry packages to shared-server for tracing - Create tracing utility module with span helpers (withSpan, addSpanEvent, etc.) - Add tRPC middleware for automatic span creation on API calls - Initialize tracing in API and workers entry points - Add demo instrumentation to bookmark creation and crawler worker - Add configuration options (OTEL_TRACING_ENABLED, OTEL_EXPORTER_OTLP_ENDPOINT, etc.) - Document tracing configuration in environment variables docs When enabled, traces are collected for tRPC calls, bookmark creation flow, and crawler operations, with support for any OTLP-compatible backend (Jaeger, Tempo, etc.) * refactor: remove tracing from workers for now Keep tracing infrastructure but remove worker instrumentation: - Remove tracing initialization from workers entry point - Remove tracing instrumentation from crawler worker - Fix formatting in tracing files The tracing infrastructure remains available for future use. * add hono and next tracing * remove extra span logging * more fixes * update config * some fixes * upgrade packages * remove unneeded packages --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: reset tagging status on crawl failure (#2316)Mohamed Bassem2025-12-291-0/+2
| | | | | | | * feat: add the ability to specify a different changelog version * fix: reset tagging status on crawl failure * fix missing crawlStatus in loadMulti
* feat: add customizable tag styles (#2312)Mohamed Bassem2025-12-272-0/+12
| | | | | | | | | | | | | | | * feat: add customizable tag styles * add tag lang setting * ui settings cleanup * fix migration * change look of the field * more fixes * fix tests
* feat: support archiving as pdf (#2309)Mohamed Bassem2025-12-273-0/+11
| | | | | | | | | | | * feat: support archiving as pdf * add supprot for manually triggering pdf downloads * fix submenu * menu cleanup * fix store pdf
* feat: show bookmark owner icon in shared lists (#2277)Mohamed Bassem2025-12-243-0/+7
| | | | | | | | | | | | | | | | | | | | | | * feat: Add owner icon to bookmarks in shared lists Display a small icon showing the bookmark owner's name and email on hover when viewing bookmarks from other users in shared lists. The icon appears in the top-right corner of bookmark cards across all layout types (grid, list, compact). Changes: - Add user field to ZBookmark type to include owner name and email - Update bookmark queries to fetch user information via join - Create BookmarkOwnerIcon component with tooltip showing owner details - Integrate owner indicator into BookmarkLayoutAdaptingCard for all layouts - Only show icon for bookmarks not owned by current user * use icons in more places * remove tooltip providers * fix non list context --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: make avatars publicMohamed Bassem2025-12-241-0/+5
|
* refactor: move assets to their own model (#2301)Mohamed Bassem2025-12-243-161/+270
| | | | | * refactor: move assets to their own model * move asset privacy checks to the model
* feat: add support for user avatars (#2296)Mohamed Bassem2025-12-244-1/+191
| | | | | | | | | | | * feat: add support for user avatars * more fixes * more fixes * more fixes * more fixes
* fix(tests): fix the user setting testsMohamed Bassem2025-12-221-0/+12
|
* feat: Add user settings to disable auto tagging/summarization (#2275)Mohamed Bassem2025-12-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add per-user settings to disable auto-tagging and auto-summarization This commit adds user-level controls for AI features when they are enabled on the server. Users can now toggle auto-tagging and auto-summarization on/off from the AI Settings page. Changes: - Added autoTaggingEnabled and autoSummarizationEnabled fields to user table - Updated user settings schemas and API endpoints to handle new fields - Modified inference workers to check user preferences before processing - Added toggle switches to AI Settings page (only visible when server has features enabled) - Generated database migration for new fields - Exposed enableAutoTagging and enableAutoSummarization in client config The settings default to null (use server default). When explicitly set to false, the user's bookmarks will skip the respective AI processing. * revert migration * i18n --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: check quota usage instead bookmark transactionMohamed Bassem2025-12-221-125/+129
|
* fix: optimize tagging db queries (#2287)Mohamed Bassem2025-12-222-86/+206
| | | | | | | | | * fix: optimize tagging db queries * review * parallel queries * refactoring
* feat: Add unified reader settings with local overrides (#2230)Evan Simkowitz2025-12-152-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add initial impl * fix some format inconsistencies, add indicator in user settings when local is out of sync * Fix sliders in user settings, unify constants and formatting * address CodeRabbit suggestions * add mobile implementation * address coderabbit nitpicks * fix responsiveness of the reader settings popover * Move more of the web UI strings to i18n * update translations for more coverage * remove duplicate logic/definitions * fix android font family * add shared reading setting hook between web and mobile * unify reader settings context for both web and mobile * remove unused export * address coderabbit suggestions * fix tests
* fix: non-link bookmarks where stuck in pending summarization. Fixes #1605Mohamed Bassem2025-12-141-0/+3
|
* feat: Add limits on number of rss feeds and webhooks per userMohamed Bassem2025-12-134-2/+208
|
* fix: add more indicies for faster bookmark queries (#2246)Mohamed Bassem2025-12-111-115/+140
|
* fix: fix correctly accounting for text bookmark in import sessions. #2208Mohamed Bassem2025-12-082-16/+58
|
* feat: add is:broken search qualifier for broken links (#2225)Mohamed Bassem2025-12-081-0/+23
| | | | | | | | | | | | | | | | | | | | 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>
* fix: remove queue triggers outside of updateTags transactionMohamed Bassem2025-12-071-15/+19
|
* fix: fix bypass email verification in apiKey.exchangeMohamed Bassem2025-11-302-0/+56
|
* feat: add support for turnstile on signupMohamed Bassem2025-11-302-0/+84
|
* feat: Add automated bookmark backup feature (#2182)Mohamed Bassem2025-11-296-0/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* fix: lazy load js-tiktoken in prompts module (#2176)Mohamed Bassem2025-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>