Skip to content

V2 Changes#33

Open
breschio wants to merge 9 commits intomainfrom
v2
Open

V2 Changes#33
breschio wants to merge 9 commits intomainfrom
v2

Conversation

@breschio
Copy link
Copy Markdown
Owner

No description provided.

Terrence Breschi and others added 9 commits February 12, 2026 12:11
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
…heets

T03/T04 used chrome.tabs.query({ active: true }) which returned the side
panel page itself (opened as a new tab), not the demo page. Now queries
by URL (http://localhost:3456/*) to find the correct tab.

T05 skipped all sheets with href, but extension-injected CSS gets
chrome-extension://id/content.css as href. Now checks for that too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant