Commit Graph

138 Commits

Author SHA1 Message Date
Sanju Sivalingam
16f581f479 feat(android): wire voice recording and transcript into ConnectionService 2026-02-20 02:11:41 +05:30
Sanju Sivalingam
07f608a901 feat(android): expand AgentOverlay with voice mode state machine 2026-02-20 02:10:00 +05:30
Sanju Sivalingam
7b685b1b0f feat(android): add voice overlay UI with transcript and action buttons 2026-02-20 02:08:00 +05:30
Sanju Sivalingam
2c10e61390 feat(android): add animated gradient border composable 2026-02-20 02:07:02 +05:30
Sanju Sivalingam
36ffb15f39 feat(android): add VoiceRecorder with AudioRecord PCM streaming 2026-02-20 02:06:10 +05:30
Sanju Sivalingam
2986766d41 feat(android): add voice protocol models and overlay mode enum 2026-02-20 02:05:06 +05:30
Sanju Sivalingam
3522b66b02 feat(server): wire voice messages into device handler 2026-02-20 01:59:50 +05:30
Sanju Sivalingam
63276d3573 feat(server): add voice session handler with Groq Whisper STT 2026-02-20 01:57:53 +05:30
Sanju Sivalingam
4a128f7719 feat(shared): add voice overlay protocol types 2026-02-20 01:55:40 +05:30
Sanju Sivalingam
669aa3d9b1 docs: add voice overlay implementation plan
11 tasks covering shared protocol types, server Groq Whisper STT handler,
Android VoiceRecorder, gradient border overlay, voice panel UI, AgentOverlay
state machine, ConnectionService wiring, and permission handling.
2026-02-20 01:52:40 +05:30
Sanju Sivalingam
eae221b904 docs: add voice overlay design document
Design for voice-activated overlay feature — tap floating pill to activate
voice mode, stream audio to server for Groq Whisper STT, show live
transcription on screen with glowing gradient border, send as goal.
2026-02-20 01:46:49 +05:30
Sanju Sivalingam
fcda17109b update readme 2026-02-19 08:23:25 +05:30
Somasundaram Mahesh
e1bc16397e Revert "feat(android): make battery optimization permission optional"
This reverts commit 795e0299fa.
2026-02-19 00:56:28 +05:30
Somasundaram Mahesh
795e0299fa feat(android): make battery optimization permission optional
Remove battery exemption from required permissions gate in onboarding
and permission status bar — it is now informational only and does not
block "Get Started" or the all-permissions indicator.

Bump download links to v0.3.2.
2026-02-19 00:34:12 +05:30
Sanju Sivalingam
0b5a447c4d feat: replace get started button with open dashboard link 2026-02-19 00:19:02 +05:30
Sanju Sivalingam
d35d685c3f feat: add APK download links and launch banner across site, web, and README 2026-02-18 23:56:38 +05:30
Sanju Sivalingam
a3a50539be chore: trigger deployment 2026-02-18 23:41:51 +05:30
Sanju Sivalingam
b3ade24e38 fix: update email sender name and switch to production Polar checkout link 2026-02-18 23:33:54 +05:30
Sanju Sivalingam
ce6d1e320b fix: handle Polar activation limit gracefully + switch checkout to command pattern
- Server: wrap licenseKeys.activate() in try/catch — if activation limit
  reached, treat as already-activated and proceed to store the key
- Web: switch activateFromCheckout from form() to command() pattern for
  programmatic invocation with proper error handling
- Activate page: auto-fires on mount, shows spinner/error states, retry button
2026-02-18 23:28:19 +05:30
Sanju Sivalingam
e9d1c863e1 fix: self-hosted useSend support + purchase-first activate UX
- Pass USESEND_BASE_URL to UseSend SDK for self-hosted instances
- Add debug logging for email sends
- Redesign activate page: prominent Purchase Now button, collapsible license key input
v0.3.1
2026-02-18 23:08:27 +05:30
Sanju Sivalingam
9b2ca21d28 fix: address code review issues for email verification
- Use $env/dynamic/private instead of process.env (SvelteKit convention)
- Fail fast if USESEND_API_KEY is missing
- Await sendEmail with try/catch + console.error (was silently discarded)
- Fallback for user.name in email greeting
- Fix open redirect on login redirect param
2026-02-18 23:08:27 +05:30
Sanju Sivalingam
7b5685cc25 feat: add Umami analytics tracking across web app
Add centralized event tracking with consistent naming convention.
Tracks auth flows, license activation, device interactions, API key
management, settings, and navigation for conversion analysis.
2026-02-18 23:08:27 +05:30
Sanju Sivalingam
caf9862f4f feat: handle unverified login with redirect to verify-email 2026-02-18 23:08:27 +05:30
Sanju Sivalingam
8b614dac95 feat: redirect signup to verify-email page 2026-02-18 23:08:27 +05:30
Sanju Sivalingam
8783fe90a3 feat: wire email verification into better-auth config 2026-02-18 23:08:27 +05:30
Sanju Sivalingam
7125aed49f feat: add email helper module using useSend SDK 2026-02-18 23:08:27 +05:30
Sanju Sivalingam
8748e7a28b feat: add usesend-js dependency for email verification 2026-02-18 23:08:27 +05:30
Sanju Sivalingam
b34088ceb7 feat: Polar license key integration and dashboard UI improvements
- Add license activation flow: server validates/activates keys via Polar SDK
- Auto-activate from Polar checkout redirect (checkout_id in URL)
- Gate dashboard behind license activation (redirect to /activate if no plan)
- Preserve redirect URL through login flow for post-purchase activation
- Show plan status badge in sidebar and overview page
- Add account section to settings (email, plan, license key)
- Add svelte-sonner toasts with custom black theme and iconify icons
- Improve validation messages across all forms
- Update API key prefix to droidclaw_
- Add cursor pointer globally for clickable elements
- Support Polar sandbox mode via POLAR_SANDBOX env flag
2026-02-18 23:08:27 +05:30
Somasundaram Mahesh
5aace17096 feat(overlay): tap floating button to return to app
Detect taps vs drags in the overlay touch handler — if movement is
under 10px, launch MainActivity with REORDER_TO_FRONT so tapping
the pill from any other app brings DroidClaw back into focus.
2026-02-18 23:08:07 +05:30
Somasundaram Mahesh
4199143de8 feat(android): UI overhaul — branded theme, onboarding, chat-style home
- Replace default purple Material 3 theme with logo-derived palette
  (crimson red primary, dark charcoal surfaces, golden accent)
- Add Instrument Serif + Inter fonts for custom typography scale
- Add first-launch onboarding flow (API key + server URL, permissions)
- Restructure navigation: 2-tab bottom nav (Home + Settings), logs
  via top bar icon, permission status indicators in top bar
- Redesign HomeScreen as chat-style interface with goal/step bubbles,
  auto-scroll, bottom input bar with send/stop buttons
- Redesign SettingsScreen with Server → Connection → Permissions sections
- Redesign LogsScreen with goal banner, step badges, timestamps
- Replace default Android icon with DroidClaw logo at all densities
- Add hasOnboarded DataStore flag with auto-connect on completion
- Fix logs navigation not clearing when switching bottom tabs
2026-02-18 22:09:32 +05:30
Sanju Sivalingam
59ee665088 revert: remove workflow automation, keep overlay and stop_goal
Remove all workflow-related code from PR #6 (input classifier,
workflow parser, notification listener, workflow CRUD handlers).
Keep the overlay, stop_goal, AbortSignal threading, and OkHttp
engine switch. Add v2 design doc for safer workflow implementation.
2026-02-18 20:39:04 +05:30
Somasundaram M
d8659cfe17 Merge pull request #6 from msomu/feat/overlay-and-state-persistence
feat: agent overlay, stability fixes, and workflow automation
2026-02-18 18:53:49 +05:30
Somasundaram Mahesh
4d4b7059e4 feat: workflow automation via NotificationListenerService
Add workflow system that lets users describe automations in natural
language through the same input field. The server LLM classifies
input as either an immediate goal or a workflow rule, then:

- Parses workflow descriptions into structured trigger conditions
- Stores workflows per-user in Postgres
- Syncs workflows to device via WebSocket
- NotificationListenerService monitors notifications and triggers
  matching workflows as agent goals

Also cleans up overlay text and adds network security config.
2026-02-18 18:51:25 +05:30
Somasundaram Mahesh
45766621f2 fix(android): switch Ktor CIO engine to OkHttp for stable background WebSocket
CIO uses Java NIO selectors which Android's power management freezes
when the app is backgrounded, dropping the WebSocket connection. OkHttp
is Android-native and maintains connections through the OS network stack.
2026-02-18 18:51:24 +05:30
Somasundaram Mahesh
0b36d92fef fix: thread AbortSignal through LLM calls so stop_goal cancels immediately
The agent loop checked signal.aborted only at the top of each iteration,
but the LLM fetch() call (which takes seconds) never received the signal.
Now the signal is passed to fetch() and checked after LLM errors and
before the inter-step sleep, so aborting takes effect mid-step.
2026-02-18 18:51:01 +05:30
Somasundaram Mahesh
011e2be291 feat: agent overlay, stop-goal support, and state persistence across app kill
- Add draggable agent overlay pill (status dot + step text + stop button)
  that shows over other apps while connected. Fix ComposeView rendering
  in service context by providing a SavedStateRegistryOwner.
- Add stop_goal protocol message so the overlay/client can abort a
  running agent session; server aborts via AbortController.
- Persist screen-capture consent to SharedPreferences so it survives
  process death; restore on ConnectionService connect and Settings resume.
- Query AccessibilityManager for real service state instead of relying
  on in-process MutableStateFlow that resets on restart.
- Add overlay permission checklist item and SYSTEM_ALERT_WINDOW manifest
  entry.
- Filter DroidClaw's own overlay nodes from the accessibility tree so the
  agent never interacts with them.
2026-02-18 18:51:01 +05:30
Sanju Sivalingam
88af77ddc7 fix: configure postgres idle timeout and connection recycling for Railway
Railway proxy closes idle DB connections after ~60s, causing
CONNECTION_CLOSED errors on stale sockets. Set idle_timeout=20s and
max_lifetime=5m so postgres-js recycles connections before they die.

Also fix sendCommand to fall back to persistent device ID on reconnect.
2026-02-18 13:56:34 +05:30
Sanju Sivalingam
3bab84f611 fix(auth): use internal secret for web→server calls instead of cookie forwarding
Cookie forwarding between dash.droidclaw.ai and tunnel.droidclaw.ai was
unreliable. Now the web app passes userId + shared internal secret via
headers. Also removes debug logging from device auth and session middleware.
2026-02-18 12:40:49 +05:30
Sanju Sivalingam
562d4095f0 fix(android): prevent save button from disappearing during API key editing
DataStore flow re-emissions were resetting editingApiKey via remember(apiKey),
hiding the save button mid-edit. Now uses null sentinel to track edit state
independently from stored value.
2026-02-18 12:32:26 +05:30
Sanju Sivalingam
8ef15af97a debug: add logging to device auth for hash mismatch investigation 2026-02-18 12:27:56 +05:30
Sanju Sivalingam
05d1cc657d fix code 2026-02-18 12:01:23 +05:30
Sanju Sivalingam
d03be7365e debug: add logging to session middleware for auth investigation 2026-02-18 11:59:59 +05:30
Sanju Sivalingam
68ca812267 revert(server): use direct DB queries for all auth validation
Reverts middleware and dashboard WS to direct DB session lookups.
Replaces auth.api.verifyApiKey in device WS with direct DB query
using SHA-256 hash matching, removing dependency on BETTER_AUTH_SECRET
for auth validation.
2026-02-18 11:46:48 +05:30
Sanju Sivalingam
a865c1e2f0 fix(android): add explicit connect/request timeouts to WebSocket client
CIO engine had no timeout config, causing connect failures on slower networks.
2026-02-18 11:31:47 +05:30
Sanju Sivalingam
a1ec1ac731 fix(agent): use device screen dimensions for scroll/swipe coordinates
Swipe coordinates were hardcoded for 1080x2400 screens, causing scrolls
to fail on devices with different resolutions. Now reads screenWidth and
screenHeight from DeviceInfo and computes coordinates proportionally.
2026-02-18 10:48:37 +05:30
Sanju Sivalingam
81d78684a5 refactor: use better-auth api for session validation in server middleware and websocket 2026-02-18 10:38:15 +05:30
Sanju Sivalingam
22b13bec2f update android app default server url to production 2026-02-18 10:25:42 +05:30
Sanju Sivalingam
22481c8834 add health endpoint to web app 2026-02-18 10:08:25 +05:30
Sanju Sivalingam
071b3960a7 add start:server script to root package.json 2026-02-18 09:38:04 +05:30
Sanju Sivalingam
7a2a1186a2 use bun instead of node for web start script 2026-02-18 09:31:16 +05:30