aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/settings (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix: check import quota before importing bookmarks (#2232)Mohamed Bassem2025-12-081-2/+11
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* feat: Add automated bookmark backup feature (#2182)Mohamed Bassem2025-11-291-0/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* feat: import from mymind (#2138)Mohamed Bassem2025-11-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add mymind importer support This commit adds support for importing bookmarks from mymind CSV exports. Changes: - Added mymind to ImportSource type in parsers.ts - Implemented parseMymindBookmarkFile() to parse mymind CSV format - Added mymind case to parseImportFile() switch statement - Added mymind import card to ImportExport UI component - Added English translation for mymind import description - Added comprehensive test for mymind CSV parsing The mymind CSV format includes: - WebPages (URLs with optional notes) - Notes (text content without URLs) - Tags (comma-separated) - Created timestamps (ISO format) Fixes #654 * format * use zod for parsing --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat(rss): Add import tags from RSS feed categories (#2031)Mohamed Bassem2025-11-021-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(feeds): Add import tags from RSS feed categories - Add importTags boolean field to rssFeedsTable schema (default: false) - Create database migration 0063_add_import_tags_to_feeds.sql - Update zod schemas (zFeedSchema, zNewFeedSchema, zUpdateFeedSchema) to include importTags - Update Feed model to handle importTags in create and update methods - Update feedWorker to: - Read title and categories from RSS parser - Attach categories as tags to bookmarks when importTags is enabled - Log warnings if tag attachment fails Resolves #1996 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * feat(web): Add importTags option to feed settings UI - Add importTags toggle to FeedsEditorDialog (create feed) - Add importTags toggle to EditFeedDialog (edit feed) - Display as a bordered switch control with descriptive text - Defaults to false for new feeds Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * fix migration * remove extra migration --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com>
* feat: Revamp import experience (#2001)Mohamed Bassem2025-10-043-5/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: import v2 * remove new session button * don't redirect after import * store and lint to root list * models + tests * redesign the progress * simplify the import session for ow * drop status from session schema * split the import session page * i18n * fix test * remove pagination * fix some colors in darkmode * one last fix * add privacy filter * privacy check * fix interactivity of import progress * fix test
* feat: Regen api keysMohamed Bassem2025-09-144-21/+152
|
* feat: Show loading indicator while file is being generated #1787 (#1870)ahmed-abdelkarim2025-09-071-7/+51
| | | Co-authored-by: ahmed.abdelakrim <ahmad.abdelakrim89@gmail.com>
* fix(web): Fix hydration errors in add api key pageMohamedBassem2025-08-231-14/+7
|
* refactor: Extract the importing logic into its own hookMohamed Bassem2025-07-261-258/+2
|
* feat: Add stripe based subscriptionsMohamed Bassem2025-07-131-0/+233
|
* feat: Add delete account supportMohamed Bassem2025-07-131-0/+182
|
* fix(web): Fix the alignment in the user options pageMohamed Bassem2025-07-121-4/+1
|
* fix: Prioritize crawling user added links over bulk imports. fixes #1717Mohamed Bassem2025-07-121-0/+2
|
* feat: Add a new timezone user settingMohamed Bassem2025-07-061-3/+77
|
* fix: switch import / export icons (#1682)Harry Peach2025-06-291-2/+2
|
* chore: More oxlint changesMohamed Bassem2025-06-221-8/+6
|
* chore: migrate away from eslint to oxlint (#1642)xuatz2025-06-223-1/+3
| | | | | | | * chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals
* fix(web): Smaller card titles in the user info pageMohamed Bassem2025-06-073-3/+3
|
* feat(web): Redesign the user settings pageMohamed Bassem2025-06-073-188/+300
|
* fix(web): Drop the experimental icon from rss feedsMohamed Bassem2025-06-071-9/+0
|
* feat: Maintain list structure when importing from netscape. Fixes #538Mohamed Bassem2025-06-011-44/+87
|
* feat: add user customisable default archive display behaviour (#1505)xuatz2025-06-011-3/+49
| | | | | | | | | | | | | | | | | * fix typo * implementation * bug fix and refactoring * Use nuqs for searchParam management * remove the todo about the tests * fix tests --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* fix: Truncate the RSS feed urlMohamed Bassem2025-05-251-1/+6
|
* feat: Allow defaulting to reader mode when clicking on bookmarks. Fixes #662Mohamed Bassem2025-05-241-3/+99
|
* feat: Read the archive status from omnivore and pocket. Fixes #703MohamedBassem2025-05-241-0/+1
|
* feat: Allow enabling/disabling RSS feedsMohamed Bassem2025-05-171-17/+48
|
* feat: Add NETSCAPE-Bookmark-file-1 export format support (#1374)Yuiki Saito2025-05-111-1/+22
| | | | | | | | | | | | | * Add function to export bookmarks in NETSCAPE-Bookmark-file-1 format * Update export endpoint to support NETSCAPE format * Add format selection to export UI * include tags in the export --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feat: Implement generic rule engine (#1318)Mohamed Bassem2025-04-273-4/+17
| | | | | | | | | | | | | | | | | * Add schema for the new rule engine * Add rule engine backend logic * Implement the worker logic and event firing * Implement the UI changesfor the rule engine * Ensure that when a referenced list or tag are deleted, the corresponding event/action is * Dont show smart lists in rule engine events * Add privacy validations for attached tag and list ids * Move the rules logic into a models
* chore: rename missing files/conf from Hoarder to Karakeep (#1280)adripo2025-04-211-7/+7
| | | | | | | | | * refactor: Rename remaining project configuration from Hoarder to Karakeep * some fixes --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feat: Add import support for Tab Session Manager (#1246)Jorge Barnaby2025-04-161-1/+29
| | | | | | | | | * feat: Add import support for Tab Session Manager * drop unneeded schema fields --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* chore: Rename hoarder packages to karakeepMohamedBassem2025-04-127-11/+11
|
* fix: Do clientside import dedup and parallelize import callsMohamedBassem2025-04-071-24/+64
|
* fix(ui): Fix export button sizing to match the import cardsMohamed Bassem2025-03-221-1/+1
|
* feat(web): Redesign the import/export pageMohamed Bassem2025-03-081-68/+135
|
* feat: Change webhooks to be configurable by usersMohamed Bassem2025-01-192-0/+584
|
* feat: Support customizing the summarization prompt. Fixes #731Mohamed Bassem2025-01-121-10/+47
|
* refactor: Refactor sidebar into a shared componentMohamed Bassem2024-12-303-112/+0
|
* feat: add Linkwarden importer (#786)Patrick Leonard2024-12-291-1/+16
| | | | | | | | | * added in Linkwarden import * simpler parsing --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feature: Store crawling status code and allow users to find broken links. ↵Mohamed Bassem2024-12-081-0/+6
| | | | Fixes #169
* feature: Allow setting bookmark metadata during creationMohamed Bassem2024-11-171-20/+9
|
* feature: Add i18n support. Fixes #57 (#635)Mohamed Bassem2024-11-1712-75/+176
| | | | | | | | | | | | | * feature(web): Add basic scaffolding for i18n * refactor: Switch most of the app's strings to use i18n strings * fix: Remove unused i18next-resources-for-ts command * Add user setting * More translations * Drop the german translation for now
* ui: Mark the RSS subscriptions as an experimental featureMohamed Bassem2024-11-091-1/+11
|
* feature: Add support for importing bookmarks from Omnivore. Fixes #602Mohamed Bassem2024-11-031-1/+16
|
* fix: Adopt pocket's new export format. Fixes #570Mohamed Bassem2024-11-031-1/+1
|
* feature(web): Add the ability to view the bookmarks of a particular rss feedMohamed Bassem2024-11-031-2/+11
|
* feature: Add support for subscribing to RSS feeds. Fixes #202Mohamed Bassem2024-11-032-1/+411
|
* ui: Redesign the settings page and move it to its own layoutMohamed Bassem2024-10-2710-0/+1103