Commit Graph

22 Commits

Author SHA1 Message Date
golem
f683f2e841 feat: add context menu and keyboard shortcut entry points 2026-08-01 22:21:06 -06:00
golem
5365ec881e feat: add pure ChatGPT URL builder with unit tests 2026-08-01 22:04:31 -06:00
golem
c49f6415af feat: add settings defaults and validation with unit tests 2026-08-01 21:59:47 -06:00
golem
b59648d900 doc: add implementation plan for the options panel
Five tasks, each ending in an independently testable deliverable: tooling
plus settings validation, the pure URL builder, manifest and background
wiring, the options panel, then docs and release metadata.

Complete code for every file, 27 unit tests written out in full, and exact
commands with expected output. Global Constraints carries the spec's
verified values verbatim -- the exact permission set, strict_min_version
112.0, MAX_URL_CHARS 8000, and the copy rules that keep user-facing text
honest about ChatGPT only prefilling.

Records the traps verification found so an implementer cannot walk into
them: executeScript resolving silently to [null] on parent-process about:
pages, commands.getAll() reporting a shortcut registered when Firefox has
overridden it, and node --test exiting 0 with zero tests discovered.

Closes with an out-of-scope list so a well-meaning implementer does not
re-add auto-submit or omnibox, and a pre-PR reminder about the open AMO
data-collection question.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 08:00:35 -06:00
golem
3d5ce6a9f4 doc: revise options spec after empirical verification
Two verification passes, driving real Firefox 153.0.1 under Xvfb rather than
reading docs, changed several load-bearing decisions.

Added back: the keyboard shortcut now acts on selected text. activeTab adds
no install-prompt line (confirmed by running Firefox's own
formatPermissionStrings: ["activeTab","storage","menus"] yields msgs: []),
and ext-commands.js grants activeTab before firing onCommand. Records the
three failure shapes of executeScript, one of which resolves silently to
[null] on parent-process about: pages, and that commands.getAll() reports a
suggested_key as registered even when Firefox has silently overridden it.

Rejected with evidence, in Appendix B: auto-submitting the prompt. The
scheme authenticated navigation provenance when auto-submit needs text
provenance, and a hostile page can smuggle ~16 KB of invisible instructions
into info.selectionText. webNavigation.transitionType is not a security
boundary either -- the marker is consumed on commit, so an uncommitted
urlbar navigation leaves it armed for the next navigation to inherit
(demonstrated at 10.47s), and its freshness guard is dead code. Prefill-only
keeps the human checkpoint that makes the context menu safe.

Also rejected: a bundled extension page as search_url (Firefox refuses to
install), and browser.omnibox -- which works and needs no permissions, but
moves the transmitter of search terms from Firefox to extension code, the
change that puts data_collection_permissions ["none"] at risk. Declined to
minimise AMO exposure.

New Risk 6 records the residual AMO question and that it should be asked
before submission, since a forced searchTerms declaration would add the
install line this design exists to avoid.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 07:51:43 -06:00
golem
f057c66155 doc: add extension options panel design spec
Design for an options panel reachable from about:addons, configuring a
context-menu entry on selected text and an Alt+Shift+G shortcut. Adds
storage and menus permissions only, both in Firefox's no-prompt class, so
the install dialog gains no lines and data_collection_permissions stays
"none". The gpt <query> search provider is deliberately untouched.

Technical claims were verified rather than assumed: MV2 background
type:"module" works from Firefox 112 (tested in 153.0.1), so no background
HTML shim is needed; package.json needs "type":"module" or node --test
fails on Node 22.0-22.6; the ChatGPT model/hints/temporary-chat params are
undocumented and unreliable, so every label is written at hint strength.
q= no longer auto-submits, only prefills.

Also excludes docs/ and test/ from the packaged ZIP. Verified: without
this the spec doc itself shipped inside the extension, and a bare glob
alone leaves empty directory entries behind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 20:35:25 -06:00
zavage
5edb288681 Merge pull request 'GPT-2: add Firefox development foundation' (#2) from build/firefox-development-foundation into develop
Reviewed-on: https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension/pulls/2
2026-07-29 16:18:17 -06:00
golem
457d979fb2 build: add Firefox development foundation 2026-07-29 16:13:35 -06:00
db4f65f5e6 Merge pull request 'doc-1/add-link-to-firefox-extension-page' (#1) from doc-1/add-link-to-firefox-extension-page into main
Reviewed-on: https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension/pulls/1
2024-11-15 05:19:11 -07:00
ca1fbbbb28 doc: added link to firefox addon page 2024-11-15 05:17:15 -07:00
f9388a5b0f doc: fix git url 2024-10-30 23:57:03 -06:00
3435190cb3 doc: changelog 2024-06-10 04:25:07 -06:00
e6b48517ed build: removed old favicons 2024-06-10 02:27:22 -06:00
3c28253471 build: updated extension name to comply with OpenAI branding 2024-06-10 02:25:53 -06:00
7c6699a139 build: added favicons 2024-06-10 02:25:34 -06:00
721e1c4416 build: add gitignore 2024-06-10 01:50:49 -06:00
737ad51d79 build: updated git repo and name to reflect OpenAIs branding policy 2024-06-10 01:47:39 -06:00
78d2e484b2 build: updated name to comply with OpenAI branding policy 2024-06-10 01:35:45 -06:00
85a7471c2e build: polished, working in firefox 2024-06-08 07:26:39 -06:00
Mathew Guest
b50507be65 build: extension working for chrome, think it broke firefox though 2024-06-08 00:52:45 -06:00
1600e6c637 build: license text and removing chatGPT icon until am granted permission 2024-06-07 21:10:44 -06:00
ee86860699 build: first working version includes ChatGPT search and icon 2024-06-07 17:42:08 -06:00