Commit Graph
52 Commits
Author SHA1 Message Date
yiling 6643d63e81 refactor(api/chat): remove direct Prisma query from API layer
API layer routes in packages/api/src/chat.ts accessed the database directly via prisma, violating communication layer boundaries.

This refactoring migrates these queries to packages/core/src/chat/chat.ts:
- Added getNewSessionMessages to fetch mapped SSE entries.
- Added getChatWorkflowStatus to check task completions.
- Added abortSession to handle workflow cancellation and task updates in core.
- Updated both core and API tests to match refactored signatures and mock boundaries.
2026-07-14 16:40:55 +08:00
yiling a7dc7bbff2 perf(agent): optimize active task lookup using indexed sessionId column 2026-07-14 15:44:10 +08:00
yiling cd48d2d389 fix(agent): resolve lint, typecheck, and stop button UI issues 2026-07-14 10:35:25 +08:00
yiling 8a942d4f4e feat(agent): support aborting agent execution in local and temporal modes 2026-07-14 10:25:06 +08:00
yiling d560032013 feat(chat): send SSE keep-alive ping heartbeats during polling 2026-07-13 12:17:00 +08:00
yiling e080167ac5 feat(chat): enforce team-scoped authorization and session creator check
- Update chat API routes and service methods to include and verify teamId context
- Validate that the requesting user is the creator of the chat session during continuation
- Update frontend chatbot store and components to pass teamId parameter
- Update backend API/core and frontend store tests to verify team scoping and creator checks
2026-07-13 11:35:55 +08:00
yiling cc9b32716d feat(chat): filter out context messages from API list and SSE stream 2026-07-11 15:47:48 +08:00
yiling d19200e9ef feat(chatbot): implement chatbot sidebar, message view, history mode and sse stream 2026-07-11 10:49:40 +08:00
yiling 985bf0170c fix(api): prevent SSE connection resource leak by checking stream.aborted 2026-07-07 20:59:25 +08:00
yiling 7b6db5b56c feat(chatbot): require agentId in ChatRequest and validate agent presence 2026-07-07 11:27:29 +08:00
yiling e55ee3a3f0 feat(chatbot): add chatbot backend api support 2026-07-07 10:55:22 +08:00
yiling e1d3dd46db feat(comments): allow marking comments as complete or incomplete 2026-07-06 12:24:40 +08:00
yiling b7367bb129 refactor(storage): use original filenames and fix download UX
- Store uploaded files as files/{ulid}/{original-name} instead of files/{ulid}/raw
- Store transcoded videos as {stem}-{resolution}.mp4 (e.g. foo-720p.mp4)
- Store transcoded images as {stem}-{width}p.webp (e.g. foo-1920p.webp)
- Add download?: boolean param to presign - only sets Content-Disposition: attachment when true
- Local storage handler only sets Content-Disposition when ?download=1 query param is present
- Add POST /api/files/download-url endpoint for key-based single file downloads
  - Uses ResourceType.Asset for permission check
  - Validates key belongs to the asset's storage directory
- Fix existing download-links API to pass download: true to presign
- Fix breadcrumb navbar download: video shows resolution submenu, others download directly
- Fix video player download: calls download-url API, shows correct file type label
- Remove filename query param hack from presign URLs
- Add sanitizeFilename() and stemFromKey() utility helpers
- Add key field to VideoTranscode DTO interface
2026-07-02 17:39:23 +08:00
yiling 34a69a33bf fix(api): fix update team settings and make request schema type-safe 2026-06-30 14:41:50 +08:00
yiling bdceda4cb6 refactor(share): use custom strongly-typed error classes 2026-06-22 20:48:47 +08:00
yiling 48b2047a84 feat(share): secure share info API and fix wrong password feedback 2026-06-22 20:21:44 +08:00
yiling bea81a207a fix(settings): support type-safe thinkingLevel and propagate to AgentHarness 2026-06-22 09:58:35 +08:00
yiling 87fc10b62f fix(cli): resolve upload status and CLI progress tracker bugs 2026-06-21 20:06:06 +08:00
yiling 90ef063d43 feat(cli): add shumai-cli and token authentication 2026-06-21 12:35:12 +08:00
yiling 2a611f9b5a fix(share): sync layout options and support right sidebar collapse on public page 2026-06-19 10:44:22 +08:00
yiling 53c132e41d feat(auth): refine demo mode support using SHUMAI_DEMO_MODE API 2026-06-19 00:36:23 +08:00
yiling f1d52ac44e feat(auth): add demo mode support using PUBLIC_DEMO_MODE 2026-06-19 00:17:14 +08:00
yiling f4276a19aa feat(api): allow search API in read-only mode 2026-06-17 22:30:09 +08:00
yiling d81fc275f4 fix(api): correct lint errors in authMiddleware tests 2026-06-17 22:19:44 +08:00
yiling ead91455d8 feat(api): implement read-only mode for reviewers controlled by REVIEWER_READ_ONLY env 2026-06-17 21:51:34 +08:00
yiling 5111fcd6a5 refactor(transcode): address code review feedback on imports and dataFormatNames typing 2026-06-16 09:53:28 +08:00
yiling f16a8a7069 refactor(transcode): relocate TranscodeService to core and flatten API package 2026-06-16 09:47:27 +08:00
yiling 6a63e99044 feat(sandbox): add pending domains support for network sandbox 2026-06-15 00:01:55 +08:00
yiling d1f76e5239 refactor(project): remove unnecessary as any cast in project member api 2026-06-12 10:11:34 +08:00
yiling fb76fbd970 feat(project): support adding existing team members and prioritize project-specific roles 2026-06-12 10:00:17 +08:00
yiling f093b490c6 feat(trash): add recently-deleted banner and empty trash option for admin
- Added emptyTrash method in AssetService to purge trashed assets from DB and S3

- Added POST /projects/:projectId/empty-trash endpoint in project API

- Implemented unit and integration tests for service and API

- Prevented double click redirect in recently deleted folder

- Added top banner with Delete Now option in recently-deleted folder with confirmation dialog
2026-06-11 16:19:35 +08:00
yiling c910f22542 refactor(core): move starting symlink resolution to getDownloadLinks and simplify getProjectIds 2026-06-11 13:08:29 +08:00
yiling aed0676032 refactor(api): extract db query from download-links endpoint to service method 2026-06-11 13:06:01 +08:00
yiling ec42c4e9ff feat(file): add bulk download links API and frontend batch download dialog 2026-06-11 11:44:26 +08:00
yiling 2f4e42fdd5 test(api): update team api test to match new getTeamMembers signature 2026-06-10 11:41:07 +08:00
yiling d364674735 feat(team): add member scope labels and visibility filtering for project-scoped members 2026-06-10 11:12:48 +08:00
yiling cf674eb810 fix(s3): fix linting errors in s3 service and tests 2026-06-08 20:07:36 +08:00
yiling 38909b2bab fix(s3): address code review feedback on security and memory efficiency 2026-06-08 20:00:48 +08:00
yiling f96f687be4 feat(s3): migrate to bun native s3 and add filename support 2026-06-08 19:35:46 +08:00
yiling 922ba4a4f5 test(api): fix lint error in file upload tests 2026-06-08 12:43:41 +08:00
yiling 688e1a4ede feat(api,webui): implement image compression, auto-refresh for uploads, and infinite pagination for collections/shares 2026-06-08 12:14:14 +08:00
yiling 62a2cb3589 feat(members): allow owners to manage roles and remove members 2026-06-07 15:28:05 +08:00
yiling 9eecedd8d8 fix(tests): remove prohibited any cast from collection api tests 2026-06-06 16:28:45 +08:00
yiling 658113ec4e test(backend): add tests for resolving creator avatar URL in share and collection APIs 2026-06-06 12:33:35 +08:00
yiling 02e845ef71 feat(backend): generate presigned avatar URLs for collection and share link creators 2026-06-06 12:25:07 +08:00
yiling d3dd5f9b0c feat(webui): use avatar component for share link and collection creators 2026-06-06 12:12:56 +08:00
yiling 6ebeb3f804 feat(ui): add collection and share link pages and management actions 2026-06-06 12:02:51 +08:00
yiling e65b3edbee feat(user-avatar): add support for uploading, cropping, and displaying user avatars 2026-06-03 19:56:07 +08:00
yiling 5ae7e408ec feat(auth): remove enablePublicSignup and disable public signup in UI 2026-06-03 10:18:15 +08:00
yiling 3da2cdc524 feat(monorepo): introduce apps folder and decouple api package 2026-06-02 15:30:16 +08:00