Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port spaces to ManifestV3 #47

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

alieonsido
Copy link

First of all, I want to express my deep gratitude for your incredible Spaces project. It has been invaluable during my time in university, at my research institute, and even now. That’s why I took the time to port it to Manifest V3.

This project is based on modifications to cspotcode/spaces, and it currently runs well on my Chrome setup. Most of the issues related to directly migrating Spaces to a service worker (I believe) have been resolved.

However, since I’m not a professional front-end engineer, much of this revision was implemented through trial and error with the help of Claude 3.5 Sonnet model in Cursor and GPT o1 model. As a result, some of the original code comments may have been lost, and you might find a mix of Mandarin Chinese comments here and there—please excuse that. m(_ _)m

I hope this revision contributes to the project’s development, and I’m genuinely looking forward to the day it’s re-released on the Chrome Web Store. Of course, I don’t expect any compensation for this (though it’d be great if you could credit cspotcode for the modifications XD—personally, I don’t need it). Your project and your contributions deserve all the recognition.

Once again, thank you so much for creating this amazing project and making it freely available for others to build upon. It’s truly fantastic.

cspotcode and others added 30 commits July 31, 2024 23:55
fix `screen` errors in background.js
fix favicon rendering
popup.js and spaces.js run as esm
try to fix error about creating duplicate context menu entries
shim so that background can alert() and window.confirm(), it is executed in the extension window instead
HACK delay rendering sidebar so it's synced with selected session
* Modify README for ManifestV3 & cspotcode's work.
* edit background.js and pop.js import path, and delete reduntant `node_module` path.
…ance session handling in background.js. Ensure pinned property is retained in session tabs, and add updateSessionWindowId method in spacesService. Log session creation details in dbService.
…dow focus handling. Remove redundant session retrieval code. Ensure spacesService.js ends with a newline for consistency.
The previous IIFE for adding the 'Add link to space...' context menu entry has been deleted, streamlining the code. This change simplifies the context menu management process because active space name still disappear randomly and goint to be `(unnamed window)`.
…us events. Refactor handleWindowFocussed to prevent overwriting user-defined session names and ensure proper session updates. Minor code cleanup for readability and consistency
…h for consistency. Remove obsolete context menu creation code in background.js and streamline session handling in spacesService.js.
… for improved clarity and functionality. Added comprehensive comments to describe the purpose and functionality of various methods and event listeners.

Improved session handling during tab and window events, ensuring better synchronization and state management. Cleaned up code for readability and consistency, while also addressing error handling in message passing.
…cus events. Updated comments for clarity, added checks to prevent overwriting session names, and ensured proper session updates with improved error handling. Streamlined queue processing for session updates.
… events. Improved handling of session updates, added checks to prevent overwriting user-defined session names, and streamlined history processing. Updated comments for clarity and consistency.
…dling of window removal and event processing, added checks for existing windows, and streamlined session updates. Updated comments for better clarity and consistency.
…dling. Enhanced logic for matching sessions to windows, ensuring proper handling of temporary and DB-saved sessions. Updated comments for clarity and streamlined session updates during window events. Improved error handling and queue processing for better performance.
…dling. Improved logic for matching sessions to windows, ensuring proper handling of temporary and DB-saved sessions. Streamlined session updates during window events and improved error handling. Updated comments for clarity and consistency throughout the code.
…management during window focus events. Removed the restriction on session ID checks, allowing for better handling of sessions without IDs. Enhanced logic for fetching and updating session names from the database, ensuring user-defined names are preserved. Streamlined error handling and queue processing for improved performance and reliability. Updated comments for clarity and consistency.
…econnection to existing database sessions when current sessions lack IDs and names. Improved logic for fetching matching sessions from the database using sessionHash, ensuring better handling of unnamed windows. Updated comments for clarity and to reflect the new flow of session handling.
…the logic for reconnecting to existing database sessions when current sessions lack IDs and names. Added functionality to search for matching sessions using sessionHash when no valid session is found. Updated comments for clarity and consistency, ensuring they accurately reflect the new session handling flow.
…ce.js. Improved the updateSpacesWindow function to gracefully handle cases where no listener is present for messages. Updated debug flag in spacesService.js to true for development purposes. Refined comments for clarity and consistency, ensuring they accurately describe the functionality and flow of session management and error handling processes.
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