Skip to content

Release - 2025-07-14 - #387

Merged
bradtaylorsf merged 11 commits into
productionfrom
staging
Jul 15, 2025
Merged

Release - 2025-07-14#387
bradtaylorsf merged 11 commits into
productionfrom
staging

Conversation

@bradtaylorsf

@bradtaylorsf bradtaylorsf commented Jul 12, 2025

Copy link
Copy Markdown
Collaborator

This release delivers a robust set of enhancements focused on chatflow user experience, authentication, voice agent integration in documentation, more precise API behavior, and documentation improvements. Several bug fixes and code refinements ensure platform stability and smoother onboarding.

✨ Major Features & Improvements

  1. Chat UI & Default Chatflow Redirect
  • Automatic Redirection: Users landing on /chat are now seamlessly redirected to their default chatflow if available.
  • New Component: Introduction of ChatRedirectHandler and supporting hook for determining the user’s default chatflow via API.
  • Backend Support: Enhanced /auth/me endpoint provides the user's default chatflow information for frontend use.
  1. Voice Agent Integration in Docs
  • ElevenLabs Widget: Interactive voice conversation widget now implemented using the @elevenlabs/react package.
  • Flexible UI: Multiple display modes, styling options, and status messages for voice agents, supporting both CTA and chip-style buttons.
  • AI Workshop Page: Users can talk directly to a trained AI agent for instant support alongside human scheduling.
  1. Documentation & Marketing Site
  • Expanded Docs: Major update to the README.md—now serves as a comprehensive guide and marketing introduction for the entire platform.
  • AI Workshops: Improved content, layouts, benefit cards, and user flows for scheduling and learning about in-person workshops.
  • Scheduled Page: New confirmation page post-consultation scheduling, with helpful next-steps and resource suggestions.
  1. Authentication & API Consistency
  • /auth/me Endpoint: Now returns detailed user, organization, and session method (API key/JWT) information.
  • Middleware: All /auth routes are secured and managed directly by the authentication middleware.
  • Marketplace Save Template: Now requires the CustomTemplate ability, links template saves to the requesting user, and restricts access accordingly.
  1. Bug Fixes & Quality-of-Life
  • Chatflow Import: Prevents inherited marketplace descriptions from polluting file imports.
  • Canvas Export: Fixes export to use generateExportFlowData properly, preserving naming and metadata.
  • CORS Middleware: CORS headers are only set for /api/ routes, tightening security and preventing unwanted CORS issues elsewhere.

diecoscai and others added 5 commits July 10, 2025 23:31
…ist hidden unless no chief sidekick, and left navbar opens by default (closes #316)
…ult-login

feat: chief sidekick is auto-selected and loaded on login, chatflow l…
… approach

This PR refactors the default chatflow redirection mechanism by removing
server-side cookie dependency and implementing a cleaner client-side solution.

## Changes Made

### Removed Cookie Implementation
- Removed defaultChatflowId cookie reading from getCachedSession.ts
- Removed cookie setting functionality from authentication middleware
- Eliminated server-side cookie dependency for default chatflow handling

### Implemented Client-Side Solution
- Added ChatRedirectHandler component for managing chat redirects
- Created useRedirectToDefaultChatflow hook for redirect logic
- Added auth API client for /auth/me endpoint calls
- Enhanced authentication middleware with direct /auth/me endpoint

### Architecture Improvements
- Replaced server-side cookie management with API-based approach
- Improved debugging capabilities with client-side logic
- Reduced security concerns related to cookie handling
- Simplified state management by removing cookie dependencies

## Benefits
- Better separation of concerns (client handles UI, server provides data)
- Easier debugging and testing of redirect logic
- No cookie security implications
- More maintainable and modern approach
- Cleaner code architecture
Add Voice Agent for AI Workshops and Update Calendly Page for CTAs
@vercel

vercel Bot commented Jul 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
answerai-docs ✅ Ready (Inspect) Visit Preview Jul 12, 2025 7:29am
the-answerai ✅ Ready (Inspect) Visit Preview Jul 12, 2025 7:29am

diecoscai and others added 3 commits July 14, 2025 17:32
- Add user context parameter to saveCustomTemplate service method
- Pass req.user from controller to service for proper authorization
- Add enforceAbility middleware to custom template route
- Fix 'Unauthorized public access to non-public chatflow' error

Resolves: Diego Ticket 1 - Template save functionality
- Simplify generateExportFlowData to pass complete chatflow object
- Add 404 error handling for missing chatflows
- Clean up marketplace-specific descriptions on import
- Improve error handling in canvas flow loading

Resolves: Diego Ticket 1 - Template export functionality
…port-system

AAI-486-fix-template-export-and-save-functionality-complete-template-system-repair
…t-chatflow-redirect

 feat: replace cookie-based chatflow redirect with modern client-side approach
router.get('/templates/:id', marketplacesController.getMarketplaceTemplate)

router.post('/custom', marketplacesController.saveCustomTemplate)
router.post('/custom', enforceAbility('CustomTemplate'), marketplacesController.saveCustomTemplate)

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.

Copilot Autofix

AI about 1 year ago

To fix the issue, we will add rate limiting to the /custom POST route. The express-rate-limit package will be used to implement rate limiting. This package allows us to define a maximum number of requests per time window for specific routes.

Steps to implement the fix:

  1. Import the express-rate-limit package.
  2. Define a rate limiter configuration for the /custom POST route.
  3. Apply the rate limiter middleware to the route.

This fix ensures that the /custom POST route is protected against abuse while maintaining its functionality.

Suggested changeset 1
packages/server/src/routes/marketplaces/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/server/src/routes/marketplaces/index.ts b/packages/server/src/routes/marketplaces/index.ts
--- a/packages/server/src/routes/marketplaces/index.ts
+++ b/packages/server/src/routes/marketplaces/index.ts
@@ -3,4 +3,12 @@
 import enforceAbility from '../../middlewares/authentication/enforceAbility'
+import rateLimit from 'express-rate-limit'
 const router = express.Router()
 
+// Rate limiter for POST /custom route
+const customTemplateRateLimiter = rateLimit({
+  windowMs: 15 * 60 * 1000, // 15 minutes
+  max: 100, // max 100 requests per windowMs
+  message: 'Too many requests, please try again later.',
+})
+
 // READ
@@ -9,3 +17,3 @@
 
-router.post('/custom', enforceAbility('CustomTemplate'), marketplacesController.saveCustomTemplate)
+router.post('/custom', customTemplateRateLimiter, enforceAbility('CustomTemplate'), marketplacesController.saveCustomTemplate)
 
EOF
@@ -3,4 +3,12 @@
import enforceAbility from '../../middlewares/authentication/enforceAbility'
import rateLimit from 'express-rate-limit'
const router = express.Router()

// Rate limiter for POST /custom route
const customTemplateRateLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // max 100 requests per windowMs
message: 'Too many requests, please try again later.',
})

// READ
@@ -9,3 +17,3 @@

router.post('/custom', enforceAbility('CustomTemplate'), marketplacesController.saveCustomTemplate)
router.post('/custom', customTemplateRateLimiter, enforceAbility('CustomTemplate'), marketplacesController.saveCustomTemplate)

Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Comment thread packages/docs/src/components/ElevenLabsWidget/index.tsx
Comment thread packages/docs/src/components/ElevenLabsWidget/index.tsx

@spindle79 spindle79 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you checked out the "Missing CSRF middleware" issue or is that known?

@bradtaylorsf
bradtaylorsf merged commit b2e54ac into production Jul 15, 2025
8 of 11 checks passed
@maxtechera
maxtechera temporarily deployed to staging - theanswer-iek0 July 15, 2025 22:44 — with Render Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants