-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the Bug
When I save a new bookmark (from the browser extension or the web UI) and sort by "Newest first", the new bookmark does not appear at the top.
Refreshing the page does not fix it.
After debugging my self-hosted instance I found that some bookmarks are stored with createdAt in Unix seconds instead of milliseconds.
Example value stored:
1773238339
Correct millisecond timestamp example:
1773238379976
Because of this, bookmarks created with seconds timestamps sort far below the normal millisecond timestamps.
Database query used to confirm:
select id,title,createdAt
from bookmarks
order by createdAt desc;
I suspect the issue may be related to timestamp handling in:
packages/db/schema.ts
packages/shared/types/bookmarks.ts
Changing timestamp mode from timestamp to timestamp_ms appears to fix it.
Environment:
Self-hosted Karakeep (Docker)
Steps to Reproduce
- Save a new bookmark from the browser extension or web UI.
- Open the bookmarks page.
- Sort bookmarks by Newest first.
- The newly created bookmark does not appear at the top.
- Refreshing the page does not change the order.
Expected Behaviour
When a new bookmark is saved, it should appear at the top when sorting by Newest first.
Screenshots or Additional Context
No response
Device Details
No response
Exact Karakeep Version
Latest Docker image (ghcr.io/karakeep-app/karakeep:latest)
Environment Details
Docker
Debug Logs
No response
Have you checked the troubleshooting guide?
- I have checked the troubleshooting guide and I haven't found a solution to my problem