[PR #2037] [MERGED] feat: Add source field to track bookmark creation sources #1957

Closed
opened 2026-03-02 11:59:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2037
Author: @MohamedBassem
Created: 10/12/2025
Status: Merged
Merged: 10/12/2025
Merged by: @MohamedBassem

Base: mainHead: claude/issue-2036-20251012-1445


📝 Commits (7)

📊 Changes

16 files changed (+2650 additions, -12 deletions)

View changed files

📝 apps/browser-extension/src/SavePage.tsx (+5 -1)
📝 apps/cli/src/commands/bookmarks.ts (+18 -3)
📝 apps/mobile/app/dashboard/bookmarks/new.tsx (+6 -2)
📝 apps/mobile/app/sharing.tsx (+15 -3)
📝 apps/mobile/lib/upload.ts (+6 -1)
📝 apps/web/components/dashboard/UploadDropzone.tsx (+7 -1)
📝 apps/web/lib/hooks/useBookmarkImport.ts (+1 -0)
📝 apps/workers/workers/feedWorker.ts (+1 -0)
📝 packages/api/routes/bookmarks.ts (+5 -1)
packages/db/drizzle/0063_add_bookmark_source.sql (+1 -0)
packages/db/drizzle/meta/0063_snapshot.json (+2496 -0)
📝 packages/db/drizzle/meta/_journal.json (+7 -0)
📝 packages/db/schema.ts (+12 -0)
📝 packages/open-api/karakeep-openapi-spec.json (+55 -0)
📝 packages/shared/types/bookmarks.ts (+14 -0)
📝 packages/trpc/routers/bookmarks.ts (+1 -0)

📄 Description

Summary

  • Add source field to bookmarks table to track creation source
  • Update all bookmark creation callsites to pass appropriate source value
  • Create database migration for schema change

Test Plan

  • Run typecheck: pnpm typecheck
  • Run lint: pnpm lint
  • Regenerate migration metadata: pnpm db:generate --name add_bookmark_source_field
  • Test bookmark creation from each source (api, web, cli, mobile, singlefile, rss)
  • Verify source field is populated correctly in database

Fixes #2036

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2037 **Author:** [@MohamedBassem](https://github.com/MohamedBassem) **Created:** 10/12/2025 **Status:** ✅ Merged **Merged:** 10/12/2025 **Merged by:** [@MohamedBassem](https://github.com/MohamedBassem) **Base:** `main` ← **Head:** `claude/issue-2036-20251012-1445` --- ### 📝 Commits (7) - [`6f89501`](https://github.com/karakeep-app/karakeep/commit/6f89501bb36b36e445cc111feee2b1ba28cea8ae) feat: Add source field to track bookmark creation sources - [`2041aa2`](https://github.com/karakeep-app/karakeep/commit/2041aa207cf1e5e3d7d79153c2193f4f98cef2cc) feat: Add extension source type for browser extension - [`8133672`](https://github.com/karakeep-app/karakeep/commit/81336729cc9d97de549537893faa756fc2944883) fix CI - [`5a14547`](https://github.com/karakeep-app/karakeep/commit/5a14547f0e2b7d86b6d4dfea5755c145a5b9c870) fix CI - [`4c274cc`](https://github.com/karakeep-app/karakeep/commit/4c274cc1c95c0e00ca90cfc73ee65030638fc5f2) fix the migration file - [`c755b3f`](https://github.com/karakeep-app/karakeep/commit/c755b3f99aa2a6a5f875dff9fdffffeb7f5f0a22) add import source - [`b51aee0`](https://github.com/karakeep-app/karakeep/commit/b51aee0d69a28c512360d24562f402bdd4f07d24) make source nullish ### 📊 Changes **16 files changed** (+2650 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `apps/browser-extension/src/SavePage.tsx` (+5 -1) 📝 `apps/cli/src/commands/bookmarks.ts` (+18 -3) 📝 `apps/mobile/app/dashboard/bookmarks/new.tsx` (+6 -2) 📝 `apps/mobile/app/sharing.tsx` (+15 -3) 📝 `apps/mobile/lib/upload.ts` (+6 -1) 📝 `apps/web/components/dashboard/UploadDropzone.tsx` (+7 -1) 📝 `apps/web/lib/hooks/useBookmarkImport.ts` (+1 -0) 📝 `apps/workers/workers/feedWorker.ts` (+1 -0) 📝 `packages/api/routes/bookmarks.ts` (+5 -1) ➕ `packages/db/drizzle/0063_add_bookmark_source.sql` (+1 -0) ➕ `packages/db/drizzle/meta/0063_snapshot.json` (+2496 -0) 📝 `packages/db/drizzle/meta/_journal.json` (+7 -0) 📝 `packages/db/schema.ts` (+12 -0) 📝 `packages/open-api/karakeep-openapi-spec.json` (+55 -0) 📝 `packages/shared/types/bookmarks.ts` (+14 -0) 📝 `packages/trpc/routers/bookmarks.ts` (+1 -0) </details> ### 📄 Description ## Summary - Add source field to bookmarks table to track creation source - Update all bookmark creation callsites to pass appropriate source value - Create database migration for schema change ## Test Plan - [ ] Run typecheck: `pnpm typecheck` - [ ] Run lint: `pnpm lint` - [ ] Regenerate migration metadata: `pnpm db:generate --name add_bookmark_source_field` - [ ] Test bookmark creation from each source (api, web, cli, mobile, singlefile, rss) - [ ] Verify source field is populated correctly in database Fixes #2036 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1957
No description provided.