- 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>
Updated test expectations in apps/server/src/api/v2/slack/handler.test.ts
to expect absolute URLs with http://localhost:3000 prefix instead of
relative URLs, matching the actual behavior when BUSTER_URL is set.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix Slack OAuth service test to use correct scopes for validation
- Update handler tests to use proper field names (authUrl vs auth_url)
- Fix workspace settings test to use correct organization role
- Update chat handler test with missing import and role fix
- Fix retry helpers test to use valid WorkflowContext currentStep values
All unit tests now pass successfully.
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Move currency endpoint from /api/v2/currency to /api/v2/dictionaries/currency
- Follow existing dictionaries pattern with separate config.ts and index.ts
- Update web API calls to use new endpoint location
- Remove old currency route registration and files
- Preserve all existing functionality and types
The new endpoint is accessible at /api/v2/dictionaries/currency and maintains
the same response format and authentication requirements.
Co-Authored-By: nate@buster.so <nate@buster.so>