Open
Conversation
Add QuickScript feature for AI-driven export of test cases to executable test code. Includes code repository integrations (GitHub, GitLab, Bitbucket, Azure DevOps), customizable export templates, LLM-powered code generation with streaming, and project-level configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comprehensive test coverage for new export template functionality: - SSRF protection (IPv4/IPv6, private ranges, protocols) - AI export helpers (markdown fence stripping, error chain formatting) - Code context service (term extraction, relevance scoring, path filtering) - Git repo adapters (GitHub, GitLab, Bitbucket, Azure DevOps) Also fix IPv6 SSRF bypass where URL.hostname returns bracketed addresses that did not match the regex patterns. Export 5 private helper functions for testability: stripMarkdownFences, formatAiError, applyPathPatterns, extractTerms, scoreFileRelevance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…generation without code contexts
- Upgraded 'ioredis' to version 5.10.0 in both package.json and pnpm-lock.yaml. - Updated '@types/node' to version 25.3.3 in testplanit/package.json. - Incremented versions for several dependencies including '@atlaskit/editor-jira-transformer' to 15.0.1, '@aws-sdk/client-s3' and '@aws-sdk/s3-request-presigner' to 3.1000.0, '@swagger-api/apidom-core' to 1.6.0, 'ai' to 6.0.105, 'axios' to 1.13.6, 'multer' to 2.1.0, 'react-day-picker' to 9.14.0, 'simple-icons' to 16.10.0, 'swagger-ui-react' to 5.32.0, and 'autoprefixer' to 10.4.27. - Adjusted various package specifications for better compatibility.
- Updated 'minimatch' versions in package.json and pnpm-lock.yaml to 5.1.8, 10.2.3, and 10.2.4 for improved compatibility. - Added new dependencies: 'node-forge', 'tar-fs', and 'glob' with specified versions. - Updated 'ioredis' to version 5.10.0 in testplanit/pnpm-lock.yaml. - Incremented '@types/node' to version 25.3.3 in testplanit/package.json. - Adjusted various package specifications for better compatibility. - Reformatted schema.zmodel for consistency in formatting.
… to schema.zmodel - Add LLM_BUDGET_ALERT value to NotificationType enum for budget alert notifications - Add alertThresholdsFired Json? field to LlmProviderConfig model for tracking fired thresholds per billing month Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Run zenstack generate to regenerate Prisma schema, model meta, and OpenAPI spec - Add alertThresholdsFired: null to all LlmProviderConfig mock objects in test files and route - TypeScript type-check passes with zero errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 28 tests covering threshold detection, deduplication, month boundary, notification delivery, notification content, early exits, decimal handling, alertThresholdsFired update, and spend aggregation - Tests fail because budgetAlertService.ts does not exist yet (TDD RED) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- BudgetAlertService.checkAndAlert detects newly crossed thresholds at 80%, 90%, 100% - Deduplication via alertThresholdsFired JSON field (per month key) - Notification fan-out to all ADMIN users per threshold via NotificationService - Early exit for deleted providers, null/zero budget, no config - Number() wrapping for all Prisma Decimal values (monthlyBudget, totalCost) - Atomic alertThresholdsFired update before notification delivery - Notification content includes provider name, dollar amounts, disclaimer - All 41 unit tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Import afterEach from vitest to fix TypeScript error TS2304 - Auto-fixed: Rule 1 bug (missing import caused type-check failure) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add BUDGET_ALERT_QUEUE_NAME constant to queueNames.ts - Add getBudgetAlertQueue() lazy-init function to queues.ts - Include budgetAlertQueue in getAllQueues() for admin dashboard access - Standard job options: 3 attempts, exponential backoff, 7-day retention Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create budgetAlertWorker.ts following auditLogWorker pattern - Worker processes check-budget jobs via BudgetAlertService.checkAndAlert - Add worker:budget-alert script and include in workers concurrently command - Add budget-alert-worker PM2 entry in ecosystem.config.js - Add budgetAlert i18n keys under admin.llm for Phase 3 UI use Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create 02-02-SUMMARY.md with execution results - Update STATE.md position to plan 2 of 3, 60% progress - Update ROADMAP.md plan progress for phase 02 - Mark CHCK-03 requirement as complete Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nd trackStreamUsage - Add budget-check job enqueue after updateRateLimit in both trackUsage() and trackStreamUsage() - Use dynamic import() to avoid circular dependencies (LlmManager -> queues -> valkey) - Enqueue is fire-and-forget: not awaited, errors caught and logged, never propagated - Skip providers without monthlyBudget (null or zero, including Ollama) - Use Number() conversion for Prisma Decimal comparison Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add alertThresholdsFired: {} to updateLlmProviderConfig data payload
- Clears previously fired thresholds when admin saves provider config
- Allows thresholds to fire again against updated budget values
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
.planning/ is in .gitignore but these files were tracked before the ignore rule was added. Removes them from version control while keeping local copies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…udgetPercentage i18n key - Pass currentSpend from usageByIntegrationId map through columns.tsx action cell - Add budgetPercentage i18n key to en-US.json budgetAlert section - Update EditLlmIntegrationProps interface to accept optional currentSpend prop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…o EditLlmIntegration dialog - Add Info icon import from lucide-react and Alert component import - Add tBudgetAlert translation namespace for budget alert i18n keys - Watch monthlyBudget field for reactive conditional rendering - Add disclaimer callout (Alert with Info icon) below monthlyBudget field - Display current month spend as "$X.XX of $Y.00" with i18n interpolation - Add color-coded progress bar: green (<80%), yellow (80-100%), red (>100%) - Show percentage text or "Over budget" label below progress bar - Section only visible when monthlyBudget > 0, responds to live edits Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Updated source maps for various workers including auditLogWorker, elasticsearchReindexWorker, emailWorker, notificationWorker, syncWorker, and testmoImportWorker. - Enhanced budget alert descriptions in en-US.json for clarity on spending targets and notifications.
- Updated budget alert descriptions for clarity in notifications. - Added budget disclaimer to the notification content for LLM budget alerts. - Improved color-coded progress bar in EditLlmIntegration dialog to reflect budget status. - Refactored styles to include success color variables for better UI feedback. - Adjusted translations in multiple languages to include budget disclaimer messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replaced instances of 'text-green-600' and related classes with 'text-success' for consistency in success indicators. - Updated background colors and badge styles to use 'bg-success' and 'bg-success/10' for improved UI feedback. - Ensured all relevant components reflect the new success color scheme for better visual coherence.
- Added access to QuickScript from both the repository and individual test cases. - Introduced a new column for default LLM provider configuration with toggle functionality. - Updated DeleteLlmIntegration component to prevent deletion of default integrations. - Enhanced EditLlmIntegration to disable options for default LLM providers. - Improved QuickScript modal to reflect the number of selected cases in the output mode label. - Updated translations for improved clarity and consistency across multiple languages.
…stCaseFormControl and TestCaseVersions - Updated TestCaseFormControl to use Badge component for displaying automated/manual status instead of Switch. - Refactored TestCaseVersions to reflect the same change, enhancing UI clarity and consistency. - Improved accessibility by ensuring proper aria-labels are maintained for the Badge component.
…ge support - Updated AddQuickScriptTemplate and EditQuickScriptTemplate components to include code highlighting using PrismJS. - Introduced language mapping for syntax highlighting in the QuickScript preview. - Improved UI for displaying highlighted code snippets in both add and edit modals. - Adjusted package.json to increase memory allocation for Zenstack generation.
…dapters - Updated error logging in generateAiExportBatch and generateAiExport functions for clearer output. - Added SSRF safety checks in AzureDevOpsRepoAdapter, BitbucketRepoAdapter, and GitLabRepoAdapter to prevent requests to unsafe URLs. - Introduced assertSsrfSafe method in GitRepoAdapter to validate URLs before making fetch requests.
…adapters - Introduced SSRF safety checks in AzureDevOpsRepoAdapter and GitLabRepoAdapter to validate URLs. - Updated error handling in formatError function for better clarity. - Enhanced MockResizeObserver in vitest setup for improved testing capabilities.
- Updated AzureDevOpsRepoAdapter, BitbucketRepoAdapter, and GitLabRepoAdapter to use sanitizeUrl for SSRF safety checks. - Enhanced GitRepoAdapter to include sanitizeUrl method, ensuring URLs are validated before fetch requests. - Improved code clarity and maintainability by centralizing URL sanitization logic.
- Updated the sanitizeUrl method to preserve trailing slashes for base URLs, preventing double-slashes during path concatenation. - Improved documentation for clarity on the method's functionality and its role in SSRF safety checks.
Contributor
Author
|
Do not merge this until the QuickScript demo is finished. Then add an upgrade notification including a link tot he demo. |
- Added details on mixed content errors related to file uploads when using MinIO with HTTPS. - Explained the necessity of setting `IS_HOSTED=true` in the environment to enable proxy mode for secure uploads. - Clarified the upload flow and provided an alternative configuration for public endpoint URLs to avoid mixed content issues. - Enhanced documentation for better understanding of proxy mode and its implications for file storage.
…nent - Added 'demo/' directory to .gitignore to prevent tracking of demo files. - Removed unused reference to 'workflows.id' in the EditWorkflow component for cleaner code.
- Changed the default value for the test details panel width from 100 to 40 for improved layout consistency during server-side rendering. - Updated the fallback logic in getInitialPanelRightWidth to reflect this change.
- Added `resolveSharedSteps` utility to enhance the fetching of steps in `exportActions` and `quickScriptActions`. - Updated the selection clause for steps to include additional fields such as `sharedStepGroupId`. - Modified the `fetchAllCasesForExport` and `fetchCasesForQuickScript` functions to resolve shared step references, ensuring accurate data retrieval. - Adjusted tests to reflect changes in data fetching behavior when resolving shared steps.
…ility and state management - Introduced unique IDs for ResizablePanel components across various pages to enhance accessibility and improve state management. - Updated panel configurations in Welcome, MilestoneDetailsPage, ProjectOverview, AddCaseModal, ProjectRepository, TestCaseDetails, TestCaseVersions, JunitTableSection, and Session pages. - Removed unused cookie handling logic related to panel widths for cleaner code.
- Updated the test for `resolveSharedSteps` to explicitly define the type of `cases`, ensuring better type safety and clarity in the test implementation.
- Removed the unused Badge import for cleaner code. - Adjusted formatting for better readability in the useIssueColumns function, including consistent line breaks and indentation for JSX elements.
… performance - Updated max_memory_restart from '512M' to '4G' to allow for greater memory usage. - Adjusted node_args from '--max-old-space-size=384' to '--max-old-space-size=3584' to optimize Node.js memory allocation.
- Replaced the previous validation method with a new function to identify invalid characters, including control characters and commas. - Updated error messages to specify the exact invalid character detected, enhancing user feedback during input validation. - Ensured consistent validation logic across AddCaseField, AddResultField, EditCaseField, and EditResultField components.
…omponents - Modified the header styling in DraggableFieldOptions to include a border and change the background color for improved visibility. - Updated the icon selection background color in FieldIconPicker to enhance user experience and visual consistency.
…ication - Introduced an `automated` property in various components including NameCell, TestCaseDetails, TestCaseNameDisplay, and CaseDisplay to better identify automated test cases. - Updated logic to display appropriate icons based on the `automated` status, improving visual representation of test case types. - Ensured consistent handling of the `automated` property across relevant components for better data management.
…nhanced test case identification - Added the `automated` property to multiple components including RepositoryCasesSection, TestCaseVersions, and CaseListDisplay to improve identification of automated test cases. - Updated data selection in queries and component props to ensure consistent handling of the `automated` flag across the application. - Enhanced visual representation of test cases by integrating the `automated` status in relevant displays.
… flexibility - Introduced a `compact` prop in MilestoneDisplay and MilestoneItemCard components to enable a more condensed layout. - Updated rendering logic in MilestoneItemCard to adjust styles based on the `compact` prop, enhancing responsiveness and usability. - Modified MilestonesSection to utilize the new `compact` feature, providing a streamlined view for users.
…sh and French translations - Updated the error message for invalid characters in the Spanish and French JSON files to specify the exact invalid character detected, enhancing user feedback during input validation. - Ensured consistency in the format of error messages across both language files for better clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces three major features and several supporting improvements:
alertThresholdsFiredfield,LLM_BUDGET_ALERTenum), aBudgetAlertService, budget progress UI in the LLM integration edit dialog, and automatic threshold reset on config save.Other changes
Related Issue
This PR implements #83
Type of Change
How Has This Been Tested?
Describe the tests you ran to verify your changes:
21 test files added/modified with ~2,960 lines of test code covering:
Checklist
Screenshots (if applicable)
Additional Notes
CaseExportTemplate,CaseExportTemplateProjectAssignment,CodeRepository,ProjectCodeRepositoryConfigbudgetAlertWorker/admin/quickscripts,/admin/code-repositories/projects/settings/[projectId]/quickscript