theseus/SESSION-PROMPT-identity-wallet.md

106 lines
5.5 KiB
Markdown
Raw Permalink Normal View History

Theseus UX batch: tabs, address history, password autofill MVP, home cards Six user-visible improvements + supporting infra, all uncommitted from the earlier session-in-progress state. Ships together in one release. Chrome / tabs - Same-size tabs: flex 1 1 0 with max 200px, min 60px. Container gets overflow: hidden so many tabs shrink evenly instead of scrolling out. - Drag-and-drop tab reordering. HTML5 drag events on each .tab; drop side chosen by pointer x within target (Chrome UX). New move-tab IPC splices the tabs array + re-emits. Address bar - Persistent history at userData/history.json capped at 500 LRU. Ranked by host-prefix > url-prefix > contains > title-contains > recency. - Floating suggestions dropdown (addressPicker WebContentsView) anchored under the URL bar. Debounced 80ms input; ArrowUp/Down forward to the picker via address-cursor IPC; Enter fires goURL; blur closes after 160ms so click-through registers. New files address-picker.html + address-picker-preload.js. Cleared by existing clearHistoryOnQuit. Password autofill (A.2 MVP) - Green key chip in the address bar appears when the vault is UNLOCKED and the active tab's host has matching credentials (exact hostname match for phase 1; eTLD+1 upgrade queued as A.2.5). - Click chip → floating picker of usernames. Click a match → main.js runs a small script in the active tab: finds first visible input[type=password]:not([disabled]), walks the same form for a visible text/email/tel/url/search input whose name/id/autocomplete matches /username|user|email|login|account|id/, fills both via the native value setter + dispatches input/change so React/Vue-controlled inputs update. New files pw-fill.html + pw-fill-preload.js. - emitPwAvailability fires from pushNav + vault setup/unlock/lock so the chip's visibility + count stays accurate. Bookmarks bar - Right-click context menu on the favorites bar. On empty area: "Add current page" (or "Remove current page" if already saved). On a specific bookmark: "Open", "Edit title…" (prompt), "Remove", plus the add/remove-current entry. Uses a shared .ctxmenu style mirroring the settings ctxmenu (dark/light aware). - Empty-state text updated to mention right-click. Home page - Larger responsive card grid: auto-fill minmax(260-280px, 1fr) with breakpoints at 600/900/1200. Cards have a subtitle line, a colored badge (on-chain / Sia / server / custom), and edit affordances that reveal only in Edit mode. - User-editable set: Edit toggle reveals per-card ✎/✕ + a dashed "+ Add card" tile. Modal for add/edit with title / URL / subtitle / badge. Reset-to-defaults button. - Persisted at userData/home-cards.json. New home-preload.js exposes window.home = { getCards, setCards, resetCards, navigate }. IPC handlers in main.js validate sender.getURL() matches our own home.html — third-party pages see the API shape via the preload but can't act on the user's local cards. - Fallback set of 2 cards renders when window.home is unavailable (e.g. opening home.html directly outside Electron for preview) so the grid is never blank. Docs - TheseusNavigator/ROADMAP-identity-wallet.md — the phased plan for the two independent strands (password manager A.2/3, browser wallet B.1-6). Committed earlier this session; re-listed here for context. - TheseusNavigator/SESSION-PROMPT-identity-wallet.md — pastable kickoff for the next session picking up either strand. Files added to build.files: address-picker.html, address-picker-preload.js, pw-fill.html, pw-fill-preload.js, home-preload.js.
2026-08-17 02:17:12 +02:00
# Session kickoff — identity + wallet work
Paste the block below into a fresh coding-CLI session started in
Theseus UX batch: tabs, address history, password autofill MVP, home cards Six user-visible improvements + supporting infra, all uncommitted from the earlier session-in-progress state. Ships together in one release. Chrome / tabs - Same-size tabs: flex 1 1 0 with max 200px, min 60px. Container gets overflow: hidden so many tabs shrink evenly instead of scrolling out. - Drag-and-drop tab reordering. HTML5 drag events on each .tab; drop side chosen by pointer x within target (Chrome UX). New move-tab IPC splices the tabs array + re-emits. Address bar - Persistent history at userData/history.json capped at 500 LRU. Ranked by host-prefix > url-prefix > contains > title-contains > recency. - Floating suggestions dropdown (addressPicker WebContentsView) anchored under the URL bar. Debounced 80ms input; ArrowUp/Down forward to the picker via address-cursor IPC; Enter fires goURL; blur closes after 160ms so click-through registers. New files address-picker.html + address-picker-preload.js. Cleared by existing clearHistoryOnQuit. Password autofill (A.2 MVP) - Green key chip in the address bar appears when the vault is UNLOCKED and the active tab's host has matching credentials (exact hostname match for phase 1; eTLD+1 upgrade queued as A.2.5). - Click chip → floating picker of usernames. Click a match → main.js runs a small script in the active tab: finds first visible input[type=password]:not([disabled]), walks the same form for a visible text/email/tel/url/search input whose name/id/autocomplete matches /username|user|email|login|account|id/, fills both via the native value setter + dispatches input/change so React/Vue-controlled inputs update. New files pw-fill.html + pw-fill-preload.js. - emitPwAvailability fires from pushNav + vault setup/unlock/lock so the chip's visibility + count stays accurate. Bookmarks bar - Right-click context menu on the favorites bar. On empty area: "Add current page" (or "Remove current page" if already saved). On a specific bookmark: "Open", "Edit title…" (prompt), "Remove", plus the add/remove-current entry. Uses a shared .ctxmenu style mirroring the settings ctxmenu (dark/light aware). - Empty-state text updated to mention right-click. Home page - Larger responsive card grid: auto-fill minmax(260-280px, 1fr) with breakpoints at 600/900/1200. Cards have a subtitle line, a colored badge (on-chain / Sia / server / custom), and edit affordances that reveal only in Edit mode. - User-editable set: Edit toggle reveals per-card ✎/✕ + a dashed "+ Add card" tile. Modal for add/edit with title / URL / subtitle / badge. Reset-to-defaults button. - Persisted at userData/home-cards.json. New home-preload.js exposes window.home = { getCards, setCards, resetCards, navigate }. IPC handlers in main.js validate sender.getURL() matches our own home.html — third-party pages see the API shape via the preload but can't act on the user's local cards. - Fallback set of 2 cards renders when window.home is unavailable (e.g. opening home.html directly outside Electron for preview) so the grid is never blank. Docs - TheseusNavigator/ROADMAP-identity-wallet.md — the phased plan for the two independent strands (password manager A.2/3, browser wallet B.1-6). Committed earlier this session; re-listed here for context. - TheseusNavigator/SESSION-PROMPT-identity-wallet.md — pastable kickoff for the next session picking up either strand. Files added to build.files: address-picker.html, address-picker-preload.js, pw-fill.html, pw-fill-preload.js, home-preload.js.
2026-08-17 02:17:12 +02:00
`D:\Dev\SilentMode`. Zero prior context needed.
---
You are picking up **identity + wallet** work on Silent Mode's **Theseus
Navigator** — the Electron browser with in-process BCNR resolution. Two
independent strands: **password manager** (phase 1 shipped, needs
autofill + Sia sync next) and **browser-integrated BCH wallet** (design
+ scaffold, then permissioned APIs). Both derive from the same BCH-style
seed via distinct hardened purpose subtrees.
**Read these first, in order, before touching anything:**
1. `HANDOFF.md` — session hand-off protocol + subproject index. Learn
the `PENDING.md` per-subproject convention, the session-naming rule,
and coordination guidance for concurrent sessions.
2. `TheseusNavigator/README.md` — scope + status of the browser.
3. `TheseusNavigator/PENDING.md` — current uncommitted work, grouped by
session. Read the other session's group FIRST so you don't stomp.
4. `TheseusNavigator/GOTCHAS.md` — non-obvious traps (`build.files`,
admin-terminal-for-first-build, native-select popup theme, DNS
hosts-pin for Sia upload, etc.). Save yourself an hour.
5. `TheseusNavigator/ROADMAP-identity-wallet.md` — the full roadmap for
both strands, sorted into small deliverables.
6. `TheseusNavigator/DESIGN-password-manager.md` — the crypto discipline
+ threat model. Any new derivation MUST reuse the "purpose subtree"
pattern documented there.
7. If you'll touch the wallet strand: read
`Argus/src/lib/register-tx.js` + `Argus/src/lib/wallet-web.js` to see
how the existing signing works, and `site/register.html` for how the
built-in wallet UI is currently invoked from a page.
8. `SESSION-CONTEXT.md` — the product context (BCNR terminology,
resolver rules, hosting model, on-chain invariants).
**What is already shipped (Theseus 0.0.3, `9c09955e…`):**
- Password vault + deterministic derivation (`Argus/src/lib/password-vault.js`,
12 tests passing).
- Settings > Passwords section: setup / locked / unlocked panels; add,
reveal, copy, delete entries. No autofill yet — users copy from
Settings and paste into sites.
- Everything from earlier UX rounds: shield security badge, three-tier
engine catalog, download tracker, cache/history storage settings,
fingerprint spoofing selects, theme cards.
**What has NOT been designed yet — flag these decisions before starting:**
- Wallet strand's permission model + API surface. Write
`TheseusNavigator/DESIGN-integrated-wallet.md` before B.2+ code.
- The autofill contentScript's origin-binding rule details (eTLD+1 via
public-suffix list — bundle the snapshot; do not fetch at runtime).
- Sia sync UX (user's own credentials vs operator relay). Design in the
A.3 write-up before code.
**Coordination:**
- A parallel session (labeled `parallel:*` in PENDING.md) has been very
active in this repo — mobile Ariadne, VPS infrastructure, docs, and
frequent snapshot commits. Look at `git log --oneline -20` before
touching a file to know if it recently changed. Commit small and often
so your working tree isn't a shared bucket.
- Use session label `YYYY-MM-DD:identity-wallet` in `PENDING.md` for
anything you leave uncommitted.
- Deploys are one-at-a-time. Check `PENDING.md` before starting one.
**Ship discipline (from `HANDOFF.md` and `GOTCHAS.md`):**
- Every new `WebContentsView` or `loadFile` — add the target file to
`TheseusNavigator/package.json` `build.files`. Verify present in
`dist-public/win-unpacked/resources/app.asar` after build (there's a
one-liner probe in `GOTCHAS.md`).
- Build: from `TheseusNavigator/`, `SOURCE_DATE_EPOCH=<epoch>
CSC_IDENTITY_AUTO_DISCOVERY=false npm run dist`. Admin terminal only
the first time on a fresh machine (winCodeSign symlinks).
- Ship sequence: backup live to `/opt/silent-mode/dl/_prev/`, scp new
`.exe`s + manifest, `node Argus/src/lib/sia-upload.js ../site
bns/silentmode`. Rollback commands documented in `PENDING.md` under
"Last shipment".
- On-chain `releases.silentmode.bch` publishes the manifest URL, not
fixed hashes — you don't need a wallet spend to make new hashes
reachable via BCNR unless the URL itself changes.
**Where to start (pick one, in order of user demand):**
1. **A.2 — password autofill.** The user-visible next step. Small enough
to ship in one round. Users are currently copying passwords from
Settings; autofill removes that friction. Design detail is in
`ROADMAP-identity-wallet.md`.
2. **B.1 — wallet design doc.** No code yet. Write
`DESIGN-integrated-wallet.md`, get user alignment on the permission
model, then B.2 (injection scaffold + read-only APIs).
3. **A.3 — Sia backup.** Small feature, unlocks cross-device story.
Blocks on user picking "own creds vs operator relay" default.
**Then tell me what you want to do.** If unspecified, start with A.2
(autofill) — it's the highest-leverage next step in Strand A and the
crypto foundation is already tested + shipped.
**Conventions:**
- Prefix shell commands with `rtk` (user convention, see
`~/.claude/CLAUDE.md`).
- Windows + PowerShell primary; Bash tool available for POSIX.
- Chipnet only unless explicitly directed to touch mainnet.
- Never ship secrets (`Argus/wallets.json`, `sia-s3.json`,
`ca/root-ca.key`). The build enforces this; don't weaken the check.
- Never put the operator's name or email in any file.
- Recovery phrases, elevated steps, captchas, and on-chain wallet
spends are the user's to perform — hand off with exact commands.