-
Notifications
You must be signed in to change notification settings - Fork 6.9k
adding redirectUrl to credits purchasing experience #5158
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
|
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.
Pull Request Overview
This PR enhances the credits purchasing experience by adding a redirect URL parameter to automatically return users to the VS Code extension after completing their purchase. The change appends a callback URL based on the extension's URI scheme to the buy credits URL.
- Adds automatic redirect functionality after credit purchase completion
- Integrates with the extension's URI scheme for proper callback handling
- Maintains backward compatibility with existing URL structure
ba68973
to
eab7554
Compare
Coverage ReportExtension CoverageBase branch: 47% PR branch: 48% β Coverage increased or remained the same Webview CoverageBase branch: 17% PR branch: 17% β Coverage increased or remained the same Overall Assessmentβ Test coverage has been maintained or improved Last updated: 2025-07-30T21:27:46.275894 |
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.
Tested and verified this
* Fix code index secret persistence with async VSCode storage - Add async secret methods to CodeIndexConfigManager - Implement direct VSCode secret storage access bypassing ContextProxy cache - Update loadConfiguration to use async secret loading - Modify webview message handler to use new async secret storage - Add public secret methods to CodeIndexManager - Enhance debugging throughout secret flow This fixes the issue where API keys were saved but not loaded immediately into services due to ContextProxy cache synchronization issues. * Fix code index secret persistence and test failures - Add async secret handling to CodeIndexConfigManager with new methods: - getSecretAsync(), storeSecretAsync() for individual secrets - loadSecretsAsync(), storeSecretsAsync() for batch operations - Update doesConfigChangeRequireRestart() to check OpenAI Compatible modelDimension changes - Fix all failing tests by using setupSecretMocks() helper consistently - Update manager.spec.ts to properly mock _recreateServices to avoid real service creation This ensures API keys and other secrets are properly loaded from VSCode's async secret storage and that configuration changes requiring service restart are correctly detected. * feat: improve code index settings secret handling in UI - Show placeholder dots (β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’) in password fields when secrets are already set - Only send modified secret fields to prevent overwriting existing secrets with empty values - Track which fields have been modified by the user - Add requestCodeIndexSecretStatus message handler to check if secrets exist - Fix console.log to handle empty string keys without errors - Ensure changing one setting doesn't clear other unmodified secrets * refactor: disconnect code index from unified settings system - Rename handleExternalSettingsChange to handleSettingsChange for clarity - Remove handleSettingsChange call from ClineProvider (not related to code index) - Remove codebaseIndexConfig from general settings save in SettingsView - Delete unused codebaseIndexConfig message handler - Remove codebaseIndexConfig from WebviewMessage type definition - Code index settings are now fully independent with their own dedicated UI * feat: separate code index enable/disable from indexing settings - Move 'Enable codebase indexing' toggle to global settings in Experimental section - Keep indexing-specific settings (API keys, URLs, models) in dedicated Code Index Settings component - Add codebaseIndexEnabled handler to webview message handler - Update translations with new settings title and disabled message - Ensure code index service properly responds to enable/disable changes - Maintain backward compatibility with existing codebaseIndexConfig structure * refactor: remove ContextProxy.getVSCodeContext() and pass ExtensionContext directly - Updated CodeIndexConfigManager to accept vscode.ExtensionContext in constructor - Modified CodeIndexManager to pass context directly to CodeIndexConfigManager - Updated webviewMessageHandler to use provider.context.secrets directly - Removed getVSCodeContext() method from ContextProxy - Updated all related tests to reflect these changes - Fixed CodeIndexSettings webview tests after UI changes * refactor: streamline secret handling by removing async methods and utilizing ContextProxy directly * feat: translations and popover component * refactor: simplify test mocks and improve checkbox handling in CodeIndexSettings tests * refactor: remove debug logging from CodeIndexConfigManager, CodeIndexManager, CodeIndexServiceFactory, and QdrantVectorStore * fix: merge missing translation keys from main after rebase - Add advancedConfigLabel, searchMinScoreLabel, searchMinScoreDescription, searchMinScoreResetTooltip keys - Update startIndexingButton and clearIndexDataButton labels to match main - Preserve all CodeIndexPopover translations added in this PR * Revert "fix: merge missing translation keys from main after rebase" This reverts commit beb1de4. * fix: add missing translation keys from main branch after rebase - Added codeIndex.advancedConfigLabel - Added codeIndex.searchMinScoreLabel - Added codeIndex.searchMinScoreDescription - Added codeIndex.searchMinScoreResetTooltip These keys exist on main but were missing from non-English locales after rebase. * fix: remove clickIndicatorMessage, fix toggle message type, and clean up translation key inconsistencies * refactor: streamline settings management in CodeIndexPopover and improve secret handling * refactor: remove debug logging from configuration checks in CodeIndexConfigManager and webviewMessageHandler * fix: translations * refactor: remove CodeIndexSettings component and associated tests
Related Issue
Issue: #XXXX
Description
Test Procedure
Type of Change
Pre-flight Checklist
npm test
) and code is formatted and linted (npm run format && npm run lint
)npm run changeset
(required for user-facing changes)Screenshots
Additional Notes
Important
Adds
callback_url
tobuyCreditsUrl
inCreditLimitError.tsx
for post-purchase redirection.callback_url
parameter tobuyCreditsUrl
inCreditLimitError.tsx
to redirect users after purchasing credits.callbackUrl
usinguriScheme
fromuseExtensionState
.CreditLimitError
component to usefullPurchaseUrl
withcallback_url
for the "Buy Credits" button link.This description was created by
for eab7554. You can customize this summary. It will automatically update as commits are pushed.