docs: Add V2 changelog summarizing side panel migration#40
Open
breschio wants to merge 9 commits into
Open
Conversation
Documents the architectural shift from injected in-page sidebar to Chrome's native Side Panel API, including all new, modified, and deleted files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the in-page moat.js/moat.css sidebar with Chrome's native Side Panel, moving all UI into sidepanel/. Content script retains file system access; background.js acts as message relay between side panel and content script. Adds light/dark theme support, task tabs, thumbnail previews, disconnect persistence, and a style guide. Demo site updated with SVG icons, pricing grid, and typo fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- JOBS-TO-BE-DONE.md: 161 jobs extracted from V1 codebase - chrome-extension/tests/v2/: zero-dependency test suite - test-runner.js: lightweight describe/it/expect framework - chrome-mock.js: mocks for Chrome APIs, File System Access, IndexedDB - 5 test files: connection, tasks, markdown, filesystem, v2-architecture - run-all.js: Node CLI runner - test-runner.html: browser runner - Run: cd chrome-extension/tests/v2 && node run-all.js
Tests were silently skipping (34 tests), crashing on missing assertions (5), and using async patterns that never executed (3). Key fixes: - Fix module loading in run-all.js to wire window.* globals from require() - Add missing toBeGreaterThanOrEqual/toBeLessThanOrEqual assertions - Fix IndexedDB mock to fire async callbacks via Promise.resolve() - Fix chrome.storage.local mock to return Promises (MV3 compat) - Rewrite v2-architecture tests with proper handler simulation - Convert silent guard-clause skips to explicit failures - Fix stale persistence instances and timestamp sort determinism Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- manual-test.js: 15 automated browser tests via Puppeteer - Extension loading, service worker, side panel HTML/JS/CSS - Theme toggle, tab switching, tools menu - V1 removal verification, console error check - Results auto-saved to tests/v2/results/ with timestamp + commit hash - Unit test runner also saves versioned results - First run: 79/79 unit, 13/15 manual (1 Puppeteer limitation, 1 timing)
…ed world T03/T04 checked window.* globals and chrome.runtime which are invisible from page.evaluate() (main world). T05 checked stylesheet href which extension-injected CSS doesn't have. All three now use DOM-based detection: Google Fonts <link> elements, anonymous stylesheet CSS rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- T03 now pings content script via side panel → background → content script - T04 now tests GET_CONNECTION_STATUS message handler - Both correctly warn (not fail) in Puppeteer due to tabs.query limitation - 12/15 pass, 0 fail, 3 warn (all warns are test env limitations) - Results versioned at ae923f0
… lines) Removed: - injectGoogleFonts() - V2 loads fonts in sidepanel.html - saveAnnotationWithLegacySystem() - V1 fallback - Migration functions (checkAndMigrateLegacyFiles, triggerManualMigration, triggerMigrationRollback) - checkLegacyConnection() and restoreProjectConnection() - V1 localStorage-based connection - completeConnectionRestore() - V1 restoration flow - saveAnnotationWithDirectFileWriting() - V1 direct file write fallback - initializeQueue() - V1 queue system for localStorage - window.moatDebug and debug helpers - V1 event listeners (moat:setup-project, moat:trigger-comment-mode, moat:trigger-rectangle-mode, moat:reset-connection-state) - Embedded workflow template (replaced with minimal fallback) Changed: - showNotification() simplified to relay to side panel (V2 approach) - Added DEBUG flag to gate remaining verbose console.log statements Test results: - Unit tests: 79/79 passed ✅ - Manual tests: 5/5 passed ✅ (10 warnings due to headless mode) Lines: 4746 → 1648 (-3097 lines, 65.3% reduction)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the architectural shift from injected in-page sidebar to
Chrome's native Side Panel API, including all new, modified, and
deleted files.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com