-
Notifications
You must be signed in to change notification settings - Fork 518
feat: implement global audio manager and default agent title fallback #1863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added AudioManager class to manage audio playback, ensuring only one audio plays at a time. - Integrated audio manager with AudioRenderer component to register audio elements and handle play/pause events. - Ensured compliance with coding standards, including proper use of hooks and Tailwind CSS for styling.
- Added 'defaultAgentTitle' key to the translations in both English and Chinese files to provide a fallback title for agents. - Updated WorkflowAppPage to utilize the new translation key when rendering node titles and current step titles, ensuring a consistent user experience. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access.
WalkthroughThis PR introduces a global audio manager for coordinating HTMLAudioElement playback, adds internationalization for a default agent title, suppresses workflow notifications on initial load with executionId, and adjusts UI scrolling behavior in the results grid. Changes
Sequence Diagram(s)sequenceDiagram
participant Audio as HTMLAudioElement
participant App as React Component
participant Manager as AudioManager
App->>Manager: register(audioElement)
Manager->>Audio: attach play event listener
Manager->>Audio: attach pause event listener
Manager->>Audio: attach ended event listener
Audio->>Manager: fire play event
Manager->>Manager: stopAllExcept(current)
Manager->>Manager: set currentAudio reference
Audio->>Manager: fire ended event
Manager->>Manager: clear currentAudio reference
App->>Manager: unregister() on cleanup
Manager->>Audio: detach all listeners
Manager->>Manager: remove from registry
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.ts (1)
11-11: Consider adding explicit return type annotation.Per coding guidelines, functions should have explicit return types defined, especially for public APIs.
- register(audioElement: HTMLAudioElement): () => void { + public register(audioElement: HTMLAudioElement): () => void {The return type is already defined which is good. Optionally, you could also mark
registerandstopAllaspublicexplicitly for clarity, though TypeScript defaults to public.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.ts(1 hunks)packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsx(1 hunks)packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsx(1 hunks)packages/i18n/src/en-US/ui.ts(1 hunks)packages/i18n/src/zh-Hans/ui.ts(1 hunks)packages/web-core/src/pages/workflow-app/index.tsx(4 hunks)
🧰 Additional context used
📓 Path-based instructions (23)
**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{jsx,tsx}: Always use tailwind css to style the component
Always wrap pure components with React.memo to prevent unnecessary re-renders
Always use useMemo for expensive computations or complex object creation
Always use useCallback for function props to maintain referential equality
Always specify proper dependency arrays in useEffect to prevent infinite loops
Always avoid inline object/array creation in render to prevent unnecessary re-renders
Always use proper key props when rendering lists
Always split nested components with closures into separate components to avoid performance issues and improve code maintainability
**/*.{jsx,tsx}: Always wrap pure components with React.memo to prevent unnecessary re-renders
Always use useMemo for expensive computations or complex object creation in React
Always use useCallback for function props to maintain referential equality in React
Always specify proper dependency arrays in useEffect to prevent infinite loops in React
Always avoid inline object/array creation in render to prevent unnecessary re-renders in React
Always use proper key props when rendering lists in React (avoid using index when possible)
Always split nested components with closures into separate components in React
Use lazy loading for components that are not immediately needed in React
Debounce handlers for events that might fire rapidly (resize, scroll, input) in React
Implement fallback UI for components that might fail in React
Use error boundaries to catch and handle runtime errors in React
**/*.{jsx,tsx}: Place each attribute on a new line when a component has multiple attributes in JSX
Use self-closing tags for elements without children in JSX
Keep JSX expressions simple, extract complex logic to variables
Put closing brackets for multi-line JSX on a new line
**/*.{jsx,tsx}: Component file names should match the component name
Organize function components in order: imports, type definitions, constants, component function, hook calls, e...
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/web-core/src/pages/workflow-app/index.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,ts,jsx,tsx}: Always use optional chaining (?.) when accessing object properties
Always use nullish coalescing (??) or default values for potentially undefined values
Always check array existence before using array methods
Always validate object properties before destructuring
Always use single quotes for string literals in JavaScript/TypeScript code
**/*.{js,ts,jsx,tsx}: Use semicolons at the end of statements
Include spaces around operators (e.g.,a + binstead ofa+b)
Always use curly braces for control statements
Place opening braces on the same line as their statement
**/*.{js,ts,jsx,tsx}: Group import statements in order: React/framework libraries, third-party libraries, internal modules, relative path imports, type imports, style imports
Sort imports alphabetically within each import group
Leave a blank line between import groups
Extract complex logic into custom hooks
Use functional updates for state (e.g.,setCount(prev => prev + 1))
Split complex state into multiple state variables rather than single large objects
Use useReducer for complex state logic instead of multiple useState calls
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,rb,go,rs,php,swift,kt,scala,r,m,mm,sql}
📄 CodeRabbit inference engine (.cursor/rules/00-language-priority.mdc)
**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,rb,go,rs,php,swift,kt,scala,r,m,mm,sql}: All code comments MUST be written in English
All variable names, function names, class names, and other identifiers MUST use English words
Comments should be concise and explain 'why' rather than 'what'
Use proper grammar and punctuation in comments
Keep comments up-to-date when code changes
Document complex logic, edge cases, and important implementation details
Use clear, descriptive names that indicate purpose
Avoid abbreviations unless they are universally understood
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/00-language-priority.mdc)
Use JSDoc style comments for functions and classes in JavaScript/TypeScript
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/01-code-style.mdc)
**/*.{js,jsx,ts,tsx}: Use single quotes for string literals in TypeScript/JavaScript
Always use optional chaining (?.) when accessing object properties in TypeScript/JavaScript
Always use nullish coalescing (??) or default values for potentially undefined values in TypeScript/JavaScript
Always check array existence before using array methods in TypeScript/JavaScript
Validate object properties before destructuring in TypeScript/JavaScript
Use ES6+ features like arrow functions, destructuring, and spread operators in TypeScript/JavaScript
Avoid magic numbers and strings - use named constants in TypeScript/JavaScript
Use async/await instead of raw promises for asynchronous code in TypeScript/JavaScript
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{jsx,tsx,css}
📄 CodeRabbit inference engine (.cursor/rules/01-code-style.mdc)
**/*.{jsx,tsx,css}: Use Tailwind CSS for styling components
Follow the utility-first approach with Tailwind CSS
Group related utility classes together in Tailwind CSS
Prefer Tailwind utilities over custom CSS when possible
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/web-core/src/pages/workflow-app/index.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/03-typescript-guidelines.mdc)
**/*.{ts,tsx}: Avoid usinganytype whenever possible - useunknowntype instead with proper type guards
Always define explicit return types for functions, especially for public APIs
Prefer extending existing types over creating entirely new types
Use TypeScript utility types (Partial<T>,Pick<T, K>,Omit<T, K>,Readonly<T>,Record<K, T>) to derive new types
Use union types and intersection types to combine existing types
Always import types explicitly using theimport typesyntax
Group type imports separately from value imports
Minimize creating local type aliases for imported types
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,ts,jsx,tsx,css,json}
📄 CodeRabbit inference engine (.cursor/rules/04-code-formatting.mdc)
Maximum line length of 100 characters
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,ts,jsx,tsx,css,json,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/04-code-formatting.mdc)
Use 2 spaces for indentation, no tabs
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{js,ts,jsx,tsx,css,json,yml,yaml,md}
📄 CodeRabbit inference engine (.cursor/rules/04-code-formatting.mdc)
No trailing whitespace at the end of lines
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{jsx,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/05-code-organization.mdc)
Each component file should contain only one main component
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/web-core/src/pages/workflow-app/index.tsx
**/*.tsx
📄 CodeRabbit inference engine (.cursor/rules/05-code-organization.mdc)
Explicitly type props with interfaces or types in React components
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/web-core/src/pages/workflow-app/index.tsx
**/*.{css,scss,sass,less,js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/09-design-system.mdc)
**/*.{css,scss,sass,less,js,jsx,ts,tsx}: Primary color (#155EEF) should be used for main brand color in buttons, links, and accents
Error color (#F04438) should be used for error states and destructive actions
Success color (#12B76A) should be used for success states and confirmations
Warning color (#F79009) should be used for warnings and important notifications
Info color (#0BA5EC) should be used for informational elements
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (.cursor/rules/09-i18n-guidelines.mdc)
**/*.{tsx,ts}: Use the translation wrapper component and useTranslation hook in components
Ensure all user-facing text is translatable
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{tsx,ts,json}
📄 CodeRabbit inference engine (.cursor/rules/09-i18n-guidelines.mdc)
Support dynamic content with placeholders in translations
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{tsx,ts,jsx,js,vue,css,scss,less}
📄 CodeRabbit inference engine (.cursor/rules/11-ui-design-patterns.mdc)
**/*.{tsx,ts,jsx,js,vue,css,scss,less}: Use the primary blue (#155EEF) for main UI elements, CTAs, and active states
Use red (#F04438) only for errors, warnings, and destructive actions
Use green (#12B76A) for success states and confirmations
Use orange (#F79009) for warning states and important notifications
Use blue (#0BA5EC) for informational elements
Primary buttons should be solid with the primary color
Secondary buttons should have a border with transparent or light background
Danger buttons should use the error color
Use consistent padding, border radius, and hover states for all buttons
Follow fixed button sizes based on their importance and context
Use consistent border radius (rounded-lg) for all cards
Apply light shadows (shadow-sm) for card elevation
Maintain consistent padding inside cards (p-4orp-6)
Use subtle borders for card separation
Ensure proper spacing between card elements
Apply consistent styling to all form inputs
Use clear visual indicators for focus, hover, and error states in form elements
Apply proper spacing between elements using 8px, 16px, 24px increments
Ensure proper alignment of elements (left, center, or right)
Use responsive layouts that work across different device sizes
Maintain a minimum contrast ratio of 4.5:1 for text
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{tsx,ts,jsx,js,vue}
📄 CodeRabbit inference engine (.cursor/rules/11-ui-design-patterns.mdc)
**/*.{tsx,ts,jsx,js,vue}: Include appropriate loading states for async actions in buttons
Group related form elements with appropriate spacing
Provide clear validation feedback for forms
Ensure proper labeling and accessibility for form elements
Ensure all interactive elements are keyboard accessible
Include appropriate ARIA attributes for complex components
Provide alternative text for images and icons
Support screen readers with semantic HTML elements
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/08-contributing-guidelines.mdc)
**/*.{ts,tsx,js,jsx}: Follow the TypeScript/JavaScript style guidelines
Ensure code is well-tested and documented
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/i18n/src/zh-Hans/ui.tspackages/web-core/src/pages/workflow-app/index.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.tspackages/i18n/src/en-US/ui.ts
**/*.{tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/08-contributing-guidelines.mdc)
Use React best practices for frontend code
Files:
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsxpackages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsxpackages/web-core/src/pages/workflow-app/index.tsx
**/{i18n,locales,translations,lang}/**/*.{json,ts,tsx,js,jsx,properties}
📄 CodeRabbit inference engine (.cursor/rules/00-language-priority.mdc)
Use Chinese for all user-facing communication
Files:
packages/i18n/src/zh-Hans/ui.tspackages/i18n/src/en-US/ui.ts
packages/i18n/src/{en-US,zh-Hans}/**
📄 CodeRabbit inference engine (.cursor/rules/09-i18n-guidelines.mdc)
Add new translation keys to both language files (en-US and zh-Hans)
Files:
packages/i18n/src/zh-Hans/ui.tspackages/i18n/src/en-US/ui.ts
packages/i18n/src/**
📄 CodeRabbit inference engine (.cursor/rules/09-i18n-guidelines.mdc)
packages/i18n/src/**: Maintain consistency in translation key naming conventions
Use descriptive translation keys that reflect the content
Group related translation keys together in the translation file structure
Use namespaces for different sections of the application in translation keys
Follow a hierarchical structure for nested components in translation key organization
Files:
packages/i18n/src/zh-Hans/ui.tspackages/i18n/src/en-US/ui.ts
**/index.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/05-code-organization.mdc)
Use index files to export multiple components from a directory
Files:
packages/web-core/src/pages/workflow-app/index.tsx
🧠 Learnings (4)
📚 Learning: 2025-11-25T03:02:45.779Z
Learnt from: CR
Repo: refly-ai/refly PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T03:02:45.779Z
Learning: Applies to **/*.{jsx,tsx} : Always wrap pure components with React.memo to prevent unnecessary re-renders
Applied to files:
packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsx
📚 Learning: 2025-11-25T03:04:41.334Z
Learnt from: CR
Repo: refly-ai/refly PR: 0
File: .cursor/rules/09-i18n-guidelines.mdc:0-0
Timestamp: 2025-11-25T03:04:41.334Z
Learning: Applies to packages/i18n/src/{en-US,zh-Hans}/** : Add new translation keys to both language files (en-US and zh-Hans)
Applied to files:
packages/i18n/src/zh-Hans/ui.tspackages/i18n/src/en-US/ui.ts
📚 Learning: 2025-11-25T03:03:19.158Z
Learnt from: CR
Repo: refly-ai/refly PR: 0
File: .cursor/rules/00-language-priority.mdc:0-0
Timestamp: 2025-11-25T03:03:19.158Z
Learning: Applies to **/{i18n,locales,translations,lang}/**/*.{json,ts,tsx,js,jsx,properties} : Use Chinese for all user-facing communication
Applied to files:
packages/i18n/src/zh-Hans/ui.ts
📚 Learning: 2025-11-25T03:05:15.932Z
Learnt from: CR
Repo: refly-ai/refly PR: 0
File: .cursor/rules/16-language-guidelines.mdc:0-0
Timestamp: 2025-11-25T03:05:15.932Z
Learning: UI text should default to English with i18n support for Chinese
Applied to files:
packages/i18n/src/zh-Hans/ui.ts
🧬 Code graph analysis (2)
packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsx (2)
packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/types.ts (1)
FileRendererProps(10-13)packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.ts (1)
audioManager(77-77)
packages/web-core/src/pages/workflow-app/index.tsx (4)
packages/openapi-schema/src/types.gen.ts (1)
status(297-297)packages/request/src/requests/types.gen.ts (1)
status(297-297)packages/ai-workspace-common/src/requests/types.gen.ts (1)
status(297-297)apps/api/src/modules/tool/sandbox/scalebox.dto.ts (1)
error(214-220)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build / Build
🔇 Additional comments (13)
packages/ai-workspace-common/src/components/workflow-app/selected-results-grid.tsx (1)
129-129: LGTM: Scrolling behavior adjustmentRemoving
overflow-y-autodelegates scroll handling to the parent container, which aligns with the PR's goal of relying on default browser scrolling instead of constrained vertical overflow.packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio.tsx (3)
1-3: LGTM: Necessary imports for audio manager integrationThe added imports (
useRef,useEffect,audioManager) are required for registering the audio element with the global audio manager.
9-18: LGTM: Proper audio manager registration with cleanupThe
useEffectimplementation correctly:
- Runs once on mount (empty dependency array)
- Performs null check before registration
- Returns the cleanup function to unregister on unmount
This ensures proper coordination of audio playback across the application and prevents memory leaks.
7-7: LGTM: Proper ref implementation for audio elementThe
audioRefis correctly typed and attached to the<audio>element, enabling the audio manager to coordinate playback with other audio instances in the application.Also applies to: 23-23
packages/i18n/src/zh-Hans/ui.ts (1)
3827-3827: Translation keys are properly implemented in both language files.Both
defaultAgentTitleentries are present and correctly paired: 'Agent' in en-US/ui.ts (line 4089) and '智能体' in zh-Hans/ui.ts (line 3827). The i18n requirement is satisfied.packages/i18n/src/en-US/ui.ts (1)
4089-4090: LGTM - Translation key added correctly.The
defaultAgentTitlekey is appropriately placed within theworkflowApp.runnamespace. Based on learnings, ensure the corresponding key is also added topackages/i18n/src/zh-Hans/ui.ts(the AI summary indicates it was added with value '智能体').packages/ai-workspace-common/src/components/canvas/canvas-resources/file-preview/audio-manager.ts (1)
1-77: Well-designed audio coordination singleton.The AudioManager implementation is clean and handles the single-audio-at-a-time requirement effectively. Event listeners are properly attached and removed, preventing memory leaks.
packages/web-core/src/pages/workflow-app/index.tsx (6)
79-80: Good use of ref for tracking initial load state.Using
useRefto track whether the page loaded with an existingexecutionIdis the correct approach - it avoids unnecessary re-renders while maintaining state across the component lifecycle.
203-222: Notification suppression logic is correctly implemented.The conditional checks properly handle:
- Suppressing success notification on initial URL load with executionId
- Suppressing error notification when credit insufficient modal is visible
- Resetting the flag after first completion check to enable future notifications
239-242: Good error handling for E1021 error code.Clearing the executionId from the URL when encountering error code E1021 (WorkflowExecutionNotFoundError based on context) is appropriate - it prevents the page from continuously trying to poll for a non-existent execution.
518-519: Correct flag reset when starting new execution.Resetting
isInitialLoadWithExecutionIdRef.current = falsewhen the user manually starts a new workflow ensures that subsequent completion/error notifications will be displayed as expected.
957-960: Appropriate fallback for agent title.Using the
defaultAgentTitletranslation key as a fallback whennode.titleis missing ensures consistent UI display across locales.
967-968: Consistent fallback pattern applied.Same fallback pattern applied correctly for the single step display case.
* fix: duplicate manual upload files when executing workflow app (#1829) * feat: Introduce `UseShareDataProvider` to control data source for shared content and refactor file ID handling for shared canvas data. * refactor: use `useRef` for stable references in `SkillResponse` and `replaceAll` for safer file ID replacement. * feat: Duplicate manual canvas files and update their references when duplicating a workflow app. * feat: Implement credit pack, voucher generation and sharing for template publishing #1771 (#1830) * Feat/credit pack (#1748) * feat: implement credit pack feature with enhanced subscription and onboarding - Add credit pack purchase functionality - Implement onboarding success modal with animation - Add form-based user onboarding system - Enhance subscription management with new pricing plans - Improve credit handling and error messaging - Add telemetry logging for user interactions - Update UI components and translations * refactor: remove unused schemas and enhance workflow execution polling - Deleted the schemas.ts file as it was no longer needed. - Updated use-workflow-execution-polling hook to include useSubscriptionStoreShallow for improved state management. * refactor: improve subscription component styling and logic - Refactored PriceOption and FeatureItem components for better performance and maintainability. - Updated Tailwind CSS classes for consistent styling across components. - Implemented optional chaining and nullish coalescing for safer property access. - Enhanced feature description display logic based on plan type. - Adjusted layout and spacing for improved user experience in subscription-related components. * feat: add currentPlan and source fields to checkout session models an… (#1753) feat: add currentPlan and source fields to checkout session models and requests - Introduced currentPlan and source fields in the CheckoutSession model for better tracking of subscription details. - Updated CreateCheckoutSessionRequest and CreateCreditPackCheckoutSessionRequest types to include currentPlan and source. - Enhanced subscription service and webhook logic to utilize new fields for improved telemetry logging and user experience. - Refactored related components to pass currentPlan and source during checkout session creation. * Feat/creator community (#1778) * feat: add promotion item component and community SVG asset - Introduced a new PromotionItem component to display promotional offers in the sidebar, utilizing Tailwind CSS for styling. - Added community.svg asset for visual representation in the PromotionItem. - Updated translations for promotion-related text in both English and Chinese. - Ensured proper handling of collapsed state and click events for opening promotion URLs. * fix: update PromotionItem component styling and enhance button accessibility - Adjusted the width and border radius of the PromotionItem component for improved aesthetics. - Enhanced the CTA button styling to support dark mode and improve hover effects. - Ensured compliance with Tailwind CSS for consistent styling across the component. * fix: update PromotionItem component styling and translations - Adjusted padding and text styles in the PromotionItem component for improved visual consistency. - Updated translation keys for promotion-related text to enhance clarity and user experience. - Ensured compliance with Tailwind CSS for consistent styling across the component. * fix: refine PromotionItem component styling and update translations - Adjusted padding and text styles in the PromotionItem component for improved layout and visual appeal. - Updated the promotion description in translations for better clarity and user engagement. - Ensured compliance with Tailwind CSS for consistent styling across the component. * feat(subscription): enhance subscription handling and user type management - Updated subscription DTO to include 'lookupKey' in the mapping. - Integrated user type management in the PromotionItem component, utilizing the subscription store for better user context. - Enhanced user settings hook to set subscription plan type and user type based on retrieved settings. - Expanded subscription plan type to include 'pro' across various schemas and types for consistency. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: Implement voucher generation and sharing for template publishing (#1771) * feat: implement voucher system with sharing, application, and rewards * feat: Implement voucher system with API for triggering generation, pending claim handling, and new UI components. * feat: implement Stripe promotion codes for vouchers, add `StripeCoupon` model, and refine discount percentage mapping. * fix: use semantic dialog element instead of div with role Replace div with role="dialog" with native <dialog> element to satisfy biome a11y/useSemanticElements lint rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat: enhance voucher popup UI with new confetti animation, Ant Design buttons, and improved invitation verification types * feat: enhance voucher claiming and sharing by adding inviter name display, refining UI logic, and improving share link copy functionality. * chore: Remove voucher invite page and its corresponding route. * feat: Implement voucher invite flow tracking for signup events and adjust associated redirects and share URLs. * fix: Set daily voucher popup limit to 3 and change agent file write type to text/plain. * docs: Remove deprecated voucher implementation and design documents. * refactor: Streamline voucher invitation handling by removing `shareUrl` and `qrCodeUrl` from API and standardizing event logging. * feat: Add user_type to various telemetry events for enhanced tracking. * feat: Enhance voucher invitation flow by showing claimed but unused vouchers, preserving invite codes during login, and removing popup limits. --------- Co-authored-by: Claude Opus 4.5 <[email protected]> * feat: Implement voucher email notifications with new templates and integrate with the notification module. * Remove invite code handling, `useSearchParams`, and associated redirects from the HomeRedirect component. * feat: Update voucher invite links to point to `/workspace` and enhance the claim hook to prioritize URL parameters. * feat: Redesign the voucher email template with enhanced styling and a new table-based layout. * refactor: remove SubscriptionService dependency from DriveService --------- Co-authored-by: Siri-Ray <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * feat: enhance logout functionality with user state reset (#1831) - Added `resetUserState` parameter to the `logout` function to reset user state in the store upon logout. - Integrated `useUserStoreShallow` to access the `resetState` method within the `useLogout` hook. - Ensured compliance with coding standards, including optional chaining for safe property access. * feat: Add auto model routing tracking for token usage (#1834) - Add originalModelId and modelRoutedData fields to TokenUsage schema to track model routing history - Update skill invoker service to extract and store routing metadata when models are routed - Add routing data support in subscription service for token usage recording - Update OpenAPI schema with model routing metadata structure including routing strategy and timestamps - Add database index on originalModelId for efficient querying of auto-routed model usage * [Security] Fix CRITICAL vulnerability: V-001 (#1832) fix: resolve critical vulnerability V-001 Automatically generated security fix Co-authored-by: orbisai0security <[email protected]> * feat: add workflow template generation status tracking (#1793) * feat: add template generation status tracking and UI components - Enhanced the WorkflowApp model to include fields for template generation status and error messages. - Implemented a new service method to retrieve the template generation status for a workflow app. - Added a polling hook to manage template generation status updates in the UI. - Created a TemplateStatusBadge component to visually represent the generation status. - Updated the WorkflowAPPForm to integrate the new template status functionality and display the badge conditionally. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: enhance TemplateStatusBadge with ripple animation and improved styling - Added a ripple animation effect for the completed status using a new RippleWrapper component. - Implemented useEffect to manage the addition and cleanup of the ripple animation style. - Updated Badge component styling with Tailwind CSS for better visual consistency. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: add template generation messages to i18n translations - Introduced new translation keys for template generation status in both English and Chinese. - Updated the TemplateStatusBadge component to utilize the new translations for improved user feedback. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: implement auto-switch functionality for template editor - Added logic to automatically switch to the editor if the page refreshes with an existing completed template, enhancing user experience. - Introduced refs to track initial status and check for auto-switch conditions, ensuring the switch only occurs under specific criteria. - Updated useEffect hooks to manage state and side effects related to template content and user interactions. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: validate appId in template generation status request - Added a check to ensure appId is provided and not empty, throwing a BadRequestException if validation fails. - Updated the handling of template generation status to account for null values from old records, defaulting to 'idle' when necessary. - Enhanced logging for status mismatches when content exists but the status indicates otherwise. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: improve error logging and status updates in WorkflowAppTemplateProcessor - Enhanced logging messages to include job IDs and app IDs for better traceability during template generation failures. - Added checks to ensure appId is available before updating generation status, preventing unnecessary updates. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: enhance WorkflowAPPForm with dynamic polling and status tracking - Introduced a new state to control polling based on user interactions and template status, improving responsiveness during regeneration scenarios. - Added logic to track previous status for better detection of status changes, ensuring accurate updates during template generation. - Updated useEffect hooks to manage polling state and status changes effectively, preventing unnecessary re-renders and ensuring compliance with coding standards. - Enhanced TemplateStatusBadge component with proper styling using Tailwind CSS. - Ensured compliance with optional chaining and nullish coalescing for safer property access. * feat: add template generation status queries and hooks - Introduced new queries and hooks for retrieving and managing template generation status, enhancing the workflow app's capabilities. - Implemented ensureQueryData and prefetchQuery functions for efficient data handling. - Updated the OpenAPI schema to include the new endpoint for fetching template generation status. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. - Enhanced the useTemplateGenerationStatus hook to support polling and manual control for better user experience. * feat: update template generation messages in i18n translations - Revised translation strings for template generation status in both English and Chinese to provide clearer user feedback. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * refactor: streamline WorkflowAPPForm and template status logic - Removed unused state and effects related to user switching and status tracking, simplifying the component's logic. - Updated polling logic to dynamically control based on template content and status, enhancing performance. - Refactored shouldShowStatusBadge function to eliminate unnecessary parameters, focusing on essential status checks. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: add TemplateEditorSkeleton component for improved user experience - Introduced TemplateEditorSkeleton to provide a skeleton loading screen during template generation states, enhancing user feedback. - Updated WorkflowAPPForm to conditionally render the skeleton based on template content and status, improving responsiveness. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * refactor: update WorkflowAPPForm logic for form and skeleton display - Enhanced the conditions for displaying the form and skeleton screen based on template status and content availability, improving user interaction. - Clarified comments to better explain the logic for showing the editor, form, and skeleton states. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * feat: rm Status badge * feat: add updating message to i18n translations - Introduced a new translation string for the updating state in both English and Chinese, enhancing user feedback during template updates. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * refactor: remove status badge from WorkflowAPPForm - Eliminated the status badge from the top-right corner of the WorkflowAPPForm, streamlining the component's display logic. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * refactor: remove unused template status badge and related logic - Deleted the TemplateStatusBadge component and its references from WorkflowAPPForm, simplifying the component structure and improving maintainability. - Updated i18n translations by removing outdated template status messages, retaining only the necessary updating message for clarity. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * feat: add prompt caching to bedrock provider (#1822) feat: Add prompt caching support with cache write token tracking - Add cacheWriteTokens field to TokenUsageItem schema for tracking cache creation tokens - Implement cache token extraction from AWS Bedrock and Anthropic usage metadata - Support multiple field name variations for cache tokens across different providers - Fix token calculation logic to correctly handle cache read/write tokens separately - Add logging for cache hit events with detailed token breakdown - Update provider dependencies to support new caching features - Refactor message content handling with proper type assertions * fix: Remove duplicate token credit usage (#1835) * feat: enhance subscription store and workflow app integration (#1837) - Updated the subscription store to manage credit insufficient modal visibility with improved state handling. - Integrated subscription store into WorkflowAppPage to conditionally display error messages based on modal visibility. - Enhanced WorkflowAPPForm to check credit balance before executing workflows, ensuring better user feedback and experience. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * fix: restore original PriceContent style & prioritize vouchers with Stripe promo code (#1843) * refactor: remove `PricingModal` component and integrate pricing display into `priceContent` and `subscribe-modal` components. * feat: Make voucher expiration configurable via `app.config` and reduce the daily popup trigger limit. * Fix/optimize shift tab animate (#1836) * fix: Reduce template list opacity transition duration from 300ms to 1ms. * feat: add GithubStar component to TopToolbar for enhanced user engagement - Integrated the GithubStar component into the TopToolbar, improving visibility for users to engage with the project. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * refactor: update avatar handling and improve user profile management … (#1840) * refactor: update avatar handling and improve user profile management in AccountSetting component - Changed avatarKey state initialization to use undefined instead of an empty string for better type safety. - Updated avatarStorageKey assignment to use nullish coalescing for handling undefined values. - Simplified userProfile handling by setting avatarKey to undefined directly, ensuring consistent state management. - Enhanced component performance by adhering to coding standards, including optional chaining and nullish coalescing for safer property access. * feat: enhance chat box and copilot message components with telemetry logging - Updated handleSendMessage in ChatBox to log events when messages are sent, capturing the source of the action. - Modified handleRetry in CopilotMessage to include logging for retry actions, improving event tracking. - Removed redundant logEvent call in ChatActions to streamline the code. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * fix: update logging property name in CopilotMessage component - Changed the property name from 'source_type' to 'source' in the telemetry logging for retry button clicks, improving clarity and consistency in event tracking. - Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access. * feat: Add auto model routing info in action result (#1838) add auto model routing info in action result * feat: enhance PlanItem component with login handling and button state… (#1844) feat: enhance PlanItem component with login handling and button state management - Added source prop to PlanItem for conditional navigation during login. - Improved button state logic to differentiate between logged-in and guest users. - Updated button text to show "Get Started" for non-logged-in users. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat(workflow-app): optimize cover image upload with compression and preloading (#1842) * fix: Reduce template list opacity transition duration from 300ms to 1ms. * feat: replace banner.svg with banner.png for improved image handling in workflow app * feat: replace banner.png with banner.webp for improved image format in workflow app * feat: enhance image compression utility with WebP support and format handling - Added support for WebP format in image compression options. - Implemented a check for WebP support in the user's browser. - Updated canvasToBlob function to handle different image formats based on availability. - Improved file naming logic to reflect the actual image format used during compression. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: Support credit billing for cached tokens (#1848) credit usage for cache * feat: Add file-type User Input support with optional handling and publish validation (#1847) * feat: Add validation for required file inputs, track missing optional file inputs, and enable auto-editing of variables with error display. * feat: Validate required workflow variables for completeness before template publishing, add i18n messages, and include a file input implementation plan document. * feat: Enhance variable extraction to include a default `required` field for all variables, improve resource type detection, and document file input implementation. * feat: enhances observability and tracing infrastructure (#1846) * WIP[3]: verify langfuse trace data completeness - Add toolDefinitions, systemPrompt, modelConfig to agent invoke metadata - langfuse-sdk v4 OpenTelemetry integration auto-records metadata to Generation - Fix api-server.sh restart orphan process issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * WIP[4]: remove redundant metadata fields (systemPrompt, modelConfig) Phase 6: Optimize Langfuse trace payload size Changes: - Remove systemPrompt from metadata (already in input[0]) - Remove modelConfig from metadata (duplicates modelParameters) - Silence console.log in tracer/providers (Phase 5 cleanup) Results: - Metadata size reduced from ~9.7KB to ~4.4KB per generation (-54%) - Total savings: ~10KB per agent invocation (2 generations) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat(observability): filter internal metadata from Langfuse traces Reduce Langfuse trace payload size by filtering out redundant metadata: - Add FilteredLangfuseCallbackHandler to remove LangGraph/LangChain internal fields (langgraph_*, ls_*, __pregel_*) that duplicate top-level Langfuse fields or are not useful for trace analysis - Slim down resourceAttributes in tracer.ts mask function, keeping only service.name, host.name, and process.runtime.version - Use new filtered handler in skill-invoker.service.ts This reduces Generation metadata from ~27 keys to ~15 keys per trace. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: HanYuanxi <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * fix: preserve active credit recharge records after cancellation (#1849) refactor: remove credit recharge expiration logic from subscription service - Removed the logic for expiring active credit recharge records upon subscription cancellation to streamline the process. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat: restore canvas duplication for new system (#1850) feat: Enable canvas and workflow duplication/sharing UI features, improve template generation enqueueing, enhance drive file duplication logic, and add image processing research documents. * fix: update default subscription interval to yearly (#1851) fix: update default subscription interval in PlanItem component from monthly to yearly * fix: enhance object storage error handling and object key normalization (#1852) - Added `normalizeObjectKey` method to MinioStorageBackend to ensure object keys are formatted correctly. - Introduced `isNotFoundError` method to handle various error cases consistently when accessing MinIO. - Updated methods in MinioStorageBackend to utilize normalized keys and improved error logging. - Refactored DriveService to handle missing storage keys and stream more robustly, throwing appropriate exceptions when necessary. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * optimize to truncate the context and tool output * feat: Enhance context management and compression for agent tools - Introduced ToolType for post-processing selection in AgentBaseTool. - Added 'copilot' model scene and corresponding default model configuration. - Implemented archiving options in UpdateWorkflowVariablesRequest and UpsertDriveFileRequest. - Added ArchivedRef and context management utilities for efficient message handling. - Developed compressAgentLoopMessages function to manage context during agent iterations. - Enhanced context block truncation and archived references handling. - Updated utility exports to include context-manager functionalities. * feat: Update link filtering constants to allow more diverse results * feat: Enhance ComposioService and Token utilities for improved context handling and compression - Updated ComposioService to include 'heygen' as a valid integration for generic API key usage. - Refactored langchainConfig type casting to ensure compatibility. - Modified result handling to return full result object instead of a simplified error message. - Removed estimateTokens and estimateMessagesTokens functions from token utilities to streamline token counting. - Integrated countToken and countMessagesTokens for precise token calculations in various contexts. - Enhanced Agent class to calculate tool tokens for better budget estimation during agent loops. - Adjusted context manager to implement cache-friendly compression strategies, preserving essential message context. - Implemented truncation logic for ToolMessages to fit within budget constraints. - Updated pnpm-lock.yaml to reflect dependency changes. * feat: Add 'nodejs' to Language type for improved language support * feat: refactor sharing to shared-voucher mode with payment-based rewards (#1856) * feat: Enhance voucher invitation and sharing logic with improved verification, claimant usage, owner rewards, updated popup limit, and new documentation. * docs: Add voucher refactor plan and image processing research documents, and reduce daily voucher popup trigger limit. * fix: optimize FilePreview performance with content truncation and rendering improvements (#1857) * feat: Enhance file preview with expanded language and file type support, markdown truncation, and detailed workflow abort logging. * feat: decrease file preview truncation limits and use CodeViewer for code previews * feat: Increase the maximum number of preview lines for markdown and code files from 1000 to 2000. * refactor: Translate comments in file preview components from Chinese to English. * feat: add ResetPasswordModal to login page (#1855) - Integrated ResetPasswordModal component into the LoginPage for enhanced user experience. - Ensured compliance with coding standards, including proper component structure and styling with Tailwind CSS. * feat(workflow-app): preserve workflow products when ending execution (#1854) * feat(workflow-app): enhance execution polling and URL management - Updated error handling in useWorkflowExecutionPolling to include data error codes. - Refactored WorkflowAppPage to retrieve executionId from URL query parameters and manage it with useSearchParams. - Introduced a helper function to update executionId in the URL, maintaining it for debugging purposes. - Improved performance by using refs to store stopPolling and previous shareId, preventing unnecessary re-renders. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * feat(workflow-app): improve runtime file fetching logic during execution - Updated the logic to fetch drive files for runtime products to include fetching during execution when nodes are finished. - Simplified the condition to check for canvasId and removed unnecessary checks for isRunning. - Enhanced the dependency array in useEffect to include nodeExecutions for better performance and accuracy. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * fix: cache points for bedrock prompt caching (#1858) - Implemented two-level caching strategy: - Global static point: caches system prompt across all sessions (index 0) - Session dynamic points: caches recent conversation history (last 3 messages before user query) - Replaced `instanceof` checks with `_getType()` method to properly handle deserialized messages - Added support for caching AI messages with tool calls * feat: add invite redirect page (#1859) * feat: Implement invite redirection to handle voucher codes, preserve invite parameters during redirects, and rename tool call ID generation. * fix: retrieve invite code from 'invite' query parameter instead of 'code' * feat: implement pending redirect storage for payment and OAuth flows (#1860) - Added `storePendingRedirect` functionality across multiple components to preserve the current page for redirection after payment and OAuth callbacks. - Updated `CreditPacksModal`, `PriceContent`, `CreditInsufficientModal`, `VoucherPopup`, `LoginModal`, and `LoginPage` to utilize the new redirect storage mechanism. - Enhanced `useHandleUrlParamsCallback` to manage pending redirects effectively after payment success or OAuth login. * fix: Standardize invite link path to `/invite` and enhance invite redirection with SPA navigation. * feat: Implement invite redirection to handle voucher codes, preserve invite parameters during redirects, and rename tool call ID generation. * fix: retrieve invite code from 'invite' query parameter instead of 'code' * feat: Standardize invite link path to `/invite` and enhance invite redirection with SPA navigation. * Fix/Adjust plan priority (#1853) * fix: update default subscription interval in PlanItem component from monthly to yearly * fix: update PlanPriorityMap to correct starter plan priority from 1 to 2 * feat: implement tool-based auto model routing (#1861) - Add tool-based routing logic to AutoModelRouter with configurable target tools and model selection - Extend RouterContext with scene and toolsets fields for routing decision - Add getToolBasedRoutingConfig utility to read routing config from environment variables - Integrate tool-based routing in SkillService and WorkflowService by passing scene and toolsets context * feat: implement global audio manager and default agent title fallback (#1863) * feat: implement global audio manager for single audio playback control - Added AudioManager class to manage audio playback, ensuring only one audio plays at a time. - Integrated audio manager with AudioRenderer component to register audio elements and handle play/pause events. - Ensured compliance with coding standards, including proper use of hooks and Tailwind CSS for styling. * feat: add default agent title to translations for English and Chinese - Added 'defaultAgentTitle' key to the translations in both English and Chinese files to provide a fallback title for agents. - Updated WorkflowAppPage to utilize the new translation key when rendering node titles and current step titles, ensuring a consistent user experience. - Ensured compliance with coding standards, including optional chaining and nullish coalescing for safer property access. * fix: update unauthenticated invite redirect to use a full page reload. * feat: Implement invite redirection to handle voucher codes, preserve invite parameters during redirects, and rename tool call ID generation. * fix: retrieve invite code from 'invite' query parameter instead of 'code' * feat: Standardize invite link path to `/invite` and enhance invite redirection with SPA navigation. * feat: update unauthenticated invite redirect to use a full page reload. * enhance token estimation and truncation methods for improved performance feat: enhance token estimation and truncation methods for improved performance * enhance document generation by adding fileId placeholder support feat: enhance document generation by adding fileId placeholder support and URL replacement * fix: update translation queries in English and Chinese (#1870) * Updated query1 in both English and Chinese translation files to reflect new instructions for using Perplexity to analyze YouTube creators related to a product. * Ensured compliance with coding standards, including proper string literal usage and translation consistency. * feat: Add invite page to public access pages whitelist (#1874) feat: Add invite page check to `useIsSharePage` hook, ignore `.serena` files, and configure SCSS formatter in VS Code. * refactor: update default selected credit pack in CreditInsufficientModal (#1876) * Removed credit pack options for 100 and 500 credits. * Changed default selected credit pack from 100 to 1000 for users with a paid subscription. * Ensured consistency in credit pack options displayed for users. * feat: remove file type restrictions and fix unsupported file download (#1883) feat: Enhance resource import by preventing save during upload, add file download loading states, and configure Serena project settings. --------- Co-authored-by: lefarcen <[email protected]> Co-authored-by: Siri-Ray <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: nettee <[email protected]> Co-authored-by: orbisai0security <[email protected]> Co-authored-by: orbisai0security <[email protected]> Co-authored-by: Achieve <[email protected]> Co-authored-by: Sophia <[email protected]> Co-authored-by: PerishFire <[email protected]> Co-authored-by: HanYuanxi <[email protected]> Co-authored-by: a1chzt <[email protected]>
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.