Commit Graph
12 Commits
Author SHA1 Message Date
golemandClaude Opus 5.5 8679267d53 chore: prepare the 1.3.0 release
Version 1.3.0 (manifest "1.3"): the options page rewrite adds features
without breaking changes, and addons.mozilla.org needs a version above
the live 1.2. The lockfile's root version moves with it. Unreleased
becomes the 1.3.0 section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:01:51 -06:00
golem ff61aff5b9 feat: rewrite the options page for first-time users (#23)
Rewrites the options page for first-time users without removing any setting. Customization in a lightweight package is what sets this extension apart. Design: `docs/superpowers/specs/2026-10-18-options-page-for-first-time-users-design.md`.

**User-visible changes**
- **Layout:** the description stays as the first line, followed by a **Usage instructions** section and the **Settings** section. Each section has a heading and a divider.
- **Usage instructions:** one labelled line per way to open ChatGPT, each with a small drawing:
  - **Address bar:** `<Ctrl>+L`, then `gpt`, a space and the question. The drawing shows a ChatGPT label because the address-bar code shipped in Firefox 157.0.1 enters search mode when an engine keyword is followed by a space. I checked that in its `omni.ja`, but it still needs confirming on screen; see the checks below.
  - **Right-click:** a drawing of the menu with Ask ChatGPT highlighted.
  - **Keyboard:** key caps for the user's actual shortcut, held down. The line is hidden when no shortcut is set.
  - **Toolbar:** the hovered button with the pointer, its tooltip, the puzzle-piece Extensions button, and a selected heading.
- **Drawings:** they are HTML/CSS and inline SVG, not screenshots, so they follow light and dark themes, stay sharp, and never go stale. They are centred. The package grows from 52.8 KB to 56.5 KB.
- **Settings:**
  - **Right-click menu** (was "Context menu") and **Open ChatGPT in** stay visible.
  - Choosing **Advanced** reveals a drawing of the Ask ChatGPT submenu (Ask normally, Explain, Summarize, Debug code). It lives in the block that only shows for Advanced, so it needs no script.
  - Prompt template, temporary chat and web search move under **More options**, whose heading names them. It opens by itself on load, or when a sync changes one of them, if one of them isn't at its default.
  - **Restore defaults** is right-aligned and red.
- **Bottom of the page:**
  - The keyword/default-engine and keyboard-shortcut notes become collapsed sections with numbered steps.
  - The project links are centred, and stack on narrow panels.
- **Hotkeys:** written as `<Ctrl>+L` and `<Alt>+<Shift>+G`, including the user's actual shortcut. Mac users see `<Cmd>`, `<Option>` and `<Return>`, detected with `runtime.getPlatformInfo`, which needs no permission.
- **Docs:**
  - Keyword wording is corrected in the options page and README: Firefox adds a custom keyword alongside `gpt` instead of replacing it.
  - README and AGENTS.md use the new setting names.
  - AGENTS.md records the keep-every-setting rule, the hotkey format and the "filled in, never sent" copy rule.

These still match the original options design spec: the temporary-chat and web-search wording, and the rule that copy never says the question is sent.

No permission, search URL, privacy or packaging changes.

**Checks**
- `npm test`: lint 0 errors / 0 warnings, 61/61 unit tests, build OK.
- New tests:
  - the key formatter, including the Mac names Firefox stores (Command, MacCtrl, Alt)
  - the page's written hotkeys match the formatter
  - the keyboard drawing's key caps follow the live shortcut
- Rendered in headless Firefox 157 with the extension APIs stubbed:
  - light and dark themes
  - 680 px and 360 px wide
  - Mac key names
  - More options opening for a customised prompt template
  - both bottom sections expanded

**Manual Firefox checks (`npm run dev` → about:addons → Preferences)**
- [x] Typing `gpt` and a space shows a ChatGPT label in the address bar, as drawn. If it doesn't, the drawing drops the label and shows plain `gpt how do magnets work?`
- [x] Light and dark themes, and a narrow about:addons width
- [x] Expanding More options and the two bottom sections grows the inline panel without clipping or scrolling
- [x] The Keyboard line and its key caps disappear when the shortcut is removed, and come back showing the new keys when one is set
- [x] More options opens by itself after changing the prompt template and reopening the page
- [x] Choosing Advanced shows the submenu drawing; Simple and Off hide it
- [x] Settings still save, and Restore defaults still works

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension/pulls/23
Co-authored-by: golem <golem@zavage.net>
2026-10-18 22:53:27 -06:00
golemandClaude Opus 5.5 1866846d3b doc: shorten the bundled icon changelog entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:00:09 -06:00
golemandClaude Opus 5.5 82fdf88b80 fix: use the bundled search engine icon
The search provider's favicon_url pointed at zavage-software.com, so Firefox
downloaded the icon from our server whenever it installed or updated the
engine. That contradicted the privacy policy's "Nothing is reported to Zavage
Software", would break if the site moved, and blocks a future MV3 move, which
requires a packaged favicon.

Without favicon_url, Firefox uses the manifest icons instead
(AddonSearchEngine#initFromManifest). The remote file was byte-identical to
icons/powered-by-openai-icon-48x48.png, so the artwork is unchanged.

Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 09:58:16 -06:00
golem cf5e397d53 Merge remote-tracking branch 'origin/develop' into chore/release-1.2.0 2026-10-18 02:36:50 -06:00
golemandClaude Opus 5.5 8052c87c23 chore: prepare the 1.2.0 release
Version 1.2.0 (manifest "1.2"): the release adds features without
breaking changes, and 1.1.0 already exists in the changelog. The
lockfile's root version, still 1.0.0, moves with it.

Turn Unreleased into the 1.2.0 section, fold in the unheaded bullets
beneath it, add the template-limit entry, note that 1.1.0 never reached
addons.mozilla.org, and fix the stray ")" in the 1.0.0 heading. The
manifest description now covers the menu, toolbar button and shortcut.

Record in the design spec that ChatGPT auto-submits ?q= prompts again as
of 2026-10-18, and what that means for Appendix B's selection-smuggling
argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 02:27:54 -06:00
golemandClaude Opus 5.5 519131c21f fix: cap huge selections before shortening
The shortcut and toolbar read window.getSelection() without a limit, so a
select-all on a very large page handed prepareAction millions of
characters. Every binary-search probe re-encoded the whole candidate
prefix: about 1.1 s for 5M characters, paid again by the dialog.

Each code point adds at least one character to the URL, so nothing past
the first MAX_URL_CHARS can fit. Cap there before any encoding. A capped
source never takes the ready path: renderPrompt trims, so a prefix of
mostly whitespace could fit and silently drop the rest without consent.

Output is unchanged: 2,000 random cases matched develop exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 01:32:22 -06:00
golemandClaude Opus 5.5 282eeab83d doc: surface the sign-in and send hint
ChatGPT can require signing in, and it does not always send a prefilled
prompt. The README and options panel mentioned pressing Enter only in
passing. Give both a prominent note covering sign-in and Enter or Send,
and drop the inline mentions it replaces.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 22:29:55 -06:00
golem 78e94640e1 feat: add Ask ChatGPT toolbar action 2026-10-12 12:51:24 -06:00
golem 5308932bf1 feat: add advanced context actions and optional translation 2026-10-05 15:38:16 -06:00
golemandClaude Opus 5 dc5bd8e00d doc: document options panel, entry points, and the ChatGPT prefill limitation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 22:53:26 -06:00
Mathew Guest 3435190cb3 doc: changelog 2024-06-10 04:25:07 -06:00