-
Notifications
You must be signed in to change notification settings - Fork 36
Add test plans for context size donut and rate limit warning banner (0.17.0 endgame) #148
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
...copilot.eclipse.swtbot.test/test-plans/context-size-donut/context-size-donut.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Context Size Donut and Popup | ||
|
|
||
| ## Overview | ||
| Tests the context size donut chart widget and its hover popup in the GitHub Copilot | ||
| for Eclipse chat view. A `ContextSizeDonut` widget is rendered in the chat view's | ||
| `ActionBar` control bar. It displays a ring that fills proportionally based on the | ||
| token utilization percentage received via the LSP `ContextSizeInfo` payload. At | ||
| ≥90 % utilization the ring switches to a warning color. Hovering over the donut | ||
| opens a `ContextWindowPopup` that shows a breakdown of token usage by category. | ||
|
|
||
| Entry points: | ||
| - **Copilot Chat view** → bottom control bar (the donut appears after the first | ||
| response is received that includes `ContextSizeInfo`). | ||
| - Hover the donut to open the **Context Window** popup. | ||
|
|
||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated. | ||
| - A valid GitHub Copilot subscription is active (authentication completed). | ||
| - The Copilot Chat view is open and visible in the workbench. | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Donut Widget Visibility | ||
|
|
||
| ### TC-001: Donut appears after first response | ||
|
|
||
| **Type:** `Happy Path` | ||
| **Priority:** `P1` | ||
|
|
||
| #### Preconditions | ||
| - The Copilot Chat view is open. | ||
| - No previous conversation is loaded (fresh session or new conversation). | ||
|
|
||
| #### Steps | ||
| 1. Open the Copilot Chat view. | ||
| 2. Confirm the donut widget is **not** visible in the bottom control bar (no | ||
| `ContextSizeInfo` has been received yet). | ||
| 3. Send a short chat message (e.g. "Hello") and wait for a response. | ||
| 4. Inspect the bottom control bar of the chat view. | ||
|
|
||
| #### Expected Result | ||
| - Before the first response the donut is not visible (or shows an empty/zero state). | ||
| - After the first response arrives the donut widget appears in the control bar. | ||
| - No error dialog or exception is logged. | ||
|
|
||
| #### 📸 Key Screenshots | ||
| - [ ] **Before response** — chat view control bar with no donut. | ||
| - [ ] **After response** — chat view control bar showing the donut widget. | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Context Window Popup | ||
|
|
||
| ### TC-002: Hovering the donut opens the Context Window popup | ||
|
|
||
| **Type:** `Happy Path` | ||
| **Priority:** `P1` | ||
|
|
||
| #### Preconditions | ||
| - The donut widget is visible (at least one response received). | ||
|
|
||
| #### Steps | ||
| 1. Hover the mouse cursor over the donut widget in the control bar. | ||
| 2. Wait for the popup to appear. | ||
| 3. Inspect the popup header. | ||
| 4. Inspect the popup body for: total token count, utilization percentage, progress | ||
| bar, and per-category rows. | ||
| 5. Move the mouse away from the donut. | ||
|
|
||
| #### Expected Result | ||
| - The popup opens with the header **"Context Window"**. | ||
| - Total usage is displayed in the format `X / Y tokens`. | ||
| - A utilization percentage is shown. | ||
| - A progress bar reflects the utilization level. | ||
| - Per-category rows are shown: **System Instructions**, **Tool Definitions**, | ||
| **Messages**, **Attached Files**, **Tool Results**. | ||
| - Moving the mouse away closes the popup. | ||
|
|
||
| #### 📸 Key Screenshots | ||
| - [ ] **Popup open** — the Context Window popup showing all fields. | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Edge Cases | ||
|
|
||
| ### TC-003: Donut resets when a new conversation is started | ||
|
|
||
| **Type:** `Edge Case` | ||
| **Priority:** `P2` | ||
|
|
||
| #### Steps | ||
| 1. Start a conversation and let the donut show some utilization. | ||
| 2. Start a new conversation (clear or new session). | ||
| 3. Observe the donut state before any new response. | ||
|
|
||
| #### Expected Result | ||
| - The donut resets (hidden or zero state) for the new conversation until a | ||
| response with `ContextSizeInfo` is received. |
101 changes: 101 additions & 0 deletions
101
...e.swtbot.test/test-plans/rate-limit-warning-banner/rate-limit-warning-banner.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Rate Limit Warning Banner | ||
|
|
||
| ## Overview | ||
| Tests the rate limit warning banner in the GitHub Copilot for Eclipse chat view. | ||
| When the Copilot language server emits a `$/copilot/rateLimitWarning` LSP | ||
| notification, a `StaticBanner` widget is displayed above the action bar input | ||
| area. The banner shows the server-provided human-readable message, a | ||
| "Get more info" hyperlink to `https://aka.ms/github-copilot-rate-limit-error`, | ||
| and a "Dismiss" button. The banner is wired via an OSGi event topic | ||
| (`TOPIC_RATE_LIMIT_WARNING`) from `CopilotLanguageClient` → `ChatView` → | ||
| `ActionBar`. Navigating chat history hides/shows the banner appropriately. | ||
|
|
||
| Entry points: | ||
| - Triggered automatically by a `$/copilot/rateLimitWarning` LSP notification. | ||
| - Dismissed manually via the "×" button on the banner. | ||
|
|
||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated. | ||
| - A GitHub account signed in with a Copilot subscription that has measurable | ||
| usage quota (so that rate limit notifications can be triggered or simulated). | ||
| - A way to trigger or mock a `$/copilot/rateLimitWarning` LSP notification — | ||
| options include: | ||
| - Exhausting the quota for the account. | ||
| - Injecting the notification via a debug breakpoint in `CopilotLanguageClient`. | ||
| - Using a test harness / mock language server. | ||
| - The Copilot Chat view is open and visible in the workbench. | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Banner Appearance | ||
|
|
||
| ### TC-001: Banner appears in non-handoff mode on rate limit warning | ||
|
|
||
| **Type:** `Happy Path` | ||
| **Priority:** `P1` | ||
|
|
||
| #### Preconditions | ||
| - The Copilot Chat view is open in a **non-handoff** (standard) chat mode. | ||
|
|
||
| #### Steps | ||
| 1. Trigger a `$/copilot/rateLimitWarning` notification (type: "weekly" or | ||
| "session") from the language server while in standard chat mode. | ||
| 2. Observe the area above the chat input field in the Action Bar. | ||
|
|
||
| #### Expected Result | ||
| - A warning banner appears above the action bar input area. | ||
| - The banner text matches the `message` field from the LSP notification. | ||
| - No error dialog or exception is logged. | ||
|
|
||
| #### 📸 Key Screenshots | ||
| - [ ] **Banner visible** — chat view showing the rate limit warning banner. | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Banner Content | ||
|
|
||
| ### TC-002: Banner contains "Get more info" link and Dismiss button | ||
|
|
||
| **Type:** `Happy Path` | ||
| **Priority:** `P1` | ||
|
|
||
| #### Preconditions | ||
| - The rate limit warning banner is currently visible in the chat view. | ||
|
|
||
| #### Steps | ||
| 1. Locate the **"Get more info"** link in the banner. | ||
| 2. Click the link. | ||
| 3. Locate the **"×"** (Dismiss) button in the banner. | ||
|
|
||
| #### Expected Result | ||
| - The "Get more info" link opens `https://aka.ms/github-copilot-rate-limit-error` | ||
| in the system default browser (or Eclipse's internal browser). | ||
| - The "×" button is visible and interactive. | ||
|
|
||
| #### 📸 Key Screenshots | ||
| - [ ] **Banner with link and dismiss button** — close-up of the banner widget. | ||
|
|
||
| --- | ||
|
|
||
| ### TC-003: Dismiss button closes the banner | ||
|
|
||
| **Type:** `Happy Path` | ||
| **Priority:** `P1` | ||
|
|
||
| #### Preconditions | ||
| - The rate limit warning banner is currently visible. | ||
|
|
||
| #### Steps | ||
| 1. Click the **"×"** (Dismiss) button on the banner. | ||
| 2. Observe the chat view layout. | ||
|
|
||
| #### Expected Result | ||
| - The banner is removed from the chat view immediately. | ||
| - The chat input area expands to fill the space previously occupied by the banner. | ||
| - No exceptions or layout glitches occur. | ||
|
|
||
| #### 📸 Key Screenshots | ||
| - [ ] **After dismiss** — chat view with banner removed. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.