Commit Graph

104 Commits

Author SHA1 Message Date
Steve Korshakov
bf15353dd0 fix: fix cors 2025-08-27 00:01:57 -07:00
Steve Korshakov
13a6e4a0a9 ref: update scope 2025-08-26 23:52:16 -07:00
Steve Korshakov
42f2f30b6a feat: remove avatar on GitHub disconnect
Update GitHub disconnect endpoint to also remove user avatar:
- Clear avatar field in database (set to Prisma.JsonNull)
- Include avatar removal in account update broadcast
- Update logging to reflect avatar removal

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 23:38:09 -07:00
Steve Korshakov
5269de150a feat: add GitHub account disconnect endpoint
Add DELETE /v1/connect/github endpoint to disconnect GitHub accounts by:
- Deleting GitHub user token from database
- Removing account link (githubUserId = null)
- Broadcasting disconnect event to connected clients
- Using database transaction for atomicity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 23:18:05 -07:00
Steve Korshakov
2d1ce37a59 fix: fix upload path 2025-08-26 23:03:43 -07:00
Steve Korshakov
9ad11b8f9e feat: resolve public url for avatar 2025-08-26 22:39:28 -07:00
Steve Korshakov
4a8f7447e9 debug: add logs 2025-08-26 22:21:31 -07:00
Steve Korshakov
a5fcf38d6d feat: handle avatar, first name and last name 2025-08-26 22:17:11 -07:00
Steve Korshakov
86c0a03bfc fix: fix image 2025-08-26 21:56:03 -07:00
Steve Korshakov
8156f958a3 fix: fix missing deps 2025-08-26 21:54:13 -07:00
Steve Korshakov
83ef6a13c2 fix: trying to fix tweetnacl again 2025-08-26 21:52:13 -07:00
Steve Korshakov
d92a421259 wip: add files, fix tweetnacl in esm 2025-08-26 21:46:55 -07:00
Steve Korshakov
65d83403cd fix: github fix 2025-08-26 21:07:17 -07:00
Steve Korshakov
838ba63c89 fix: fix github verifier 2025-08-26 21:03:31 -07:00
Steve Korshakov
25d64f8edd fix: api 2025-08-26 20:57:12 -07:00
Steve Korshakov
382f531d72 fix: fix logger 2025-08-26 20:53:33 -07:00
Steve Korshakov
f8cd32b4f4 debug: more state logging 2025-08-26 20:51:45 -07:00
Steve Korshakov
4040325524 fix: better logger 2025-08-26 20:48:27 -07:00
Steve Korshakov
25724eac23 wip: add some error logging to the server 2025-08-26 20:47:38 -07:00
Steve Korshakov
8158668190 wip: working on account profile 2025-08-26 20:39:55 -07:00
Steve Korshakov
305f91c6bd feat: healthcheck 2025-08-26 20:23:00 -07:00
Steve Korshakov
db3ac97813 fix: fix octokit 2025-08-26 20:13:06 -07:00
Steve Korshakov
0f9e7ca044 Merge branch 'main' of https://github.com/slopus/happy-server 2025-08-26 20:08:38 -07:00
Steve Korshakov
941c0ef71e wip: github integration 2025-08-26 20:08:13 -07:00
Kirill Dubovitskiy
f2e6d9c6ec fix: default create machines in inactive state - since we now create them even if the daemon is not running 2025-08-21 01:33:31 -07:00
Steve Korshakov
57d183d652 feat: add db metrics 2025-08-19 23:13:23 -07:00
Steve Korshakov
28ed0f8b40 ref: remove last message (it is useless) 2025-08-19 22:56:31 -07:00
Steve Korshakov
97cf483302 fix: fix query performance 2025-08-19 22:29:30 -07:00
Steve Korshakov
4d5b84e4a7 ref: add http metrics 2025-08-19 19:14:27 -07:00
Steve Korshakov
84afe7c3ad ref: extract authentication and remove db query in it, add prom metric collection 2025-08-19 18:43:08 -07:00
Steve Korshakov
1224039d8b fix: fix build 2025-08-19 18:06:37 -07:00
Steve Korshakov
35299fbbdf fix: add metrics 2025-08-19 18:03:03 -07:00
Steve Korshakov
62ac1e4132 fix: remove event logging 2025-08-19 14:39:58 -07:00
Steve Korshakov
732697a402 ref: new event router 2025-08-18 19:32:10 -07:00
Steve Korshakov
3594b675a8 Merge remote-tracking branch 'origin/daemon-persistent' 2025-08-18 18:56:44 -07:00
Steve Korshakov
6f1aefc056 feat: add app-to-app authentication 2025-08-18 02:08:35 -07:00
Kirill Dubovitskiy
62a2280268 feat: daemon kinda functional e2e 2025-08-18 00:05:37 -07:00
Kirill Dubovitskiy
d03240061d refactor: prepare server for machine sync refactoring
- Clean up machine API endpoints formatting
- Update machine-alive to use ephemeral events instead of updates
- Prepare types for separated metadata and daemonState
- Fix activeAt field name consistency in machine responses

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 18:32:31 -07:00
Steve Korshakov
feb8984d86 Merge branch 'main' of https://github.com/slopus/happy-server 2025-08-16 10:17:15 -07:00
Steve Korshakov
35b4ce412c feat: add app-to-app authentication 2025-08-16 10:13:44 -07:00
Kirill Dubovitskiy
6b1a3c3e82 wip: emit machine updates on heartbeat for real-time status
- Machine-alive handler now properly emits update events to all user connections
- Ensures mobile clients receive real-time machine status updates
- Fixed null handling when machine doesn't exist in database

Note: Last test was not able to spawn new session - webhook callback timing issue

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 07:12:11 -07:00
Kirill Dubovitskiy
3a804f24c8 devx: dangerous logging endpoint 2025-08-15 19:13:45 -07:00
Kirill Dubovitskiy
4006d63232 refactor: rename update-machine-metadata to update-machine
- Consistent naming with the update body type (t: 'update-machine')
- Shorter and cleaner event name
- Matches the pattern used elsewhere in the codebase

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 01:18:50 -07:00
Kirill Dubovitskiy
4212d2725e chore: remove unused mode parameter from session-alive handler
The mode parameter is not used by the server, only tracked client-side.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 00:29:08 -07:00
Kirill Dubovitskiy
597d1d262a refactor: separate session-alive and machine-alive socket events
- Remove SessionAliveEvent type and simplify event handling
- session-alive now only handles session heartbeats (requires sid)
- Add new machine-alive event for daemon heartbeats (requires machineId)
- Remove type field and coupling between session and machine events
- Add proper TypeScript types instead of using 'any'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 21:51:18 -07:00
Kirill Dubovitskiy
a4bc4d34e8 feat: Add machine persistence to database
• Add Machine model to Prisma schema
• Create /v1/machines endpoints for CRUD operations
• Persist machine metadata and track active status
• Update socket handlers for machine-scoped connections
• Convert ephemeral machine status to database persistence

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 03:30:23 -07:00
Kirill Dubovitskiy
5e06cc3947 wip: generate short lived token on the backend to send to the frontend for realtime session creation 2025-08-06 03:35:11 -07:00
Kirill Dubovitskiy
c37d749d7a feat: daemon - machine scoped sessions added 2025-08-05 02:13:22 -07:00
Steve Korshakov
4f0b4fecaf fix: fix updatedAt 2025-08-04 18:58:19 -07:00
Steve Korshakov
bc27d1a973 ref: remove last message 2025-08-04 18:27:24 -07:00