diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4c078b8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Report a problem with Tab Group Sync +labels: bug +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## To reproduce +1. ... +2. ... +3. ... + +## Expected behavior +What you expected to happen. + +## Actual behavior +What actually happened. + +## Environment +- Chrome version: +- Extension version: +- OS: + +## Screenshots / logs +If applicable, attach screenshots or relevant console logs. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..9934e19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an enhancement +labels: enhancement +--- + +## Problem +What problem are you trying to solve? What is the use case? + +## Proposed solution +How would you like it to work? + +## Alternatives considered +Other approaches you thought about. + +## Additional context +Any other context, mockups, or examples. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3d4b6c2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## Summary + + +## Related spec / issue + + +## Changes +- +- + +## Test plan +- [ ] `npm test` passes +- [ ] `npm run test:e2e` passes (if UI or background changes) +- [ ] Manually loaded `dist/` in Chrome and verified affected flows + +## Checklist +- [ ] Spec updated (`requirements.md` / `design.md` / `tasks.md`) if scope changed +- [ ] `progress.txt` reflects task completion +- [ ] No personal data, secrets, or credentials added diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e660a24 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + + - name: Typecheck and build + run: npm run build + + - name: Unit and property tests + run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cce3f12 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + + - name: Build extension + run: npm run build + + - name: Verify tag matches manifest version + run: | + TAG_VERSION="${GITHUB_REF_NAME#v}" + MANIFEST_VERSION=$(node -p "require('./manifest.json').version") + if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then + echo "Tag version ($TAG_VERSION) does not match manifest.json version ($MANIFEST_VERSION)" + exit 1 + fi + + - name: Package dist as zip + run: | + cd dist + zip -r "../tab-group-sync-${GITHUB_REF_NAME}.zip" . + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: tab-group-sync-*.zip + generate_release_notes: true + draft: false + prerelease: false diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c8b82be --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project are documented here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project +adheres to [Semantic Versioning](https://semver.org/). + +## [Unreleased] + +## [1.2.0] + +### Added +- Move tab groups across windows with human-friendly window labels + (group names → active tab title/domain → generic fallback) +- Welcome page shown on first install +- Bundled privacy policy page +- Expanded in-app help dialog + +### Changed +- Service worker reliability improvements and move-aware sync guards +- Bounded history retention (ring buffer + age pruning) + +## [1.1.0] + +### Added +- Initial public feature set: automatic tab group backup to bookmarks, + cross-device sync via Chrome bookmark sync, snapshots, selective sync, + auto-sync, auto-cleanup, export/import. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9fa4343 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# Contributing + +Thanks for your interest in Tab Group Sync. This project follows a spec-driven development workflow. + +## Workflow + +1. **Find or file an issue** describing the problem or feature. +2. **Check the spec** under `.kiro/specs//`: + - `requirements.md` — system of record for what the feature does + - `design.md` — architecture, properties, pseudocode + - `tasks.md` — implementation tasks and status + - `progress.txt` — audit log of task completion +3. **Implement** against the spec. If scope changes, update the spec first. +4. **Test** — unit, property, and E2E tests are expected for non-trivial changes. +5. **Open a PR** using the template. + +## Development + +```bash +npm install +npm run build # build extension into dist/ +npm run watch # rebuild on change +npm test # unit + property tests +npm run test:e2e # E2E tests (builds first) +``` + +Load the unpacked extension from `dist/` via `chrome://extensions` → Developer mode. + +## Testing expectations + +- **Unit tests** (Vitest) for pure logic and edge cases +- **Property tests** (fast-check) for invariants — see `tests/property/PROPERTY_COVERAGE.md` +- **E2E tests** (Playwright) interact through the popup UI only — no internal API access + +## Release process + +Releases are driven by git tags: + +1. Bump `version` in `manifest.json` and `package.json` (must match). +2. Update `CHANGELOG.md`. +3. Merge to `main`. +4. Tag: `git tag v1.2.0 && git push origin v1.2.0` +5. The `release` workflow builds, packages `dist/` as a zip, and attaches it to a GitHub Release. +6. Upload the same zip to the Chrome Web Store. + +The release workflow verifies the tag version matches `manifest.json` and fails if they drift. + +## Code conventions + +See `.kiro/steering/` for product, tech, and structure guidelines. diff --git a/README.md b/README.md index 7a9f58f..a7afbf9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # Tab Group Sync +[![CI](https://github.com/kundeng/tabgroupsync/actions/workflows/ci.yml/badge.svg)](https://github.com/kundeng/tabgroupsync/actions/workflows/ci.yml) + A Chrome extension that automatically synchronizes tab groups with bookmark folders, enabling users to save and restore tab group layouts across devices and browser sessions. +## Install + +- **Releases**: download the latest `tab-group-sync-v*.zip` from [GitHub Releases](https://github.com/kundeng/tabgroupsync/releases), unzip, then load in Chrome via `chrome://extensions` → Developer mode → Load unpacked. +- **Chrome Web Store**: _coming soon_ + ## Features *(sourced from [requirements.md](.kiro/specs/tab-group-sync/requirements.md))* @@ -60,6 +67,10 @@ See [Property Coverage](tests/property/PROPERTY_COVERAGE.md) and [E2E README](te | [docs/TECHNICAL.md](docs/TECHNICAL.md) | Learning guide and technical reference | | [KNOWN_ISSUES.md](docs/KNOWN_ISSUES.md) | Known limitations and edge cases | +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for the spec-driven workflow and release process. + ## License MIT License