Phase 5 — Auth/Session + Mobile Responsive + Error Handling #240

Closed
opened 2026-07-15 11:38:51 +00:00 by Mark · 0 comments
Owner

Phase 5: Auth/Session + Mobile Responsive + Error Handling

Goal: Add basic authentication/session management, ensure the UI works well on mobile devices, and polish error handling with retry capabilities.

Approach candidates:

  • Session tokens via existing Flask session infrastructure (server-side sessions)
  • Simple login page or API-key-based auth, with token stored in sessionStorage
  • Mobile-first CSS with flexbox/grid layout, media queries for breakpoints
  • Error toast/snackbar component for transient errors
  • Retry button on failed messages (re-send to active thread)

Outputs:

  • runtime/static/login.html — minimal login page (if auth is implemented)
  • runtime/static/js/auth.js — auth/session client: login, token refresh, session check
  • Update runtime/static/css/chat.css — responsive breakpoints, mobile layout
  • Update runtime/ws_handler.py — auth verification on WebSocket connect
  • Error handling component in runtime/static/js/chat.js
  • Tests in tests/integration/test_auth_session.py and tests/integration/test_mobile_responsive.py

Acceptance criteria:

  • User must authenticate before accessing the chat UI
  • Session persists across page reloads (within session lifetime)
  • Session expires after configurable idle timeout
  • UI renders correctly on mobile (viewport ≤ 480px): sidebar collapses, messages full-width, input bar at bottom
  • Touch interactions work (tap to send, swipe to show sidebar, scroll chat history)
  • Network errors show a non-disruptive toast notification
  • Failed message delivery shows retry button; clicking retry re-sends via WebSocket
  • Loading states shown during initial page load and reconnection
  • Rate limit errors display a friendly "slow down" message with retry-after countdown

Files touched: runtime/ws_handler.py (amend — auth on connect), runtime/static/login.html (create), runtime/static/js/auth.js (create), runtime/static/index.html (amend — auth check), runtime/static/js/chat.js (amend — error/retry), `runtime/sta


Decomposed from mesh-seed#133

## Phase 5: Auth/Session + Mobile Responsive + Error Handling **Goal:** Add basic authentication/session management, ensure the UI works well on mobile devices, and polish error handling with retry capabilities. **Approach candidates:** - Session tokens via existing Flask session infrastructure (server-side sessions) - Simple login page or API-key-based auth, with token stored in sessionStorage - Mobile-first CSS with flexbox/grid layout, media queries for breakpoints - Error toast/snackbar component for transient errors - Retry button on failed messages (re-send to active thread) **Outputs:** - `runtime/static/login.html` — minimal login page (if auth is implemented) - `runtime/static/js/auth.js` — auth/session client: login, token refresh, session check - Update `runtime/static/css/chat.css` — responsive breakpoints, mobile layout - Update `runtime/ws_handler.py` — auth verification on WebSocket connect - Error handling component in `runtime/static/js/chat.js` - Tests in `tests/integration/test_auth_session.py` and `tests/integration/test_mobile_responsive.py` **Acceptance criteria:** - [ ] User must authenticate before accessing the chat UI - [ ] Session persists across page reloads (within session lifetime) - [ ] Session expires after configurable idle timeout - [ ] UI renders correctly on mobile (viewport ≤ 480px): sidebar collapses, messages full-width, input bar at bottom - [ ] Touch interactions work (tap to send, swipe to show sidebar, scroll chat history) - [ ] Network errors show a non-disruptive toast notification - [ ] Failed message delivery shows retry button; clicking retry re-sends via WebSocket - [ ] Loading states shown during initial page load and reconnection - [ ] Rate limit errors display a friendly "slow down" message with retry-after countdown **Files touched:** `runtime/ws_handler.py` (amend — auth on connect), `runtime/static/login.html` (create), `runtime/static/js/auth.js` (create), `runtime/static/index.html` (amend — auth check), `runtime/static/js/chat.js` (amend — error/retry), `runtime/sta --- _Decomposed from [mesh-seed#133](https://forgejo.tail018ac4.ts.net/Mark/mesh-seed/issues/133)_
Mark changed title from Decompose: CONV-003: Web Chat Interface — Phase 5: Auth/Session + Mobile Responsive + Error Handling to Phase 5 — Auth/Session + Mobile Responsive + Error Handling 2026-07-15 11:39:39 +00:00
Mark closed this issue 2026-08-13 06:37:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#240
No description provided.