Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/extension-lint-allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"code": "KEY_FIREFOX_ANDROID_UNSUPPORTED_BY_MIN_VERSION",
"file": "manifest.json",
"contains": "data_collection_permissions",
"reason": "data_collection_permissions needs Firefox for Android 142, while the desktop minimum is 140 (#43). Android support is decided with the AMO submission (#52); remove this entry then, by adding gecko_android.strict_min_version 142.0 or dropping Android."
"reason": "data_collection_permissions needs Firefox for Android 142, while the desktop minimum is 140 (#43). The AMO listing is desktop only (#52), so this has no effect; to support Android, add gecko_android.strict_min_version 142.0 and remove this entry."
}
]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
A productivity tool for saving, organizing, and listening to notes from any website: a browser extension for Chrome and Firefox for quick capture and playback, a web dashboard, and a Go API.

[![Chrome Web Store version](https://img.shields.io/chrome-web-store/v/lpnchhblldgnnjgmkbmanggilffhbnnp?label=Chrome%20Web%20Store)](https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp)
[![Firefox Add-ons version](https://img.shields.io/amo/v/tts-study-assistant?label=Firefox%20Add-ons)](https://addons.mozilla.org/firefox/addon/tts-study-assistant/)

**[Install the extension from the Chrome Web Store](https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp)** · [Open the web dashboard](https://tts-study-assistant.vercel.app)
**[Install for Chrome](https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp)** · **[Install for Firefox](https://addons.mozilla.org/firefox/addon/tts-study-assistant/)** · [Open the web dashboard](https://tts-study-assistant.vercel.app)

## Screenshots

Expand All @@ -22,7 +23,7 @@ A productivity tool for saving, organizing, and listening to notes from any webs
- `backend/` — Go/Fiber REST API: JWT auth, notes, AI summaries, user management
- `frontend/` — React + Vite + shadcn/ui web dashboard
- `extension/` — browser extension (Chrome and Firefox) for saving and listening to notes from any site
- `docs/screenshots/` — README and Chrome Web Store screenshots (1280×800)
- `docs/screenshots/` — README and store listing screenshots (1280×800)

## Quick start

Expand Down
12 changes: 7 additions & 5 deletions extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ Save text from any page as a note, listen to it, and get AI summaries. Plain Man

**[TTS Study Assistant on the Chrome Web Store](https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp)**: click *Add to Chrome*. Installed copies update automatically when a new version is published.

## Install from Firefox Add-ons

**[TTS Study Assistant on Firefox Add-ons](https://addons.mozilla.org/firefox/addon/tts-study-assistant/)**: click *Add to Firefox* (desktop, Firefox 140 or later). Installed copies update automatically when a new version is approved.

## Install unpacked (development)

1. Open `chrome://extensions`, enable **Developer mode**.
2. **Load unpacked** → select this `extension/` folder.
3. After changing files, press the reload icon on the extension card (and reopen the popup).

### Firefox (in progress)

Firefox support is tracked in the [Firefox release (AMO) milestone](https://github.com/pratts/tts-study-assistant/milestone/1).
### Firefox

```sh
cd extension
Expand All @@ -28,7 +30,7 @@ One `manifest.json` serves both browsers:

- **Background:** Chrome uses `background.service_worker`; Firefox doesn't support extension service workers and uses `background.scripts` (an event page) with the same file. Chrome 121+ ignores `scripts`, hence `minimum_chrome_version: 121`.
- **`browser_specific_settings.gecko`:** the add-on ID (permanent once uploaded to addons.mozilla.org), the minimum Firefox version (140, the first with `data_collection_permissions`) and the data the extension sends to the backend. Chrome ignores this key.
- **Expected lint warnings:** Firefox doesn't know the `tts` permission and ignores `background.service_worker`; `data_collection_permissions` needs Firefox for Android 142 (Android support is decided in #52). They're listed, with reasons, in [`.github/scripts/extension-lint-allowlist.json`](../.github/scripts/extension-lint-allowlist.json).
- **Expected lint warnings:** Firefox doesn't know the `tts` permission and ignores `background.service_worker`; `data_collection_permissions` needs Firefox for Android 142 (the AMO listing is desktop only, #52). They're listed, with reasons, in [`.github/scripts/extension-lint-allowlist.json`](../.github/scripts/extension-lint-allowlist.json).
- **Expected Chrome warning:** `chrome://extensions` shows "'background.scripts' requires manifest version of 2 or lower". Chrome ignores the key and runs the service worker; it's the price of one manifest for both browsers. If the Chrome Web Store ever rejects it, the release can write a manifest per browser instead (#50).

## Configuration
Expand Down Expand Up @@ -124,7 +126,7 @@ One zip serves both stores (one `manifest.json`; each browser ignores the other'

### addons.mozilla.org

**First version (by hand, once):** the listing needs details only the web form takes.
**First version (by hand, once; done with v0.3.5):** the listing needs details only the web form takes.
1. Sign in at the [AMO Developer Hub](https://addons.mozilla.org/developers/) → *Submit a New Add-on* → *On this site* (listed).
2. Upload the release zip. The add-on ID comes from `browser_specific_settings.gecko.id` and can't change afterwards.
3. Fill in the listing: name, summary, description, categories, the privacy policy URL (`https://tts-study-assistant.vercel.app/privacy-policy`), screenshots and support email.
Expand Down
21 changes: 20 additions & 1 deletion frontend/src/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BookOpenIcon, ExternalLinkIcon, LayoutDashboardIcon, NotebookTextIcon, ShieldIcon, UserIcon } from 'lucide-react'
import { BookOpenIcon, ExternalLinkIcon, LayoutDashboardIcon, NotebookTextIcon, PuzzleIcon, ShieldIcon, UserIcon } from 'lucide-react'
import type { ComponentProps } from 'react'
import { Link, NavLink, useLocation } from 'react-router'
import { NavUser } from '@/components/nav-user'
Expand All @@ -7,12 +7,14 @@ import {
SidebarContent,
SidebarFooter,
SidebarGroup,
SidebarGroupLabel,
SidebarHeader,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarRail,
} from '@/components/ui/sidebar'
import { EXTENSION_STORES } from '@/lib/stores'

const NAV = [
{ title: 'Dashboard', to: '/dashboard', icon: LayoutDashboardIcon },
Expand Down Expand Up @@ -63,6 +65,23 @@ export function AppSidebar(props: ComponentProps<typeof Sidebar>) {
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroup>
<SidebarGroup className="mt-auto">
<SidebarGroupLabel>Get the extension</SidebarGroupLabel>
<SidebarMenu>
{EXTENSION_STORES.map(({ title, href }) => (
<SidebarMenuItem key={href}>
<SidebarMenuButton asChild tooltip={title}>
<a href={href} target="_blank" rel="noopener noreferrer">
<PuzzleIcon />
<span>{title}</span>
<ExternalLinkIcon className="ml-auto" aria-hidden />
<span className="sr-only">(opens in a new tab)</span>
</a>
</SidebarMenuButton>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroup>
</SidebarContent>
<SidebarFooter>
<NavUser />
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/lib/stores.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Where to install the browser extension. The Firefox link has no locale, so
// addons.mozilla.org picks the visitor's language.
export const EXTENSION_STORES = [
{
title: 'Chrome Web Store',
href: 'https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp',
},
{ title: 'Firefox Add-ons', href: 'https://addons.mozilla.org/firefox/addon/tts-study-assistant/' },
] as const
11 changes: 11 additions & 0 deletions frontend/src/pages/dashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ describe('dashboard page', () => {
expect(screen.getByText('alice@example.com')).toBeInTheDocument() // sidebar user
})

it.each([
[/Chrome Web Store/, 'https://chromewebstore.google.com/detail/tts-study-assistant/lpnchhblldgnnjgmkbmanggilffhbnnp'],
[/Firefox Add-ons/, 'https://addons.mozilla.org/firefox/addon/tts-study-assistant/'],
])('links to the extension store %s in a new tab', async (name, href) => {
renderApp('/dashboard')
const link = await screen.findByRole('link', { name })
expect(link).toHaveAttribute('href', href)
expect(link).toHaveAttribute('target', '_blank')
expect(link).toHaveAttribute('rel', 'noopener noreferrer')
})

it('shows empty states without notes', async () => {
renderApp('/dashboard')
expect(await screen.findByText('No notes yet')).toBeInTheDocument()
Expand Down