Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Plan for Adding Custom Data Storage to Hyperbook Store

  • Add custom table to Dexie database in packages/markdown/assets/store.js with schema: "id, payload"
  • Update export/import functions to handle custom table data (already handled automatically by existing export/import)
  • Add documentation to English advanced section (website/en/book/advanced/custom-scripts.md)
  • Add documentation to German advanced section (website/de/book/advanced/custom-scripts.md)
  • Include JSON data storage example in documentation
  • Build and test the changes to ensure everything works correctly
  • Add changeset and update versions/CHANGELOGs

Implementation Complete

The custom data storage feature has been successfully added to Hyperbook with proper versioning:

Code Changes

  1. Database schema: Added custom: 'id,payload' table to packages/markdown/assets/store.js
  2. Export/Import: Custom data is automatically included in the existing hyperbookExport() and hyperbookImport() functions
  3. Documentation: Added comprehensive documentation in both English and German versions of the custom-scripts.md file, including:
    • Overview of the Hyperbook Store API
    • Custom data table schema explanation
    • Examples of saving data with store.custom.put()
    • Examples of retrieving data with store.custom.get()
    • Complete working example with initialization and persistence
    • Note about automatic export/import support

Version Updates

  • @hyperbook/markdown: 0.39.0 → 0.40.0
  • hyperbook: 0.65.0 → 0.66.0
  • hyperbook-studio: 0.41.0 → 0.42.0

Changelog Updates

  • Added changeset file .changeset/custom-data-store.md
  • Updated CHANGELOG.md for @hyperbook/markdown, hyperbook, and hyperbook-studio
  • Updated website changelog at website/en/book/changelog.md with v0.66.0 entry

All tests pass and the website builds successfully with the new feature.

Original prompt

A user should be able to hook into the hyperbook store and store and retrieve custom data. Therefore you should add a dexie table for custom with: "id, payload". Also add documentation in the advance section for scripts and mention that you can use this api to save and restore data. Also add an example on how to use this api with json data.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Nov 12, 2025

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

Project Deployment Preview Comments Updated (UTC)
hyperbook-4fwa Ready Ready Preview Comment Nov 12, 2025 9:22am

Copilot AI changed the title [WIP] Add dexie table for custom data storage Add custom data table to Dexie store for user-managed state persistence Nov 12, 2025
Copilot AI requested a review from mikebarkmin November 12, 2025 09:10
Copilot finished work on behalf of mikebarkmin November 12, 2025 09:10
@mikebarkmin
Copy link
Member

@copilot Update the versions of markdown, hyperbook and hyperbook-studio, add a changeset and update the changelog.md. Be sure to use the correct version. I might have missed documenting the last ones.

@mikebarkmin mikebarkmin marked this pull request as ready for review November 12, 2025 09:20
- Bump @hyperbook/markdown to 0.40.0
- Bump hyperbook to 0.66.0
- Bump hyperbook-studio to 0.42.0
- Add changeset file for custom data store feature
- Update CHANGELOG.md files for all affected packages
- Update website changelog with v0.66.0 entry

Co-authored-by: mikebarkmin <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 12, 2025

@copilot Update the versions of markdown, hyperbook and hyperbook-studio, add a changeset and update the changelog.md. Be sure to use the correct version. I might have missed documenting the last ones...

Done! Updated versions and added changeset (commit 4c4375c):

Version bumps:

  • @hyperbook/markdown: 0.39.0 → 0.40.0
  • hyperbook: 0.65.0 → 0.66.0
  • hyperbook-studio: 0.41.0 → 0.42.0

Files updated:

  • Added .changeset/custom-data-store.md
  • Updated CHANGELOG.md for markdown, hyperbook, and hyperbook-studio packages
  • Updated website/en/book/changelog.md with v0.66.0 entry

All builds and tests pass.

Copilot finished work on behalf of mikebarkmin November 12, 2025 09:22
@mikebarkmin mikebarkmin merged commit c4fddb6 into main Nov 12, 2025
2 checks passed
@mikebarkmin mikebarkmin deleted the copilot/add-dexie-table-custom-data branch November 12, 2025 09:22
@github-actions github-actions bot mentioned this pull request Nov 12, 2025
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.

2 participants