feat: consolidated UI polish, SPA routing, projects island, tests #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_consolidated"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consolidates PRs #11, #15, #18 into one PR.
UI polish (from #18)
SPA routing (covers #15)
Projects island (from #11)
Testing
Supersedes #11, #15, #18
Verified: 19/19 services on heroos.gent02.grid.tf, SPA routing works
Session persistence: - Save session token to localStorage on successful login (login_screen.rs) - Restore session on app mount: validate saved token with backend; if valid, skip login screen; if expired/revoked, clear token and show login - Logout handler: revoke token on server (fire-and-forget) + clear from localStorage so the next page load shows the login screen Friendly error messages (auth_service.rs): - Add user_message() helper: ClientError::Rpc(-32000, msg) returns the server message directly (e.g. "Invalid credentials", "Too many failed attempts"); all other errors return "Connection error. Please try again." - Replace format!("Authentication failed: {}", e) with user_message() in all auth operations (get_challenge, login, validate_session, logout) - Import ClientError from hero_osis_sdk::identity Storage (storage.rs): - Add save_session_token() / load_session_token() / clear_session_token() backed by localStorage key "hero_os_session_token" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Latest push adds session persistence and friendly error messages.
Session persistence (
a592cb7):hero_os_session_tokenin localStorage on loginFriendly errors:
ClientError::Rpc(-32000, msg)→ showsmsgdirectly ("Invalid credentials", "Too many failed attempts", etc.)URL doubling: Investigated but could not reproduce from code review — the proxy prefix detection in
config.rsand the SPA routing inhero_os_httpappear correct. The fix in commit9cfe067(detect hero_proxy prefix) and8330b43(books URL routing) may have already resolved the known cases. If a specific reproduction case is observed in production, please add details here.- page.goto("/") with HERO_OS_URL=https://heroos.gent02.grid.tf resolves to proxy root (returns JSON, not HTML) — WASM never loads, all tests fail - Change all app.spec.ts page.goto("/") to page.goto("/login") which follows the 302 redirect to /hero_os_http/login correctly - api.spec.ts: skip GET / HTML assertions when running against a proxy (non-localhost) since proxy root returns service-list JSON, not hero_os_http HTML - Makefile e2e-remote: use heroos.gent02.grid.tf (no /hero_os_http suffix) so /login and other paths resolve against the gateway root Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>The books island in production builds prior to the class fix uses inline styles only. Detect .books-island class presence at runtime and fall back to unique emoji-prefixed nav buttons (🏠 Home, ⚙ Settings) to avoid false failures. Future builds include the class (hero_archipelagos f1822a7). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>hero_osis_server only listens on Unix socket in the container, not TCP. Rewrite /rpc/{context} proxy to forward JSON-RPC over the Unix socket at ~/hero/var/sockets/{context}/hero_osis_server.sock. Remove reqwest dep. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>- hero_os_http /rpc/{context} proxy: use Unix socket instead of reqwest HTTP (hero_osis doesn't listen on TCP in container) - config.rs: route RPC to /hero_osis_ui instead of /hero_osis_http (proxy path matches socket name hero_osis_ui.sock) - Also detect /hero_os_ui path prefix for future socket rename - Remove unused reqwest dependency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>