Skip to content

feat: persist saved searches for authenticated users - #44

Merged
arnabnandy7 merged 2 commits into
mainfrom
feature/persistSavedSearches
Aug 20, 2026
Merged

feat: persist saved searches for authenticated users#44
arnabnandy7 merged 2 commits into
mainfrom
feature/persistSavedSearches

Conversation

@arnabnandy7

Copy link
Copy Markdown
Owner

Summary

  • Preserve the existing local-storage saved-search experience for guests
  • Sync saved searches to Turso for authenticated users
  • Restore saved searches when local browser storage has been cleared
  • Remove saved searches from both Turso and local storage
  • Restrict database operations to the authenticated user
  • Add validation and graceful fallback when cloud synchronization fails
  • Add the saved_search database migration

Database changes

Adds a user-owned saved_search table containing:

  • Search name and filter values
  • Creation timestamp
  • User reference with cascading deletion
  • User ID index for efficient retrieval

Testing

  • Added API tests for authentication, validation, synchronization, and deletion
  • Added client tests for account restoration, synchronization failures, and deletion
  • Added local-storage replacement tests
  • All 56 tests pass
  • Coverage thresholds pass
  • Production build passes

Notes

Guest users do not need to sign in. Their saved searches continue to use local storage as before. Signing in provides cloud persistence and recovery across cleared browser storage.

Closes #43

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@arnabnandy7 arnabnandy7 added this to the 0.1.0 milestone Aug 20, 2026
@arnabnandy7 arnabnandy7 self-assigned this Aug 20, 2026
@arnabnandy7 arnabnandy7 added the enhancement New feature or request label Aug 20, 2026
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openissue-dev Ready Ready Preview Aug 20, 2026 2:47pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f12fae31cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/issues/components/issue-finder.tsx Outdated
Comment thread src/app/api/saved-searches/route.ts
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@sonarqubecloud

Copy link
Copy Markdown

@arnabnandy7
arnabnandy7 merged commit f8569f3 into main Aug 20, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Completed in Open issue portal development Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Persist saved searches for authenticated users

1 participant