Skip to content

fix(web-console): remove indexed db backwards/forwards compatibility issue#467

Merged
emrberk merged 6 commits intomainfrom
fix/schema-compatibility-issue
Aug 28, 2025
Merged

fix(web-console): remove indexed db backwards/forwards compatibility issue#467
emrberk merged 6 commits intomainfrom
fix/schema-compatibility-issue

Conversation

@emrberk
Copy link
Copy Markdown
Collaborator

@emrberk emrberk commented Aug 27, 2025

Web console introduced db version 4. After upgrading db to version 4, it is not possible to open the web console with older QuestDB versions as Dexie cannot ensure forwards compatibility. As we don't have any control in older version of the web console, best option seems to downgrade the db version as it's not been used by any QuestDB version yet.

  • Updated dexie to 4.2.0, which eliminates compatibility issues. Once most of the users upgrades web console >= 1.1.1, we will not face similar issues
  • Bumped version of dexie-react-hooks
  • Repositioning/reordering now uses bulk updates in the db, eliminating race conditions
  • Temporary tab tracking is done in component state

@emrberk emrberk requested a review from Copilot August 27, 2025 15:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes IndexedDB backwards/forwards compatibility issues by removing the isTemporary field from the database schema and managing temporary buffer state in memory instead. The changes also upgrade Dexie from v3 to v4 and update the import syntax accordingly.

  • Removes isTemporary field from database schema and version 4 store definition
  • Manages temporary buffer state in React state instead of persisting to IndexedDB
  • Updates Dexie import syntax and upgrades to version 4.0.11

Reviewed Changes

Copilot reviewed 8 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/web-console/src/store/db.ts Removes version 4 store definition and updates Dexie import syntax
packages/web-console/src/store/buffers.ts Removes isTemporary field from buffer metadata retrieval
packages/web-console/src/scenes/Search/SearchResults.tsx Updates DOM selector for Monaco editor content
packages/web-console/src/scenes/Search/SearchPanel.tsx Removes isTemporary field from search result metadata
packages/web-console/src/scenes/Editor/Monaco/tabs.tsx Updates tab sorting logic to handle temporary buffers in memory
packages/web-console/src/scenes/Editor/Monaco/index.tsx Adds CSS class for better DOM targeting
packages/web-console/src/providers/EditorProvider/index.tsx Major refactor to manage temporary buffer state in memory instead of database
packages/web-console/package.json Upgrades Dexie from v3.2.4 to v4.0.11
Files not reviewed (1)
  • .pnp.cjs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@emrberk emrberk merged commit 7bba683 into main Aug 28, 2025
4 of 5 checks passed
@emrberk emrberk deleted the fix/schema-compatibility-issue branch August 28, 2025 20:16
Vaibhav91one pushed a commit to Vaibhav91one/ui that referenced this pull request Oct 28, 2025
…issue (questdb#467)

* chore(web-console): bump dexie version to 4.2.0

* fix(web-console): return to schema version 3 by changing temporary tab handling

* address review

* bulk update tab positions, fix tab dragging bug, bump dexie-react-hooks version

* disable tab events when a temporary tab is open
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.

3 participants