forked from aws/aws-toolkit-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/q transform tests #1
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
Open
damntrecky
wants to merge
637
commits into
master
Choose a base branch
from
chore/q-transform-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
* feat(amazonq): reword settings + import old CW settings Problem: Some of the wording of the settings was off. Also, changing the name of the settings = a brand new setting in VS Code. Solution: In order to preserve trust, we will try to import old settings users may have had. Extensions leave settings behind when they are uinstalled, so we can detect the old CW settings and import them into the new ones named after Amazon Q. This creates a seamless setting experience for migrating users. * add . * disable lint for long line * update config change events * use and update already existing migration function
New reauth page for Amazon Q - When we detect the login page must be shown, we will then determine if a reauth is required. If so, we show the reauth page. Otherwise, we show the login page - In the root.vue is where we determine which "auth flow" we are in and then show the appropriate auth page (currently Login vs Reauth) - The Reauth page is designed to have all state determined outside of the Vue file itself, and instead managed in the backend code. Our front end connects to an event emitter from the backend. When emitter fires on a change with the auth connection, the frontend will refresh itself, pulling in all the current state data from the backend. This allows us to have more control in the backend over what we show and it centralizes our state to a single place. - Did some realignment in the CSS of the Login vue to center it Signed-off-by: Nikolas Komonen <[email protected]>
…rmationPlanInHub' (aws#4795) problem: command is declared twice in package.json. This results in an error in the extension page under runtime status. solution: remove extra command from package.json
Problem: "AWS Toolkit" prefix is verbose and requires more typing to find results when using the command palette. Solution: Revert to the "AWS" prefix for commands.
Problem: - quick actions list should not have a title anymore and needs a separator between /transform, /dev commands and the /help, /clear commands. - Webview content is not fitting to its parent panel Solution: - Updated quick action commands group look&feel with mynah-ui v4.6.4 - Removed the groupName from /dev group. /transform and /dev combined in one group. - Applied necessary body and html width and height styles to the webview's content which were not coming from mynah-ui.
Problem Having both `Fix with Q` and `Apply Fix` options is redundant. Solution - Combine `Explain with Q` and `Fix with Q` commands into `aws.amazonq.explainIssue` - Update prompt for `aws.amazonq.explainIssue` command to include the entire `CodeScanIssue` JSON object
* fix toolkit conn reuse * toolkit reuse * fix nav bug * revise * fix nav jump * source * fix edge case when source is not there * use isValidCodeCatalystConnection * refactor
Problem: - We don't need to re-show scopes since they were on the last auth page Solution: - Use a more generic message instead
- Default region to us-east-1 - Capitalize 'Use for free', 'Use professional license' - 'IAM Credential' -> 'IAM Credentials' - hover cursor for buttons - not-allowed cursor for disabled continue button - put back button on its own line with padding - put a little padding on the bottom of 'Sign in with SSO' - unbold input titles - add hover color to login selection options * default region, pointer cursor on buttons, string update * hover color, spacing, back button new line, non bold field titles * restore original v-if on the login buttons * fix iam credentials back button
- auth_addConnection - when successfully connected - if the user cancels by hitting back button or leaving the sign in view - ui_click events - Prevent user from continuing auth flow if a region is not selected. * feat(telemetry): new auth page telemetry - auth_addConnection - when successfully connected - if the user cancels by hitting back button or leaving the sign in view - ui_click events Todo: - Docs - verify metadata fields - auth_loginWithBrowser needs source, but this is a high effort and risky task. * docs and various fixes * fix circular dependency, small changes * fix build issues * fixes after merge
…#4799) * fix(q): update welcome message and menu item description for /dev
Problem Settings command is displayed as Amazon Q: Amazon Q Settings. Solution Remove duplicate items.
* fix(auth): enforce 5 scopes when reauthing amazon q Problem: Users can keep an old 3 scope connection if they continue to reauth with the notification once auth expires. Solution: Any call to the amazon q's reauth function enforces 5 scopes, which will fix the reauth notification. - Does NOT update the case where user reauths an amazon q connection via toolkit quickpick. That is more difficult. * update tests
Problem: Clicking anything other than 'open' in the VSC redirect url modal for the auth page would result in cancelling the auth attempt. Solution: Do not expect a specific response from the url modal. Allow the auth flow to continue even if the user hits 'Cancel' or 'Copy'. To cancel the auth flow, the user should click 'Cancel' in the login ui OR leave the login ui.
Telemetry implementation, updating response colors to be shown in the Webview, and return intended line numbers in problems panel. Corresponding PR for new metrics in aws-toolkit-common: aws/aws-toolkit-common#735
### Problem(s) - When Q panel opens, it doesn't autofocus to prompt input field - Inside chat body, if there is a code block inside a list item it shows <br/> tags - Prompt input field in Q Chat tabs doesn't stop after it reaches to the given maxLength - Links are not behaving as expected for middle mouse clicks inside a chat item. ### Solution(s) - Added autofocus to prompt field when the panel opens or there is a new tab. - Removed break generation for list items (which is the supposed way from markedjs and github's own markdown styling) - Prompt input maxLength value was used incorrectly, it was using the function declaration instead of the return value of the function. It is corrected. - As we do for the clicks, we also mapped the middle clicks (auxclick) to the same handler functions. * fixed autofocus to prompt field when Q panel is open fixed unexpected <br> tags inside code blocks in Q Chat fixed links are opening in Q panel with middle mouse clicks * Update packages/amazonq/.changes/next-release/Bug Fix-b8c7f55f-2986-48a9-91e7-cf143faf51fc.json Co-authored-by: Maxim Hayes <[email protected]> * Update packages/amazonq/.changes/next-release/Bug Fix-86b9e6a2-2d86-4be5-b362-93eb5f96568f.json Co-authored-by: Maxim Hayes <[email protected]> --------- Co-authored-by: Maxim Hayes <[email protected]>
* fix(amazonq): duplicate findings for multi-folder workspaces * fix tests * add comment
Problem: In AWS Toolkit 2.19 we only added the 3 CW scopes for BiD, but now with Amazon Q there are an additional 2 scopes (gumby/weaverbird). The issue is that connections made with 2.19 did not seamlessly transition in to the new standalone Q extension. Instead users needed to know to go to the Q login webview and select their existing BiD connection and have it reauthed to work with Q. Instead of the above behavior, if the user has the 3 scope connection, we want to auto connect to this connection but then mark it as expired so that the status bar icon for Q tells the user they need to reauth (yellow background and reauth icon). Repro Steps of current state (before this change): - Delete all connection cache from AWS + Amazon Q extensions first - Download AWS Toolkit 2.19 (this only adds the 3 scopes) - Connect to CW with BiD - Install the latest Amazon Q Note how the old connection is not automatically transitioned over, the status bar shows the 'X' as there is no connection. But if you open the Q login webview it will show BiD, then you can select that and things will work again. Solution: This commit changes the code to detect a 3 scope CW connection, then use it for Q but mark it as expired. So what will happen is that if you follow the repro steps above, but instead launch Amazon Q with this change, once you open the Q webview it will auto connect to the old connection but show it as expired in the status bar. Things that still need to be addressed: - The logic to check + use the 3 scope connection only triggers when the Amazon Q panel/webview is opened. Until it is opened nothing happens, and the user is not made aware to reauth in the status bar icon. A better solution is to move this logic to the backend code so we can trigger it without the need to open the webview. Or does it make sense to auto open the Q webview if we detect they only have the 3 scopes instead of 5 - If the status bar is shown as expired, then none of Q chat will work BUT the user will still be able to type messages in that (please verify this). Though it will say they need to reauth once they send the message. Do we want this behavior or to show the reauth page? Signed-off-by: Nikolas Komonen <[email protected]> Co-authored-by: Maxim Hayes <[email protected]>
Instead, just go to the amazon q panel reauth page and display a reauth toast. It is up to the user to initiate the auth flow.
Amazon Q 3 scopes to 5 scopes migration
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.
Problem
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.