hephaestus/heph-pwa
Erich Blume ebb2366236 feat(attention): set bands directly as a1–a4 instead of cycling
Retire the `A` attention cycle and the duplicate `b` push-to-blue gesture
in heph-tui. Attention is now picked directly: press `a` then `1`–`4`
(a1=red, a2=orange, a3=white, a4=blue, ordered by intensity). Cycling past
blue used to make a task vanish from the current view with no way back —
direct selection never does. Quick-add moves from `a` to `n`.

Surface the a1–a4 nomenclature everywhere instead of colour words or the
old p1–p4 priorities: heph-tui status/legend, the heph-quickadd chip + hint,
and the PWA chip/hint plus a new band-picker (replacing its cycle button).
The shared quick-add parser now accepts `a1`–`a4` (a1=red … a4=blue) and no
longer recognizes `p1`–`p4`. Colour mappings are unchanged; only the words.

Add Attention::ui_label() in heph-core so both Rust surfaces share the
mapping; bump the PWA service-worker cache; update the PWA how-to.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 07:50:53 -07:00
..
icons feat(heph-pwa): mobile app shell — views, quick-add, triage, search, voice 2026-06-04 16:59:37 -07:00
src feat(attention): set bands directly as a1–a4 instead of cycling 2026-06-09 07:50:53 -07:00
test feat(attention): set bands directly as a1–a4 instead of cycling 2026-06-09 07:50:53 -07:00
index.html feat(heph-pwa): mobile app shell — views, quick-add, triage, search, voice 2026-06-04 16:59:37 -07:00
manifest.webmanifest feat(heph-pwa): mobile app shell — views, quick-add, triage, search, voice 2026-06-04 16:59:37 -07:00
README.md feat(heph-pwa): mobile app shell — views, quick-add, triage, search, voice 2026-06-04 16:59:37 -07:00
styles.css feat(heph-pwa): Login with Authentik (Authorization Code + PKCE) 2026-06-05 07:17:05 -07:00
sw.js feat(attention): set bands directly as a1–a4 instead of cycling 2026-06-09 07:50:53 -07:00

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.js are faithful ports of the Rust hephd::quickadd / hephd::datespec modules, 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.