Skip to content

Conversation

@microbit-robert
Copy link

@microbit-robert microbit-robert commented Jan 8, 2026

Migrates storage from localStorage to IndexedDB and allows the storage of multiple projects using the multipleProjects flag. This draft PR replaces both #639 and #644; review comments on these previous versions should have been addressed.

TODO:

  • Review basic loading fallback page / component
  • Implement sensible response to storage error
  • UI design / changes
    • Consider project cards (date and id are for debugging purposes at the moment / image / icons), capturing the project name upfront
    • Project management page to view and delete projects
    • Should importing data from the data page give you a choice to create a new project or append or replace actions in existing project?
  • Manual testing
  • Work out why e2e test was failing (commented out for now - it relates to the resume session button which is probably going away, but nice to understand why it was failing). Update: the previous project name 'untitled' was appearing in two places on the new page. Made this test more specific.
  • Add e2e tests
  • Ensure e2e tests run with multipleProjects flag
  • Review solution to multiple MakeCode instances (only allow one to be open across multiple tabs / windows at any one time)

Hopefully having this as a separate commit can make the diff
easier to read.
Provide default values for project data and settings
Remove methods that are now unused.
Add new createdAt field used to sort actions and recordings when
loaded from IndexedDB.
Can't use the migration function that creates uuids as the snapshot
is different for every run.
Everything that updates multiple stores is now a transaction.
Assert data loaded from storage.
Update project 'updatedAt' when appropriate
This option is probably going away.
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Preview build will be at

Single project storage:
https://review-createai.microbit.org/multiple-storage-flagged/

Multiple project storage (you will need to set flags in localStorage to test page refreshing):
https://review-createai.microbit.org/multiple-storage-flagged/?flag=multipleProjects

Move broadcast channel listener to navigate in response.
Update projects on new / listing page when edits are made.
Clear state when current project is deleted from another tab.
Don't broadcast changes unnecessarily.
If there is no project id in session storage:
Redirect to the home page for multiple projects.
Redirect to the data page for a single project (and create new
project).
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