Desktop client: setup reliability, onboarding, wallet, chat, and UI overhaul - #798
Desktop client: setup reliability, onboarding, wallet, chat, and UI overhaul#798cowboycoderhq wants to merge 1 commit into
Conversation
…verhaul Consolidated ui-desktop improvements plus one proxy-router fix. - setup/orchestrator: reliable first-run install and boot on a clean machine — restore executable bits on extracted binaries, recover from interrupted installs, allow cold model/chain startup enough time, make IPFS/Docker non-blocking; run our own proxy-router when the configured port is held by a foreign/containerized one; reap orphaned services after a crash. - onboarding: plain-language new-wallet wizard with structural Back navigation, tap-to-verify recovery phrase, and content-based wallet-import routing. - wallet: complete the send path (transfers, fails loudly, blocks zero-address and over-balance sends, confirmation step); price MOR with the MOR rate; safe reset when the router is down; self-heal the router signing wallet at login. - chat: client-owned conversation history; faster marketplace load; show the serving provider and real stake; sortable model picker; clearer provider errors; corrected session-duration floor. - proxy-router: restore chat_id history on load (a JSON round-trip dropped it), with a regression test. - ui: refreshed design system (one theme source of truth, self-hosted fonts, consistent money-surface treatment) across all screens. - security: redact secrets from logs and setup diagnostics. - deps: styled-components 4 -> 5. Provider registration is present but disabled (Coming soon) pending end-to-end verification of its on-chain path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nomadicrogue
left a comment
There was a problem hiding this comment.
@cowboycoderhq ...Thanks for putting this together — and welcome. There’s a lot of real product value here: the first-run/setup reliability work (exec bits, interrupted installs, longer cold-start probes, free-port handling, orphan reap), the wallet send path actually failing loudly, client-owned chat history, and the proxy-router chat_id history round-trip fix are all problems we’ve felt.
I pulled the branch locally, typechecked/built ui-desktop on macOS arm64, and got through download → proxy-router healthy → local chat with the new Qwen model. Appreciate the thoroughness and the offer to split the reviews...I'll take you up on that :-)
This is a large single commit with several different risk profiles mixed together. We typically work on one component at a time. For reviewability, rollback, and a first contribution, please split into three PRs in this order:
PR 1 — proxy-router only
The AppendChatHistory JSON round-trip fix + regression test, and related router defaults.
Chat context (please include in this PR): change the proxy-router default so PROXY_FORWARD_CHAT_CONTEXT is false when unset (today config.go defaults it to true). Leaving FORWARD on by default was not the intended long-term behavior, and fixing history load while FORWARD stays on will surprise any client that already sends a full OpenAI-style transcript (duplicated context).
Intended architecture (what the desktop client already does in this branch):
- Client owns the conversation transcript — each /v1/chat/completions request sends the full messages[] the model should see.
PROXY_STORE_CHAT_CONTEXT=true — keep storing turns for the history drawer / /v1/chats/:id.PROXY_FORWARD_CHAT_CONTEXT=false — router must not prepend stored history on top of the client payload.
So “chat memory works” is a client/UI responsibility: send [...priorTurns, newMessage] in the body, keep chat_id for storage/title/drawer, leave FORWARD off. CLI / other API clients should follow the same pattern; FORWARD can remain an explicit opt-in for unusual clients that send only the latest turn.
Please flip the router default to false and call out the default change in the PR description.
PR 2 — UI functional changes
Everything that makes the desktop client work better without changing look and feel: setup/orchestrator reliability, onboarding flows, wallet send path, chat behavior (client-owned transcript, marketplace/session fixes), local model swap (TinyLlama → Qwen), secret redaction, etc.
Also in this PR (not later): docs scrub for the model swap. Search tinyllama / TinyLlama across docs/, readme.md, and AGENTS.md and update in the same PR so docs and functionality don’t diverge. House rule: if you add or change user-facing functionality, doc updates land with it.
PR 3 — UI visual / design-system work (optional, separate)
On a local run the app felt like a different product: cyan/turquoise accent, monospace-heavy HUD look, glass/glow surfaces. The existing Morpheus green/dark look is intentional brand, and most UX bugs didn’t require a full “Aurora/JARVIS” reskin.
Please keep visual work out of PRs 1–2. If you want to propose a design direction, do it here with before/after screenshots — we’re open to discussing it, but it shouldn’t block the functional fixes.
Security / trust (please address in PR 2)
healRouterWallet auto-POSTs the Keychain mnemonic to /wallet/mnemonic on login. Combined with adopting any listener on the default API port that returns a readable cookie path, that’s a real local trust issue (same-machine / TOCTOU). Please only heal a router this process spawned (or require explicit user confirmation), and don’t treat “cookie path is readable” as sufficient to adopt a foreign process.
Related from our dirty-machine smoke test: ProcessFactory happily adopted a stale llama-server still pointed at a deleted model because /health returned ok. Same class of bug — port/health ≠ our current binary/config.
Builds
I only exercised macOS arm64 locally. GitHub checks haven’t run on this fork branch yet; once workflows are approved, the usual UI build jobs are enough for us (when we send from dev to test branch, the ci will build all test releases that we can work through before a main release)
Again: the reliability and wallet/chat fixes are genuinely useful. Happy to re-review as three PRs — router first, then UI function (+ docs), then visual if desired.
|
Makes sense — splitting into three as you asked, router first. PR 1 → #804 is proxy-router only: the PR 2 (UI functional — setup/orchestrator reliability, wallet send path, client-owned transcript, TinyLlama→Qwen swap + the docs scrub, secret redaction, and the I'll close this in favor of the split so it doesn't sit stale — let me know if you'd rather keep it open as a tracking umbrella. |
Summary
A consolidated set of desktop client (
ui-desktop) improvements plus oneproxy-routerfix, focused on making a first-run install work reliably for non-technical users and completing several half-wired flows. Opened againstdevper the contribution pipeline.Setup / first-run reliability
llama-server/ipfsnon-runnable on a clean install).Onboarding
Wallet
Chat
proxy-router
chat_idhistory on load — a JSON round-trip dropped stored history for every client that relies on it. Includes a regression test.UI
Deps
Testing
Built as a signed/notarized DMG and validated end-to-end on a clean machine: fresh install → setup → all services healthy → onboarding → populated wallet, with no errors. Typecheck + build verified against
dev.Notes
proxy-routerhistory fix and the setup-reliability fixes stand alone) if that's easier to review.🤖 Generated with Claude Code