|
1 | | -# Jan Extension — Options Models Refresh Fix |
2 | | - |
3 | | -## Summary |
4 | | -Fixes a bug where the Options page required a hard refresh before the model list updated after changing provider/API settings. |
5 | | - |
6 | | -## Root Cause |
7 | | -`LIST_MODELS` in the background read from `chrome.storage.sync` only, while the Options UI had unsaved local state. The UI would fetch models before saving, and the background saw stale values, leading to "Missing API Base URL" or empty results until a reload. |
8 | | - |
9 | | -## Files Changed |
10 | | -``` |
11 | | -src/background.js |
12 | | -ui/options/App.jsx |
13 | | -``` |
14 | | - |
15 | | -## Changes Overview |
16 | | -- **Background (`src/background.js`)**: `LIST_MODELS` now accepts overrides in `message.payload` (`apiBase`, `apiKey`, `useApiKey`). Falls back to `getSettings()` only when overrides are not provided. |
17 | | -- **Options UI (`ui/options/App.jsx`)**: Model fetch effect now sends overrides to `LIST_MODELS` with current config values, adds guards to avoid errors while editing, and immediately refetches models after Save. |
18 | | - |
19 | | -## Type of Change |
20 | | -- [x] Bug fix (non-breaking change which fixes an issue) |
21 | | -- [ ] Hotfix (critical fix requiring immediate deployment) |
22 | | -- [ ] New feature |
23 | | -- [ ] Breaking change |
24 | | -- [x] Code refactoring |
25 | | -- [ ] TypeScript migration |
26 | | - |
27 | | -## Testing Checklist |
28 | | -- [ ] Changes tested locally |
29 | | -- [ ] Model list updates immediately after changing settings without hard refresh |
30 | | -- [ ] No error messages flash while typing in Options |
31 | | -- [ ] Save functionality works correctly |
32 | | -- [ ] Refresh button works as expected |
33 | | -- [ ] Extension reload not required |
34 | | - |
35 | | -## Deployment Notes |
36 | | -Standard deployment process; extension reload required for users to see the fix. |
37 | | - |
38 | | -## Additional Context |
39 | | -This fix addresses a UX issue in the Jan extension Options page where users had to reload the extension to see updated model lists after changing API settings. The changes are backward-compatible and only affect the Options page model fetching behavior. |
40 | | - |
41 | | -## Reviewer Focus Areas |
42 | | -- [ ] Background message handling changes |
43 | | -- [ ] Options UI state management |
44 | | -- [ ] Error handling improvements |
45 | | -- [ ] Backward compatibility |
46 | | - |
47 | | ---- |
48 | | - |
49 | | -**Ready for review and deployment** 🚀 |
| 1 | +Title: Firefox support + Nightly/Release artifacts + bump to 0.12.14 |
| 2 | + |
| 3 | +Summary |
| 4 | +- Add official Firefox build and attach Firefox zips in Nightly and tagged Releases. |
| 5 | +- Keep Chrome build unchanged, but publish separate artifacts for clarity. |
| 6 | +- Bump versions to 0.12.14 across root package and both manifests. |
| 7 | + |
| 8 | +What’s included |
| 9 | +- CI: Add Firefox to Nightly and Release workflows |
| 10 | + - Nightly: builds Firefox and uploads `jan-extension-firefox-nightly-<run>-<sha>.zip`. |
| 11 | + - Release: builds Firefox and uploads `jan-extension-firefox-<tag>.zip`. |
| 12 | + - Chrome artifacts are now explicitly `jan-extension-chrome-*.zip` to avoid confusion. |
| 13 | +- Version bumps |
| 14 | + - package.json → 0.12.14 |
| 15 | + - manifest.json → 0.12.14 |
| 16 | + - manifest.firefox.json → 0.12.14 |
| 17 | +- Local packaging |
| 18 | + - `scripts/package-local.sh` now builds Firefox and produces a Firefox zip alongside Chrome. |
| 19 | +- Docs |
| 20 | + - `RELEASE.md` updated to reflect Chrome/Firefox artifact names and Nightly behavior. |
| 21 | + |
| 22 | +Rationale |
| 23 | +- Provide first-class Firefox support: a reproducible build and downloadable artifact. |
| 24 | +- Clear artifact naming (`-chrome-` / `-firefox-`) removes ambiguity for users and CI consumers. |
| 25 | + |
| 26 | +Files changed |
| 27 | +- .github/workflows/nightly.yml |
| 28 | +- .github/workflows/release.yml |
| 29 | +- scripts/package-local.sh |
| 30 | +- package.json |
| 31 | +- manifest.json |
| 32 | +- manifest.firefox.json |
| 33 | +- RELEASE.md |
| 34 | + |
| 35 | +How to test locally |
| 36 | +1) Firefox build |
| 37 | + - `bun run build:firefox` (or `npm run build:firefox`) |
| 38 | + - Verify `dist-firefox/` contains: `manifest.json`, `icons/`, `src/`, `ui/`, `assets/`. |
| 39 | +2) Load in Firefox (temporary add-on) |
| 40 | + - Open `about:debugging#/runtime/this-firefox` → Load Temporary Add-on… → select any file in `dist-firefox/`. |
| 41 | + - Sanity checks: |
| 42 | + - Sidebar opens and renders side panel UI. |
| 43 | + - Inline Assistant shows on text selection and can Apply/Copy. |
| 44 | + - Commands/shortcuts respond (e.g., open panel, custom prompt, toggle autocomplete). |
| 45 | + - Page summarization works and streams output. |
| 46 | +3) Chrome sanity (unchanged flow) |
| 47 | + - `bun run build` then load `dist/` via `chrome://extensions` → Load unpacked. |
| 48 | +4) Local packaging |
| 49 | + - `TAG=test-local bash scripts/package-local.sh` |
| 50 | + - Inspect `pack/jan-extension-chrome-test-local.zip` and `pack/jan-extension-firefox-test-local.zip` contents. |
| 51 | + |
| 52 | +CI/Release behavior |
| 53 | +- Nightly (push to main): |
| 54 | + - Uploads: Chrome and Firefox nightly zips, plus MCP zip if present. |
| 55 | +- Tagged release (push tag): |
| 56 | + - Uploads: `jan-extension-chrome-<tag>.zip`, `jan-extension-firefox-<tag>.zip`, and `search-mcp-server-<tag>-dist.zip` (if present). |
| 57 | + |
| 58 | +Release notes (proposed) |
| 59 | +- Firefox support: Official Firefox build and downloadable artifact on Releases and Nightlies. |
| 60 | +- Chrome + Firefox artifacts: Explicit platform suffixes for clarity. |
| 61 | +- Version: 0.12.14. |
| 62 | + |
| 63 | +Compatibility / migration |
| 64 | +- No changes to runtime behavior for Chrome users. |
| 65 | +- Artifact names changed; any downstream automation that expected `jan-extension-<tag>.zip` should update to `jan-extension-chrome-<tag>.zip`. |
| 66 | + |
| 67 | +Checklist |
| 68 | +- [ ] Firefox: sidebar opens and renders side panel UI |
| 69 | +- [ ] Firefox: Inline Assistant operates on selected text |
| 70 | +- [ ] Firefox: Page summarization streams and completes |
| 71 | +- [ ] Chrome: basic sanity unchanged |
| 72 | +- [ ] Release artifact names validated in CI logs |
| 73 | + |
0 commit comments