Skip to content

Commit bcbca60

Browse files
committed
Merge branch codex/desktop-native-rust-0.9.0
2 parents 3349485 + 8a8d1b3 commit bcbca60

66 files changed

Lines changed: 2179 additions & 1658 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
33
"name": "nber-cli",
44
"description": "Claude Code marketplace for NBER-CLI research workflows.",
5-
"version": "0.8.1",
5+
"version": "0.9.0",
66
"owner": {
77
"name": "Song Tan",
88
"email": "sepinetam@gmail.com",
@@ -12,7 +12,7 @@
1212
{
1313
"name": "nber-cli",
1414
"description": "Use NBER-CLI to search, inspect, download, and serve NBER working paper workflows.",
15-
"version": "0.8.1",
15+
"version": "0.9.0",
1616
"author": {
1717
"name": "Song Tan",
1818
"email": "sepinetam@gmail.com"

.github/workflows/desktop.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@ jobs:
3232
cache: npm
3333
cache-dependency-path: desktop/package-lock.json
3434

35+
- uses: dtolnay/rust-toolchain@stable
36+
37+
- name: Install native desktop system dependencies
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y \
41+
libwebkit2gtk-4.1-dev \
42+
build-essential \
43+
curl \
44+
wget \
45+
file \
46+
libssl-dev \
47+
libayatana-appindicator3-dev \
48+
librsvg2-dev \
49+
libxdo-dev \
50+
pkg-config
51+
3552
- name: Install Python dependencies
3653
run: uv sync --dev --extra server
3754

@@ -57,6 +74,10 @@ jobs:
5774
working-directory: desktop
5875
run: npm run build
5976

77+
- name: Test native Rust data layer
78+
working-directory: desktop/src-tauri
79+
run: cargo test --locked
80+
6081
build:
6182
needs: check
6283
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
@@ -122,10 +143,11 @@ jobs:
122143
librsvg2-dev \
123144
libxdo-dev \
124145
pkg-config \
125-
patchelf
146+
patchelf \
147+
xvfb
126148
127149
- name: Install Python dependencies
128-
run: uv sync --dev --extra server --group desktop-build
150+
run: uv sync --dev
129151

130152
- name: Install desktop dependencies
131153
working-directory: desktop
@@ -154,9 +176,6 @@ jobs:
154176
shell: pwsh
155177
run: uv run python scripts/validate-desktop-signing.py --platform windows --require-signed
156178

157-
- name: Build sidecar
158-
run: uv run python scripts/build-sidecar.py --clean --target-triple ${{ matrix.target }}
159-
160179
- name: Import Apple Developer ID certificate
161180
if: runner.os == 'macOS'
162181
env:
@@ -234,8 +253,13 @@ jobs:
234253
run: uv run python scripts/check-desktop-release.py --platform ${{ matrix.release-platform }} --max-mb 150
235254

236255
- name: Smoke test desktop app
256+
if: runner.os != 'Linux'
237257
run: uv run python scripts/smoke-desktop-app.py --install-from-package
238258

259+
- name: Smoke test desktop app on Linux
260+
if: runner.os == 'Linux'
261+
run: xvfb-run -a uv run python scripts/smoke-desktop-app.py --install-from-package
262+
239263
- name: Check signed and notarized macOS release artifacts
240264
if: startsWith(github.ref, 'refs/tags/v') && matrix.release-platform == 'macos' && vars.DESKTOP_REQUIRE_SIGNING == 'true'
241265
run: uv run python scripts/check-desktop-release.py --platform macos --max-mb 80 --require-signed --require-notarized

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ This file is the canonical release history. The English mirror at `docs/en/chang
66

77
## [Unreleased]
88

9+
## [0.9.0] - 2026-07-17
10+
11+
### Added
12+
- Added a native Rust data layer for Desktop feed listing, RSS refresh, paper metadata caching, settings, and read/unread state.
13+
- Added Rust tests for CLI-compatible SQLite schema handling, custom database paths, RSS repair/parsing, paper-page parsing, and read status.
14+
15+
### Changed
16+
- Desktop now talks directly to the configured SQLite database and NBER endpoints; it no longer starts, bundles, or requires a Python sidecar.
17+
- Desktop refresh now performs the same RSS upsert and `feed_fetches` accounting as `nber-cli feed fetch`.
18+
- Desktop now honors the CLI's configured `feed.db-path` and refuses to overwrite malformed configuration files.
19+
- Release checks and installer smoke tests now require Python sidecar binaries to be absent.
20+
21+
### Removed
22+
- Removed the Desktop service-port setting and the sidecar build/runtime lifecycle from the Tauri application and release workflow.
23+
924
## [0.8.1] - 2026-07-16
1025

1126
### Added

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A command line interface for reaching the National Bureau of Economic Research (
2121
- Cache paper metadata locally (`nber-cli info` writes to `info_cache`) with a sliding TTL, plus a behavior log for `search`, `download`, and `info` lookups.
2222
- Store the cache, RSS items, and behavior logs in a local SQLite database at `~/.nber-cli/nber.db`, managed through SQLModel/SQLAlchemy and configurable with a filesystem path or `sqlite:///...` URL.
2323
- Expose the same core workflows as MCP tools for AI agents.
24-
- Provide an optional loopback-only HTTP server for the Desktop app and local integrations.
25-
- Provide a macOS and Windows Desktop research workspace with feed sync, unread tracking, paper details, and citation copying.
24+
- Provide an optional loopback-only HTTP server for local integrations.
25+
- Provide a native Rust/SQLite Desktop workspace for macOS, Windows, and Linux without a Python sidecar.
2626
- Return human-readable output by default, with JSON output for automation.
2727
- Provide `--verbose` debug logging and a rotating log file for troubleshooting.
2828
- Use `-c/--config <path>` to temporarily override the config file for a single run.
@@ -112,7 +112,7 @@ The server upgrades the local SQLite database to schema v3 on startup and expose
112112

113113
### Desktop App
114114

115-
Download the macOS or Windows installer from [GitHub Releases](https://github.com/sepinetam/nber-cli/releases). Current installers are unsigned, so read the [Desktop guide](docs/en/desktop.md) before overriding any macOS Gatekeeper or Windows SmartScreen warning. The guide also documents supported platforms, local files, settings, backup, and the current custom-database limitation.
115+
Download the macOS, Windows, or Linux installer from [GitHub Releases](https://github.com/sepinetam/nber-cli/releases). Current installers are unsigned. Desktop 0.9.0 talks directly to the shared SQLite database from Rust and does not require Python; see the [Desktop guide](docs/en/desktop.md).
116116

117117
If macOS reports that "NBER-CLI Desktop.app" is damaged and cannot be opened, run `xattr -cr /Applications/NBER-CLI\ Desktop.app` in Terminal, then reopen the app.
118118

desktop/README.md

Lines changed: 21 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,30 @@
11
# NBER-CLI Desktop
22

3-
NBER-CLI Desktop is the desktop shell for NBER-CLI V1. It uses Tauri v2, React, TypeScript, a local FastAPI sidecar, and the default SQLite database at `~/.nber-cli/nber.db`. Desktop 0.8.1 does not yet honor the CLI's custom `feed.db-path`; see the [Desktop user guide](../docs/en/desktop.md).
3+
NBER-CLI Desktop is a Tauri v2 and React research workspace. Since Desktop 0.9.0, its Rust core talks directly to the shared SQLite database and NBER endpoints. The application does not start, bundle, or require a Python sidecar.
4+
5+
Desktop and the Python CLI share the configured database, including `feed_items`, `info_cache`, and `read_status`. A custom `feed.db-path` created by `nber-cli db migrate` is honored when it points inside the user's home directory.
46

57
## Development
68

79
From the repository root:
810

911
```bash
10-
uv sync --dev --extra server
1112
cd desktop
1213
npm install
1314
npm run tauri dev
1415
```
1516

16-
In development, the Tauri shell starts the Python sidecar through:
17-
18-
```bash
19-
uv run nber-sidecar --port 31527
20-
```
21-
22-
## Python API
23-
24-
```bash
25-
uv run nber-sidecar --host 127.0.0.1 --port 31527
26-
```
27-
28-
Useful endpoints:
17+
The React frontend calls these native Tauri commands:
2918

30-
- `GET /api/v1/health`
31-
- `GET /api/v1/feed`
32-
- `POST /api/v1/feed/refresh`
33-
- `GET /api/v1/papers/{paper_id}`
34-
- `POST /api/v1/papers/{paper_id}/mark-read`
35-
- `GET /api/v1/settings`
36-
- `PATCH /api/v1/settings`
19+
- `get_config`
20+
- `get_feed`
21+
- `refresh_feed`
22+
- `get_paper`
23+
- `set_paper_read_status`
24+
- `get_settings`
25+
- `save_settings`
3726

38-
See the [Local HTTP API reference](../docs/en/http-api.md) for query parameters, request bodies, response envelopes, error codes, and endpoint side effects.
39-
40-
## Build Sidecar
41-
42-
```bash
43-
uv sync --extra server --group desktop-build
44-
uv run python scripts/build-sidecar.py --clean
45-
```
46-
47-
The script writes the platform-specific sidecar to `desktop/src-tauri/binaries/` using Tauri's expected target triple naming.
27+
The optional Python HTTP API remains available for other local integrations, but Desktop does not use it.
4828

4929
## Build App
5030

@@ -54,37 +34,35 @@ npm run build
5434
npm run tauri build
5535
```
5636

57-
Code signing requires the Apple Developer ID and Windows code signing secrets listed in the Release section below.
37+
No Python runtime or sidecar build step is required. Code signing remains optional because the project currently ships unsigned packages.
5838

5939
## Verification
6040

61-
Run the repository gates before preparing a desktop build:
41+
Run the repository gates before preparing a Desktop build:
6242

6343
```bash
6444
uv run ruff check .
65-
uv run pytest tests
45+
uv run pytest
6646
cd desktop
6747
npm run lint
6848
npm run test
6949
npm run build
7050
cd src-tauri
71-
cargo check
51+
cargo test --locked
7252
```
7353

74-
After building a macOS package, verify size and install/start behavior from the DMG:
54+
After building a package, verify its contents and native startup flow:
7555

7656
```bash
7757
uv run python scripts/check-desktop-release.py --platform macos --max-mb 80
78-
uv run python scripts/smoke-desktop-app.py --install-from-package --exercise-live-refresh
58+
uv run python scripts/smoke-desktop-app.py --install-from-package
7959
```
8060

81-
On Windows CI or a Windows machine, use the same release checker and smoke script with `--platform windows`.
61+
Use the corresponding `windows` or `linux` platform argument on those systems. The package check fails if a Python sidecar is present.
8262

8363
## Release
8464

85-
GitHub Actions builds Desktop artifacts from the same `v*` tag used by the Python package release, or when the Desktop workflow is manually dispatched. Pushing a tag such as `v0.8.1` runs the full checks and creates one draft GitHub Release containing the macOS and Windows installers. Publishing that same Release triggers the PyPI workflow, so the CLI and Desktop ship under one version and one Release.
86-
87-
Desktop releases are unsigned by default. To require signed Windows artifacts plus signed and notarized macOS artifacts in the future, set the repository variable `DESKTOP_REQUIRE_SIGNING` to `true` and configure the signing secrets below.
65+
GitHub Actions builds macOS arm64/x64, Windows x64, and Linux x64 artifacts from a `v*` tag. The same tag is used for the Python package and Desktop app. Pushing `v0.9.0` creates or updates a draft GitHub Release; publish it after all platform artifacts have uploaded successfully.
8866

8967
Before tagging, keep these versions aligned:
9068

@@ -93,12 +71,4 @@ Before tagging, keep these versions aligned:
9371
- `desktop/src-tauri/tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`
9472
- Claude and Codex plugin manifests
9573

96-
Required release signing inputs:
97-
98-
- macOS: `APPLE_CERTIFICATE`, `APPLE_CERTIFICATE_PASSWORD`, `KEYCHAIN_PASSWORD`, `APPLE_ID`, `APPLE_PASSWORD`, `APPLE_TEAM_ID`
99-
- Windows: `WINDOWS_CERTIFICATE`, `WINDOWS_CERTIFICATE_PASSWORD`
100-
101-
Optional signing inputs:
102-
103-
- macOS: `APPLE_PROVIDER_SHORT_NAME`
104-
- Windows: `WINDOWS_DIGEST_ALGORITHM`, `WINDOWS_TIMESTAMP_URL`
74+
Signing is not required. If paid certificates are added later, set `DESKTOP_REQUIRE_SIGNING=true` and configure the signing secrets documented in the release workflow.

0 commit comments

Comments
 (0)