Skip to content

feat: add search history export as JSON#3

Open
avatGit wants to merge 1 commit intoBlackRoadOS:mainfrom
avatGit:feature/export-history-json
Open

feat: add search history export as JSON#3
avatGit wants to merge 1 commit intoBlackRoadOS:mainfrom
avatGit:feature/export-history-json

Conversation

@avatGit
Copy link
Copy Markdown

@avatGit avatGit commented Mar 30, 2026

Description

Adds a client-side button to export search history from localStorage as a JSON file.

Changes

  • Added exportHistory() function to download localStorage history as JSON
  • Added "Export JSON" button next to "Clear all" in the history UI
  • Added D1 database binding in wrangler.toml for local development

Testing

  1. Run npx wrangler dev
  2. Perform 2-3 searches (e.g., "agents", "pricing")
  3. Return to home page
  4. Click "Export JSON" button
  5. Verify downloaded file contains valid JSON array: ["agents", "pricing"]

Closes #2

- Add exportHistory() function to download localStorage history
- Add Export JSON button in renderHistory() UI
- Configure D1 binding in wrangler.toml for local dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add search history export as JSON

1 participant