Skip to content

Conversation

@lefarcen
Copy link
Contributor

@lefarcen lefarcen commented Dec 17, 2025

Summary

Add /invite page to isPublicAccessPageByPath function, allowing unauthenticated users to access the invite page.

Impact Areas

  • Other (Authentication / Routing)

Checklist

  • I understand that this PR may be closed in case there was no previous discussion or issues.
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Summary by CodeRabbit

  • New Features
    • The invite page is now publicly accessible, allowing users to access invitations without requiring login.

✏️ Tip: You can customize this high-level summary in your review settings.

…` files, and configure SCSS formatter in VS Code.
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Walkthrough

The pull request extends the public page access determination in the use-is-share-page hook by adding support for the '/invite' path, treating it as publicly accessible alongside existing public routes like '/pricing', '/share', and '/preview'.

Changes

Cohort / File(s) Summary
Public Access Path Extension
packages/ai-workspace-common/src/hooks/use-is-share-page.ts
Added isInvitePage check for pathname '/invite' and included it in the isPublicAccessPageByPath OR expression to classify the invite route as publicly accessible

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

  • Simple one-file change following an established pattern
  • Straightforward addition of a new condition check

Possibly related PRs

Suggested reviewers

  • mrcfps

Poem

🐰 A path appears, so new and bright,
/invite now shines in public light,
With pricing, share, and preview's glow,
More doors unlock for guests to go! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the invite page to the public access pages whitelist, which aligns with the modifications shown in the file summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/mashu/voucher-5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mrcfps mrcfps merged commit 0dd3ee7 into main Dec 17, 2025
1 of 2 checks passed
@mrcfps mrcfps deleted the feat/mashu/voucher-5 branch December 17, 2025 14:25
Copy link

@coderabbitai coderabbitai bot left a 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/hooks/use-is-share-page.ts (1)

15-16: Consider matching the defensive pattern used in line 14 for consistency.

For consistency with line 14's exact-match pattern, consider using nullish coalescing:

-  const isPricingPage = pathname === '/pricing';
-  const isInvitePage = pathname === '/invite';
+  const isPricingPage = (pathname ?? '') === '/pricing';
+  const isInvitePage = (pathname ?? '') === '/invite';

While functionally equivalent (both return false for null/undefined), this maintains consistency with the defensive coding style used elsewhere in the function.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31dbdd9 and dc2bc37.

📒 Files selected for processing (1)
  • packages/ai-workspace-common/src/hooks/use-is-share-page.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (14)
**/*.{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 + b instead of a+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/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/03-typescript-guidelines.mdc)

**/*.{ts,tsx}: Avoid using any type whenever possible - use unknown type 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 the import type syntax
Group type imports separately from value imports
Minimize creating local type aliases for imported types

Files:

  • packages/ai-workspace-common/src/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.ts
**/*.{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/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.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-4 or p-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/hooks/use-is-share-page.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/hooks/use-is-share-page.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/hooks/use-is-share-page.ts
⏰ 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 (1)
packages/ai-workspace-common/src/hooks/use-is-share-page.ts (1)

16-16: LGTM! Invite page successfully added to public access whitelist.

The implementation correctly adds /invite to the list of publicly accessible pages, following the established pattern for similar exact-match checks.

Also applies to: 25-26

mrcfps added a commit that referenced this pull request Dec 17, 2025
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.

Co-authored-by: lefarcen <[email protected]>
mrcfps added a commit that referenced this pull request Dec 18, 2025
* 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]>
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.

3 participants