Skip to content

Commit 687bbcd

Browse files
committed
Pivot to Electron-first desktop intake
1 parent 941b5e0 commit 687bbcd

30 files changed

Lines changed: 900 additions & 132 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ node_modules/
1616
upstream/downloads/
1717
upstream/work/
1818
tmp/
19+
electron/vendor/current/
20+
electron/vendor/staging/
21+
electron/manifest/*.local.json
22+
review-bundle/

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Thanks for helping make `codex-ubuntu` better.
44

5-
This project is still early, but it is not casual about launcher safety. Small-looking changes in runtime discovery, PID handling, or browser launch behavior can break trust fast, so please read the docs before editing core flows.
5+
This project is still early, but it is not casual about desktop-launch safety. Small-looking changes in runtime discovery, PID handling, browser fallback behavior, or future Electron intake can break trust fast, so please read the docs before editing core flows.
66

77
## Before you open a pull request
88

@@ -35,6 +35,7 @@ make install-local
3535

3636
Good first contributions:
3737

38+
- Electron-first repo shaping
3839
- launcher hardening
3940
- test coverage improvements
4041
- desktop integration polish
@@ -46,7 +47,7 @@ Changes that need extra care:
4647
- process stop or reuse logic
4748
- provider contract changes
4849
- token handling or logging changes
49-
- anything that touches auth, runtime metadata, or port ownership
50+
- anything that touches auth, runtime metadata, port ownership, or desktop identity
5051

5152
## Style expectations
5253

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
SHELL := /usr/bin/env bash
22

3-
.PHONY: check validate-desktop test install-local build-deb
3+
.PHONY: check validate-desktop test install-local install-electron-local import-electron-payload build-deb
44

55
check: validate-desktop
6+
bash -n electron/codex-desktop
67
bash -n launcher/codex-ubuntu
8+
bash -n scripts/import-electron-payload.sh
9+
bash -n scripts/install-electron-local.sh
710
bash -n scripts/install-local.sh
811
bash -n scripts/build-deb.sh
912
bash -n tests/launcher_smoke.sh
@@ -22,5 +25,11 @@ test: check
2225
install-local:
2326
scripts/install-local.sh
2427

28+
install-electron-local:
29+
scripts/install-electron-local.sh
30+
31+
import-electron-payload:
32+
scripts/import-electron-payload.sh "$(SOURCE_ROOT)"
33+
2534
build-deb:
2635
scripts/build-deb.sh

README.md

Lines changed: 90 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,91 +6,128 @@
66
[![Security](https://img.shields.io/badge/runtime-stop%20verified-2E7D32)](docs/security.md)
77
[![License](https://img.shields.io/badge/license-MIT-111111)](LICENSE)
88

9-
Unofficial Ubuntu-first launcher and packaging project for Codex.
9+
Unofficial Ubuntu-first Electron desktop project, with a browser fallback for recovery and constrained environments.
1010

11-
`codex-ubuntu` is trying to solve a very specific problem well: make the app feel at home on Ubuntu without pretending Linux support is already finished upstream, and without baking in fragile local assumptions that break as soon as the machine changes.
11+
`codex-ubuntu` is trying to solve a very specific problem well: make the app feel genuinely at home on Ubuntu. The browser wrapper was useful as a safety exercise, but it is not the end state. The product target is now an Electron-first Ubuntu desktop experience, because that is the path that actually feels like a real app in daily use.
1212

1313
## Why this exists
1414

15-
Ubuntu users currently end up choosing between:
15+
Ubuntu users usually end up choosing between:
1616

1717
- browser-first one-off launch scripts
1818
- brittle personal-machine wrappers
1919
- heavy unofficial ports with a large maintenance surface
2020

21-
This repository takes the narrower path:
21+
This repository now takes the harder but more honest path:
2222

23-
- real Ubuntu launcher behavior
23+
- Electron-first desktop direction
24+
- browser launcher retained only as fallback and recovery
2425
- explicit security rules around runtime ownership
2526
- `.deb`-first packaging direction
26-
- provider boundaries that leave room for future runtime strategies
27+
- clear boundaries between desktop payload, compatibility patches, and fallback tooling
2728

2829
## What works today
2930

30-
The current repository is not just a design memo. It ships a working launcher foundation with:
31+
The current repository is not just a design memo. It already ships:
3132

32-
- dedicated app-window flow
33+
- a repo-owned local Electron launcher wrapper for dogfooding
34+
- a minimum Electron payload intake workflow
35+
- a strict browser fallback launcher
3336
- XDG config, cache, and state handling
3437
- verified process ownership before stop or reuse
3538
- runtime and browser discovery without hardcoded personal paths
3639
- local install flow
37-
- `.deb` build path
40+
- local Electron install flow
41+
- `.deb` build path for the fallback utility
3842
- smoke tests and CI
43+
- Electron-first repo structure and migration docs
3944

4045
## What it is not claiming
4146

4247
This repository is not yet:
4348

4449
- an official Linux desktop release
45-
- a full upstream desktop-payload repackager
50+
- a self-contained Electron desktop payload inside this repo
4651
- a finished updater
4752
- a promise to redistribute proprietary upstream app assets
4853

49-
The local repackager path is still exploratory, not a committed milestone.
54+
The Electron direction is the main product path, but the exact asset and distribution model still has to stay explicit and careful.
5055

5156
## Current strategy
5257

53-
The recommended v1 is intentionally launcher-first.
58+
The project is now Electron-first.
5459

5560
That means:
5661

57-
1. the Ubuntu launcher and desktop integration are real now
58-
2. the browser-shell runtime path is implemented now
59-
3. the provider contract is defined now
60-
4. future runtime modes can be added without rewriting the project shape
62+
1. the product target is an Ubuntu desktop app, not a dressed-up browser tab
63+
2. the browser-shell path stays only as fallback and recovery mode
64+
3. the provider contract still matters because both paths need safe runtime ownership rules
65+
4. packaging remains `.deb`-first
6166

6267
### Runtime model
6368

6469
Implemented today:
6570

66-
- `browser-shell`
71+
- `browser-shell` fallback
6772

68-
Planned but not implemented:
73+
Primary target:
74+
75+
- `desktop-payload` (Electron-first)
76+
77+
Optional later:
6978

7079
- `app-server`
71-
- `desktop-payload`
7280

73-
See [providers/contract.md](providers/contract.md), [providers/browser-shell.md](providers/browser-shell.md), and [docs/architecture.md](docs/architecture.md).
81+
See [providers/contract.md](providers/contract.md), [providers/browser-shell.md](providers/browser-shell.md), [docs/architecture.md](docs/architecture.md), and [docs/electron-first-plan.md](docs/electron-first-plan.md).
7482

7583
## Feature matrix
7684

7785
| Area | Current | Notes |
7886
| --- | --- | --- |
79-
| Ubuntu launcher | Yes | Dedicated app-window flow and desktop identity |
80-
| Process-safe stop/reuse | Yes | Refuses to kill unverified runtimes |
87+
| Repo-owned Electron launcher | Partial | Local dogfood wrapper around the current working desktop payload |
88+
| Minimum payload intake | Yes | Imports `app.asar`, `start.sh`, version, build metadata, and icon into an ignored local vendor area |
89+
| Browser fallback launcher | Yes | Strict launcher and recovery path |
90+
| Electron-first repo structure | Yes | Docs and repo layout now point at the desktop path |
91+
| Process-safe stop/reuse | Yes | Fallback launcher refuses to kill unverified runtimes |
8192
| XDG state layout | Yes | Config, cache, and state are separated |
82-
| Local install | Yes | `make install-local` |
83-
| Debian package build | Yes | `make build-deb` |
93+
| Local install | Yes | `make install-local` installs the fallback utility |
94+
| Local Electron install | Yes | `make install-electron-local` swaps the active desktop launcher to repo code with rollback preserved |
95+
| Debian package build | Yes | Today this packages the fallback utility |
8496
| CI | Yes | Syntax, smoke tests, packaging |
85-
| App Server provider | Not yet | Tracked as a future provider |
86-
| Desktop-payload repackager | Exploratory | Not tied to a committed release phase |
97+
| Desktop-payload provider | Not yet | Main implementation target |
98+
| App Server provider | Not yet | Optional future provider |
8799
| Updater | Not yet | Deliberately deferred |
88100

89101
## Quick start
90102

91-
### 1. Install runtime prerequisites
103+
### Electron dogfood quick start
104+
105+
If you want the current `Codex Desktop` launch chain to come from this repo while still using the working Electron payload already on your machine:
106+
107+
```bash
108+
make install-electron-local
109+
```
110+
111+
That swaps the active local `Codex Desktop` wrapper to the repo-owned Electron launcher and preserves a `Codex Desktop (Legacy)` rollback entry.
112+
113+
### Minimum payload intake
114+
115+
If you want the repo to import the current local desktop payload slice for patch planning and provenance:
116+
117+
```bash
118+
make import-electron-payload
119+
```
120+
121+
That writes:
122+
123+
- `electron/vendor/current/`
124+
- `electron/manifest/current.local.json`
125+
126+
### Fallback launcher quick start
92127

93-
The current launcher expects:
128+
If you want the current runnable implementation from this repo today, that is still the fallback launcher.
129+
130+
The fallback launcher expects:
94131

95132
- `codex-app-linux` on `PATH`, or `CODEX_UBUNTU_APP_LINUX_CMD` set
96133
- a supported browser on `PATH`, or `CODEX_UBUNTU_BROWSER` set
@@ -101,7 +138,7 @@ Strict behavior:
101138
- invalid explicit runtime or browser overrides fail loudly
102139
- non-loopback bind values require `CODEX_UBUNTU_ALLOW_NON_LOOPBACK=1`
103140

104-
### 2. Install locally
141+
Install it locally:
105142

106143
```bash
107144
make install-local
@@ -113,7 +150,7 @@ That installs:
113150
- `${XDG_DATA_HOME:-~/.local/share}/applications/codex-ubuntu.desktop`
114151
- `${XDG_DATA_HOME:-~/.local/share}/icons/hicolor/scalable/apps/codex-ubuntu.svg`
115152

116-
### 3. Launch
153+
Launch it:
117154

118155
```bash
119156
codex-ubuntu
@@ -125,18 +162,20 @@ Or open `Codex Ubuntu (Unofficial)` from the Ubuntu app grid.
125162

126163
```mermaid
127164
flowchart LR
128-
user["User"] --> desktop["Ubuntu desktop entry"]
129-
desktop --> launcher["Launcher"]
130-
launcher --> provider["Runtime provider"]
131-
launcher --> state["XDG state, cache, config"]
165+
user["User"] --> desktop["Ubuntu desktop integration"]
166+
desktop --> payload["Electron desktop payload (target)"]
167+
desktop --> fallback["Browser fallback launcher (implemented)"]
168+
payload --> state["XDG state, cache, config"]
169+
fallback --> provider["browser-shell provider"]
132170
provider --> runtime["Local web runtime"]
171+
fallback --> state
133172
```
134173

135174
More detail lives in [docs/architecture.md](docs/architecture.md).
136175

137176
## Security baseline
138177

139-
This project is opinionated about launcher safety:
178+
This project is opinionated about runtime safety even in preview form:
140179

141180
- never trust a stale PID file by itself
142181
- verify runtime ownership before stop or reuse
@@ -145,12 +184,13 @@ This project is opinionated about launcher safety:
145184
- do not hardcode personal machine paths
146185
- do not globally fake another operating system
147186

148-
Read [docs/security.md](docs/security.md) before extending runtime control logic.
187+
Read [docs/security.md](docs/security.md) before extending runtime or desktop-launch logic.
149188

150189
## Repository layout
151190

152-
- `launcher/` launcher executable
153-
- `desktop/` desktop entry template and icon assets
191+
- `electron/` Electron-first intake plan and future desktop payload structure
192+
- `launcher/` browser fallback launcher
193+
- `desktop/` desktop entry templates and icon assets
154194
- `packaging/deb/` Debian packaging templates
155195
- `providers/` runtime/provider contract docs
156196
- `tests/` smoke tests and fixtures
@@ -171,6 +211,12 @@ Build a Debian package:
171211
make build-deb
172212
```
173213

214+
Install the repo-owned Electron dogfood launcher locally:
215+
216+
```bash
217+
make install-electron-local
218+
```
219+
174220
Read before contributing:
175221

176222
- [CONTRIBUTING.md](CONTRIBUTING.md)
@@ -179,13 +225,13 @@ Read before contributing:
179225

180226
## Design review questions
181227

182-
These are the intended pushback points:
228+
These are the intended pushback points now:
183229

184-
1. Is launcher-first still the right v1?
185-
2. Is the provider contract concrete enough?
186-
3. When should the exploratory repackager track graduate into an explicit milestone?
187-
4. Is the current browser-shell runtime boundary too narrow or appropriately conservative?
188-
5. What must be true before calling the project a public preview?
230+
1. Which parts of the working Electron desktop should be brought into the repo first?
231+
2. Where should the browser fallback stop being part of the default user story?
232+
3. How thin can the Ubuntu-specific patch layer stay while preserving the app feel people actually want?
233+
4. What must be true before the Electron path becomes the default shipped experience?
234+
5. What asset and distribution model is acceptable before broader release?
189235

190236
## License
191237

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Security policy
22

3-
`codex-ubuntu` is an unofficial Ubuntu launcher project, but it still handles:
3+
`codex-ubuntu` is an unofficial Ubuntu desktop project, but it still handles:
44

55
- local auth-bearing URLs
66
- process reuse and process termination
@@ -17,6 +17,7 @@ The current security focus is:
1717
- token redaction and log hygiene
1818
- XDG path handling
1919
- desktop integration correctness
20+
- safe fallback behavior while the Electron path is being built
2021

2122
## Reporting a vulnerability
2223

desktop/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# desktop
22

33
Desktop integration assets for `codex-ubuntu`.
4+
5+
This directory needs to serve both the future Electron desktop path and the current browser fallback utility without letting their app identities drift apart.

0 commit comments

Comments
 (0)