Commit Graph

118 Commits

Author SHA1 Message Date
Steve Korshakov
ee48abb737 ref: working on connected accounts 2025-09-01 15:32:10 -07:00
Steve Korshakov
02949fa615 ref: move socket handlers 2025-09-01 15:00:39 -07:00
Steve Korshakov
80a3a64d84 fix: fix broken rpc 2025-09-01 14:51:24 -07:00
Steve Korshakov
c40801b329 ref: move socket handlers 2025-09-01 14:49:56 -07:00
Steve Korshakov
96dd69d360 ref: move routes 2025-09-01 14:38:48 -07:00
Steve Korshakov
acec634e49 ref: move account, connect and session routes 2025-09-01 14:22:50 -07:00
Steve Korshakov
270042d132 wip: extract routes 2025-09-01 14:12:09 -07:00
Steve Korshakov
5379043a14 ref: moving files around 2025-09-01 14:04:30 -07:00
Steve Korshakov
2dada58228 fix: fix missing timeouts 2025-09-01 11:57:27 -07:00
Steve Korshakov
15762fc706 fix: better domain for files 2025-08-28 23:40:32 -07:00
Steve Korshakov
bbea119fab fix: fix timeout 2025-08-27 10:29:11 -07:00
Steve Korshakov
2a3bdb3452 feat: implement v2 sessions sync endpoints with better pagination
- Add GET /v2/sessions/active - returns only active sessions
- Add GET /v2/sessions - cursor-based pagination with changedSince filter
- Use consistent ID-based sorting (desc) for predictable pagination
- changedSince is just a filter, doesn't affect pagination mechanics
- Remove lastMessage field from all v2 endpoints for smaller payloads
- Simple opaque cursor format: cursor_v1_{sessionId}

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 10:23:17 -07:00
Steve Korshakov
0f222cfd98 fix: properly handle empty bodies for DELETE/GET requests
Improve content type parser to handle HTTP methods correctly:
- DELETE and GET requests with empty bodies return undefined (no parsing)
- Other HTTP methods with empty bodies return empty object
- Add method and URL to error logging for better debugging
- Prevents JSON parsing errors on legitimate empty DELETE requests

Fixes the GitHub disconnect endpoint which uses DELETE without body.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 00:28:43 -07:00
Steve Korshakov
5ede024b4c fix: handle empty JSON bodies in content type parser
Fix "Unexpected end of JSON input" error by:
- Check for empty/whitespace-only body before parsing
- Return empty object for empty bodies instead of failing
- Add detailed error logging for debugging JSON parse failures
- Prevent crashes on malformed or empty request bodies

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 00:27:32 -07:00
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