Skip to content

Serverless2 - #12

Merged
patrickiel merged 26 commits into
mainfrom
serverless2
Sep 8, 2026
Merged

patrickiel merged 26 commits into
mainfrom
serverless2

Conversation

@patrickiel

Copy link
Copy Markdown
Owner

What changes, and what a user notices

How it was tested

  • Tried it in a real browser (pnpm dev)
  • node e2e/run.mjs — required if this touches the DSP or the connection
    state machine. The suite is not all-green; compare against a clean
    checkout rather than assuming your change caused a failure.
  • Firefox, if the change is anything but panel-internal
  • Worklet bundles rebuilt, if a *.worklet.ts or center-cut-dsp.ts changed

Anything you are unsure about

- Removed unused constants and types from backup.ts, simplifying the backup structure.
- Integrated compact backup encoding in SettingsView for more efficient storage.
- Added fit.ts and fit.test.ts to manage backup size constraints, ensuring that backups fit within browser sync limits.
- Implemented logic to prioritize retention of recent songs, charts, and favorites when trimming backups.
- Enhanced test coverage for fitBackup functionality, validating behavior under various library sizes.
- Deleted the server sync backend implementation in index.ts, including all related logic for handling backup snapshots.
- Removed pnpm workspace configuration file as it is no longer needed.
- Eliminated TypeScript configuration file for the server as the project structure has changed.
- Cleared out wrangler configuration file, which defined the sync worker settings and rate limits.
- Removed sync endpoint definitions and related utility functions from the sync feature module.
- Deleted API functions for pulling, pushing, and deleting snapshots from the sync server.
- Removed hash generation and cookie management for sync ID, ensuring no remnants of the sync functionality remain.
- Cleaned up sync host definitions to prevent any references to the now-removed sync backend.
- Updated tsconfig.json to remove the exclusion of the server directory.
- Modified wxt.config.ts to improve comments and remove unused imports.
- Added deletions.ts to manage deletion records for syncing.
- Introduced hash.ts for content hashing of backups.
- Created merge.test.ts to validate backup merging logic.
- Implemented merge.ts to handle merging of local and remote backups.
- Developed sync-area.ts for managing sync storage interactions.
- Added sync-blob.test.ts to test blob packing and unpacking functionality.
- Created sync-blob.ts to define the structure and methods for handling backup blobs in sync storage.
@patrickiel patrickiel linked an issue Sep 6, 2026 that may be closed by this pull request
- Deleted the clearDeletion function from storage.ts, which was responsible for forgetting deletions of items.
- Updated saveEqPreset and addFavorite functions to remove calls to clearDeletion, ensuring that deletion records are no longer cleared when items are recreated.
- Adjusted sync.svelte.ts to improve the handling of sync state and configuration, including the removal of unnecessary state variables and timers.
- Refactored the fit.ts file to streamline the backup fitting process, replacing the previous tiered approach with a more efficient cut-based method.
- Enhanced merge.ts to utilize a unionNewest function for merging history, favorites, and tracks, improving clarity and maintainability.
- Simplified sync-area.ts by removing unnecessary checks and consolidating event listeners.
- Updated sync-blob.ts to remove the chars property from the PackedBlob interface, as it was no longer needed.
- Refined sync-config.ts to improve the loading of sync configuration, ensuring legacy fields are handled appropriately without retaining unnecessary data.
…ocess

- Updated the merge function to improve the handling of history and favorites, ensuring that the most recent entries are prioritized and tombstones are properly pruned.
- Simplified the union logic for merging backups, focusing on the latest updates and resolving conflicts based on timestamps and content.
- Removed the lastChangedAt field from SyncConfig as it was deemed unnecessary for the current sync logic.
- Enhanced the alignment of parameters between history and favorites to ensure consistency across devices.
…vation

- Updated track identity logic to use songKey, which combines normalized URL and title, ensuring consistent key generation across the application.
- Removed legacy key handling that included duration, as it is now treated as metadata.
- Implemented storage migration to rekey existing track data to the new format.
- Adjusted backup codec and sync logic to align with the new identity structure.
- Updated tests to reflect changes in identity handling and ensure correct functionality with the new keying system.
- Simplified SyncConfig interface by removing unused properties and adding lastPushAt, usedBytes, and syncing.
- Updated DEFAULT_SYNC_CONFIG to reflect changes in SyncConfig.
- Improved loadSyncConfig function for better readability and performance.
- Added legacy backup support with a new legacy-backup.ts file for handling previous backup formats.
- Implemented library background synchronization with library-client and library-migration modules.
- Introduced library persistence with a new library.ts file to manage shared and local library data.
- Enhanced sync records management with new records.ts file for handling sync data and quota management.
- Added alarms for library synchronization and safety checks.
- Updated wxt.config.ts to include 'alarms' permission for background tasks.
- Deleted the sync blob handling logic including packing, unpacking, and reading/writing to the sync area.
- Removed associated tests for the sync blob functionality.
- Cleaned up the merge logic by eliminating the now-unnecessary dependencies on sync area and blob management.
- Introduced a PUSH_INTERVAL constant to manage synchronization timing.
- Simplified migration logic by removing unnecessary settings defaults.
- Enhanced sync configuration handling with defaults for missing fields.
- Improved handling of shared library records, ensuring proper entry definitions.
- Updated sync logic to track used bytes and handle quota limits more effectively.
- Refactored session management to streamline media handling.
- Modularized favorites and history management into separate files for better organization.
- Adjusted tests to reflect changes in migration and backup handling.
- Updated documentation to clarify sync behavior and data handling.
- Introduced LibraryStore to manage library state and initialization.
- Updated track-sync to handle practice parameters correctly.
- Refactored local-player to apply theme settings from the library.
- Enhanced sidepanel to initialize library state and settings.
- Removed deprecated chords panel and related code.
- Simplified EQ presets management by leveraging library state.
- Updated favorites and history features to use new library state.
- Removed old library panel and related feature code.
- Refactored settings management to utilize library state.
- Improved sync records handling and added snapshot validation.
- Updated privacy policy to reflect changes in sync data handling.
- Add `recoverLegacyStorage` function to salvage legacy data while retaining original records.
- Create tests for recovery scenarios, ensuring unrelated saved work is preserved.
- Introduce `LibraryRecovery` component for user interaction during recovery failures.
- Enhance `applyCommand` to reject edits from sessions opened before a replacement import.
- Update settings and sync logic to handle import revisions and prevent stale edits.
- Modify sync configuration to support incomplete chunks and recover lost headers.
- Implement export and import functionality for recovery data in `LibraryRecovery` component.
- Update `startLibraryBackground` to set `lastSyncedAt` on adopting new shared state.
- Modify `editLibrary` to return the updated timestamp after editing.
- Add tests for migrating URL aliases and ensuring correct handling of library edits.
- Refactor `rekey` logic to improve identity handling for YouTube URLs.
- Improve connection management in `connect.svelte` to handle connection failures gracefully.
- Enhance session management in `session.svelte` to restore playback state without triggering edits.
- Update `track-sync` to better manage practice edits and parameter changes.
- Improve recovery UI messaging for clarity on data export and recovery options.
@patrickiel
patrickiel merged commit 96f1244 into main Sep 8, 2026
1 check passed
@patrickiel
patrickiel deleted the serverless2 branch September 8, 2026 19:04
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.

Replace Cloudflare KV sync with browser storage.sync

1 participant