- Add Report schema extending ReportElements with metadata fields
- Create GET /api/v2/reports endpoint with pagination
- Create PUT /api/v2/reports/:id endpoint for updates
- Use stubbed data responses following established patterns
- Follow modular route structure and Zod-first validation
Co-Authored-By: nate@buster.so <nate@buster.so>
- Prepend new message instead of appending to maintain descending order
- Fixes BUS-1486: Message order reversal when adding follow-up messages
- getMessagesForChat returns newest-first, so new messages should be prepended
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Add curly braces around default case content to satisfy noSwitchDeclarations rule
- Prevents variable declarations from being accessible to other switch cases
- Apply Biome formatting fixes for import statement and spacing
Co-Authored-By: nate@buster.so <nate@buster.so>
- Import database queries from main @buster/database package
- Use getUserOrganizationId() instead of user.organizationId
- Add proper error handling for users without organizations
- Follow existing patterns from other API handlers
Co-Authored-By: nate@buster.so <nate@buster.so>
- Add server-shared types for GetTitleRequest and GetTitleResponse with Zod validation
- Create database query functions for each asset type (chat, metric, collection, dashboard)
- Implement GET endpoint with zValidator middleware and exhaustive switch statement
- Add proper permission checks (publiclyAccessible OR organizationId match)
- Export new functions from database query index files
- Add title route to v2 API index
- Follow existing Hono API patterns with standardErrorHandler
Co-Authored-By: nate@buster.so <nate@buster.so>
- Updated `createChatHandler` to include a `concurrencyKey` when triggering the `analyst-agent-task`, ensuring tasks are processed sequentially per chat.
- Adjusted related test cases to verify the inclusion of the `concurrencyKey`.
- Integrated the `concurrencyKey` in the `slackAgentTask` to manage task queuing and notify users when tasks are queued.
- Update Rust handlers to use user_email instead of 'Unknown' fallback
- Add user_email field to MessageWithUser and ChatWithUser structs
- Update database queries to select user email field
- Update TypeScript chat-helpers to use email fallback
- Maintain final fallback to 'Unknown'/'Unknown User' if email is null
Fixes BUS-1457
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>