generated from eblume/project-template
|
All checks were successful
Build / validate (pull_request) Successful in 6m31s
Replace the manual bearer-token paste with a proper browser OIDC sign-in.
- Hub: unauthenticated GET /config -> {issuer, client_id} (added after the auth
layer), sourced from the verifier's new TokenVerifier::oidc_config(). Lets the
PWA self-configure when served from the hub. Tests in web_serve.rs.
- PWA: src/oauth.js implements PKCE (S256), the authorize redirect, the callback
token exchange, and silent refresh (offline_access). Settings gains a "Login
with Authentik" button (manual token kept under a fallback disclosure); rpc.js
retries once on 401 via a refresh hook; app.js completes the callback / refreshes
on load; sw.js skips caching the callback URL and ships oauth.js in the shell.
Requires the PWA origin registered as a redirect URI on the Authentik provider.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| icons | ||
| src | ||
| test | ||
| index.html | ||
| manifest.webmanifest | ||
| README.md | ||
| styles.css | ||
| sw.js | ||
heph-pwa
A phone-first, installable Progressive Web App that mirrors heph-tui:
browse the built-in views and projects, triage tasks, and — the primary use
case — capture tasks fast with the same quick-add syntax as the TUI's a /
Cmd-' popover. Context/KB is read-only here.
Full guide: docs/how-to/heph-pwa.md.
What it is
- Thin, online-only client. Every read/write is a JSON-RPC call to a
server-mode
hephd(the sync hub). No local replica, no offline write queue. - Buildless. Plain ES modules, no bundler, no
npm install. Serve the directory and go. - Same parser as the TUI.
src/quickadd.js+src/datespec.jsare faithful ports of the Rusthephd::quickadd/hephd::datespecmodules, verified by parity tests against the original Rust unit cases.
Layout
index.html # app shell
styles.css # dark, terminal-flavored, touch-tuned
manifest.webmanifest # PWA manifest (installable)
sw.js # service worker — caches the app shell for offline launch
icons/ # app icons (svg + rasterized png, incl. maskable)
src/
app.js # UI controller: views, list, quick-add, triage, search, voice
rpc.js # hephd JSON-RPC-over-HTTP client + settings (localStorage)
quickadd.js # quick-add parser (port of quickadd.rs)
datespec.js # date + recurrence parser (port of datespec.rs)
fmt.js # display helpers (date chips, attention colors, bullets)
test/
parsers.test.mjs # parity tests for the parser ports
Run it
Serve from the hub (recommended — same-origin, no CORS):
hephd --mode server --http-addr 0.0.0.0:8787 --web-root /path/to/heph-pwa
# then open http://<host>:8787/ on your phone and Add to Home Screen
Or from any static server (the hub now sends CORS headers, so cross-origin
/rpc calls work); set the hub URL in the app's Settings screen.
Test
node --test heph-pwa/test/parsers.test.mjs
Status / next steps
First cut (C1). Known gaps, roughly in priority order:
- In-app OIDC device-code login (today: paste a bearer token in Settings).
- Offline write queue / CRDT replica (today: online-only).
- Read-only context could grow wiki-link navigation.
- A native Swift wrapper, if/when an Apple Developer account is in play.