Skip to content

Commit aa07bab

Browse files
committed
chore(release): add Firefox artifacts to nightly/release, bump to 0.12.14, update docs and local packaging
1 parent 78d4dee commit aa07bab

File tree

8 files changed

+147
-64
lines changed

8 files changed

+147
-64
lines changed

.github/workflows/nightly.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ jobs:
3232
- name: Build extension and MCP server (Bun)
3333
run: bun run build:all
3434

35-
- name: Prepare nightly extension package
35+
- name: Build Firefox extension (Bun)
36+
run: bun run build:firefox
37+
38+
- name: Prepare nightly extension package (Chrome)
3639
id: pkg
3740
shell: bash
3841
run: |
3942
set -euo pipefail
4043
RUN_NUMBER="${GITHUB_RUN_NUMBER}"
4144
SHA_SHORT=$(git rev-parse --short HEAD)
42-
PKG_NAME="jan-extension-nightly-${RUN_NUMBER}-${SHA_SHORT}.zip"
45+
PKG_NAME="jan-extension-chrome-nightly-${RUN_NUMBER}-${SHA_SHORT}.zip"
4346
mkdir -p pack/extension
4447
# Copy required extension files
4548
cp -r dist icons src pack/extension/
@@ -54,6 +57,18 @@ jobs:
5457
(cd pack/extension && zip -r "../../${PKG_NAME}" .)
5558
echo "pkg_name=${PKG_NAME}" >> "$GITHUB_OUTPUT"
5659
60+
- name: Prepare nightly extension package (Firefox)
61+
id: pkg_ff
62+
shell: bash
63+
run: |
64+
set -euo pipefail
65+
RUN_NUMBER="${GITHUB_RUN_NUMBER}"
66+
SHA_SHORT=$(git rev-parse --short HEAD)
67+
PKG_FF_NAME="jan-extension-firefox-nightly-${RUN_NUMBER}-${SHA_SHORT}.zip"
68+
# Zip the firefox dist root as the extension package
69+
(cd dist-firefox && zip -r "../${PKG_FF_NAME}" .)
70+
echo "pkg_ff_name=${PKG_FF_NAME}" >> "$GITHUB_OUTPUT"
71+
5772
- name: Package MCP search server (optional asset)
5873
id: mcp
5974
shell: bash
@@ -77,6 +92,7 @@ jobs:
7792
if-no-files-found: warn
7893
path: |
7994
${{ steps.pkg.outputs.pkg_name }}
95+
${{ steps.pkg_ff.outputs.pkg_ff_name }}
8096
${{ steps.mcp.outputs.mcp_zip }}
8197
8298
- name: Create/Update Nightly Release
@@ -86,9 +102,15 @@ jobs:
86102
name: Nightly Builds
87103
draft: false
88104
prerelease: true
105+
body: |
106+
Nightly builds for Jan Extension.
107+
108+
- Includes Chrome and Firefox extension packages.
109+
- Firefox artifacts are built from `manifest.firefox.json` and `dist-firefox`.
110+
- Zips are suffixed with run and commit for traceability.
89111
files: |
90112
${{ steps.pkg.outputs.pkg_name }}
113+
${{ steps.pkg_ff.outputs.pkg_ff_name }}
91114
${{ steps.mcp.outputs.mcp_zip }}
92115
env:
93116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-

.github/workflows/release.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ jobs:
3030
- name: Build extension and MCP server (Bun)
3131
run: bun run build:all
3232

33-
- name: Prepare extension package
33+
- name: Build Firefox extension (Bun)
34+
run: bun run build:firefox
35+
36+
- name: Prepare extension package (Chrome)
3437
id: pkg
3538
shell: bash
3639
run: |
3740
set -euo pipefail
3841
TAG="${GITHUB_REF_NAME}"
39-
PKG_NAME="jan-extension-${TAG}.zip"
42+
PKG_NAME="jan-extension-chrome-${TAG}.zip"
4043
mkdir -p pack/extension
4144
# Copy required extension files
4245
cp -r manifest.json dist icons src pack/extension/
@@ -47,6 +50,16 @@ jobs:
4750
(cd pack/extension && zip -r "../../${PKG_NAME}" .)
4851
echo "pkg_name=${PKG_NAME}" >> "$GITHUB_OUTPUT"
4952
53+
- name: Prepare extension package (Firefox)
54+
id: pkg_ff
55+
shell: bash
56+
run: |
57+
set -euo pipefail
58+
TAG="${GITHUB_REF_NAME}"
59+
PKG_FF_NAME="jan-extension-firefox-${TAG}.zip"
60+
(cd dist-firefox && zip -r "../${PKG_FF_NAME}" .)
61+
echo "pkg_ff_name=${PKG_FF_NAME}" >> "$GITHUB_OUTPUT"
62+
5063
- name: Package MCP search server (optional asset)
5164
id: mcp
5265
shell: bash
@@ -69,6 +82,7 @@ jobs:
6982
if-no-files-found: warn
7083
path: |
7184
${{ steps.pkg.outputs.pkg_name }}
85+
${{ steps.pkg_ff.outputs.pkg_ff_name }}
7286
${{ steps.mcp.outputs.mcp_zip }}
7387
7488
- name: Create GitHub Release and upload assets
@@ -79,8 +93,15 @@ jobs:
7993
name: Jan Extension ${{ github.ref_name }}
8094
draft: false
8195
prerelease: false
96+
body: |
97+
Firefox support: Added official Firefox build artifact alongside Chrome.
98+
99+
- Artifacts: `jan-extension-chrome-${{ github.ref_name }}.zip`, `jan-extension-firefox-${{ github.ref_name }}.zip`.
100+
- Notes: Firefox package is built from `manifest.firefox.json` and zipped from `dist-firefox`.
101+
- MCP Server (optional): included as `search-mcp-server-${{ github.ref_name }}-dist.zip` when present.
82102
files: |
83103
${{ steps.pkg.outputs.pkg_name }}
104+
${{ steps.pkg_ff.outputs.pkg_ff_name }}
84105
${{ steps.mcp.outputs.mcp_zip }}
85106
env:
86107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

PR.md

Lines changed: 73 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,73 @@
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+

RELEASE.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This doc explains how to ship downloadable zips for the Chrome extension and the
1212
git push origin 12.11
1313
```
1414
CI publishes:
15-
- `jan-extension-12.11.zip`
15+
- `jan-extension-chrome-12.11.zip`
16+
- `jan-extension-firefox-12.11.zip`
1617
- `search-mcp-server-12.11-dist.zip`
1718

1819
- Nightly prerelease (incremental):
@@ -50,14 +51,18 @@ git tag 12.11 && git push origin main && git push origin 12.11
5051
- Trigger: tag pushes (`vX.Y.Z`, `X.Y.Z`, or custom like `12.11`).
5152
- Tooling: Bun (`oven-sh/setup-bun@v2`) for `bun install` and `bun run build:all`.
5253
- Artifacts:
53-
- `jan-extension-<tag>.zip`: `manifest.json`, `src/background.js`, `src/content.js`, `dist/ui/*`, `dist/assets/*`, `icons/*`, plus `LICENSE`/`README.md` if present.
54+
- `jan-extension-chrome-<tag>.zip`: `manifest.json`, `src/*`, `dist/**`, `icons/*`, plus `LICENSE`/`README.md` if present.
55+
- `jan-extension-firefox-<tag>.zip`: zipped from `dist-firefox/**` built via `npm run build:firefox`.
5456
- `search-mcp-server-<tag>-dist.zip`: `mcp/search-server/dist/**` (if present).
5557
- Publishes a GitHub Release for the tag.
5658

5759
- Nightly: `.github/workflows/nightly.yml`
5860
- Trigger: push to `main`.
59-
- Patches `manifest.version_name` to include `-nightly-<run>-<sha>` (does not change `version`).
60-
- Updates prerelease with tag `nightly` and uploads the two artifacts.
61+
- Patches Chrome `manifest.version_name` to include `-nightly-<run>-<sha>` (does not change `version`).
62+
- Updates prerelease with tag `nightly` and uploads:
63+
- `jan-extension-chrome-nightly-<run>-<sha>.zip`
64+
- `jan-extension-firefox-nightly-<run>-<sha>.zip`
65+
- `search-mcp-server-nightly-<run>-<sha>-dist.zip`
6166

6267
## Local Packaging Details
6368

@@ -68,7 +73,8 @@ git tag 12.11 && git push origin main && git push origin 12.11
6873

6974
- Verify contents:
7075
```bash
71-
unzip -l pack/jan-extension-<tag>.zip | sed -n '1,200p'
76+
unzip -l pack/jan-extension-chrome-<tag>.zip | sed -n '1,200p'
77+
unzip -l pack/jan-extension-firefox-<tag>.zip | sed -n '1,200p'
7278
```
7379

7480
## Optional: Run CI Locally
@@ -91,4 +97,3 @@ The workflow uploads artifacts; publishing to GitHub Releases is skipped under `
9197
```
9298
- Bun: we track `latest`. If CI regresses, pin `bun-version: 1.2.x`.
9399
- Chrome: unzip the extension zip and load as unpacked via `chrome://extensions`.
94-

manifest.firefox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Jan",
4-
"version": "0.12.12",
4+
"version": "0.12.14",
55
"description": "The Jan companion for your browser: chat, inline writing help, search, and page context in the sidebar.",
66
"browser_specific_settings": {
77
"gecko": {

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Jan",
4-
"version": "0.12.13",
4+
"version": "0.12.14",
55
"description": "The Jan companion for your browser: chat, inline writing help, search, and page context in the side panel.",
66
"icons": {
77
"16": "icons/app-16.png",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jan-browser-extension",
3-
"version": "0.12.13",
3+
"version": "0.12.14",
44
"description": "A Manifest V3 Chrome extension that summarizes the current page (or selected text) using any OpenAI-compatible API, including Cerebras and Jan Server.",
55
"type": "module",
66
"main": "index.js",

scripts/package-local.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ if command -v bun >/dev/null 2>&1; then
2626
fi
2727
echo "[local-release] Building all targets with Bun"
2828
bun run build:all
29+
echo "[local-release] Building Firefox extension"
30+
bun run build:firefox
2931
else
3032
echo "[local-release] Bun not found; falling back to npm"
3133
echo "[local-release] Installing root deps..."
@@ -42,6 +44,8 @@ else
4244
fi
4345
echo "[local-release] Building all targets..."
4446
npm run build:all
47+
echo "[local-release] Building Firefox extension"
48+
npm run build:firefox
4549
fi
4650

4751
echo "[local-release] Packaging extension..."
@@ -51,7 +55,14 @@ cp -r manifest.json dist icons src pack/extension/
5155
[[ -f LICENSE ]] && cp LICENSE pack/extension/ || true
5256
[[ -f README.md ]] && cp README.md pack/extension/ || true
5357

54-
(cd pack/extension && zip -r "../jan-extension-${TAG}.zip" . >/dev/null)
58+
(cd pack/extension && zip -r "../jan-extension-chrome-${TAG}.zip" . >/dev/null)
59+
60+
echo "[local-release] Packaging Firefox extension..."
61+
if [[ -d dist-firefox ]]; then
62+
(cd dist-firefox && zip -r "../pack/jan-extension-firefox-${TAG}.zip" . >/dev/null)
63+
else
64+
echo "[local-release] dist-firefox not found; skipping Firefox zip."
65+
fi
5566

5667
echo "[local-release] Packaging MCP server (if present)..."
5768
if [[ -d mcp/search-server/dist ]]; then

0 commit comments

Comments
 (0)