Skip to content

Commit 1f2b9d1

Browse files
authored
docs: Add test plans for context size donut and rate limit warning banner (0.17.0 endgame) (#148)
1 parent 4cc4ccd commit 1f2b9d1

2 files changed

Lines changed: 202 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Context Size Donut and Popup
2+
3+
## Overview
4+
Tests the context size donut chart widget and its hover popup in the GitHub Copilot
5+
for Eclipse chat view. A `ContextSizeDonut` widget is rendered in the chat view's
6+
`ActionBar` control bar. It displays a ring that fills proportionally based on the
7+
token utilization percentage received via the LSP `ContextSizeInfo` payload. At
8+
≥90 % utilization the ring switches to a warning color. Hovering over the donut
9+
opens a `ContextWindowPopup` that shows a breakdown of token usage by category.
10+
11+
Entry points:
12+
- **Copilot Chat view** → bottom control bar (the donut appears after the first
13+
response is received that includes `ContextSizeInfo`).
14+
- Hover the donut to open the **Context Window** popup.
15+
16+
---
17+
18+
## Prerequisites
19+
20+
- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated.
21+
- A valid GitHub Copilot subscription is active (authentication completed).
22+
- The Copilot Chat view is open and visible in the workbench.
23+
24+
---
25+
26+
## 1. Donut Widget Visibility
27+
28+
### TC-001: Donut appears after first response
29+
30+
**Type:** `Happy Path`
31+
**Priority:** `P1`
32+
33+
#### Preconditions
34+
- The Copilot Chat view is open.
35+
- No previous conversation is loaded (fresh session or new conversation).
36+
37+
#### Steps
38+
1. Open the Copilot Chat view.
39+
2. Confirm the donut widget is **not** visible in the bottom control bar (no
40+
`ContextSizeInfo` has been received yet).
41+
3. Send a short chat message (e.g. "Hello") and wait for a response.
42+
4. Inspect the bottom control bar of the chat view.
43+
44+
#### Expected Result
45+
- Before the first response the donut is not visible (or shows an empty/zero state).
46+
- After the first response arrives the donut widget appears in the control bar.
47+
- No error dialog or exception is logged.
48+
49+
#### 📸 Key Screenshots
50+
- [ ] **Before response** — chat view control bar with no donut.
51+
- [ ] **After response** — chat view control bar showing the donut widget.
52+
53+
---
54+
55+
## 2. Context Window Popup
56+
57+
### TC-002: Hovering the donut opens the Context Window popup
58+
59+
**Type:** `Happy Path`
60+
**Priority:** `P1`
61+
62+
#### Preconditions
63+
- The donut widget is visible (at least one response received).
64+
65+
#### Steps
66+
1. Hover the mouse cursor over the donut widget in the control bar.
67+
2. Wait for the popup to appear.
68+
3. Inspect the popup header.
69+
4. Inspect the popup body for: total token count, utilization percentage, progress
70+
bar, and per-category rows.
71+
5. Move the mouse away from the donut.
72+
73+
#### Expected Result
74+
- The popup opens with the header **"Context Window"**.
75+
- Total usage is displayed in the format `X / Y tokens`.
76+
- A utilization percentage is shown.
77+
- A progress bar reflects the utilization level.
78+
- Per-category rows are shown: **System Instructions**, **Tool Definitions**,
79+
**Messages**, **Attached Files**, **Tool Results**.
80+
- Moving the mouse away closes the popup.
81+
82+
#### 📸 Key Screenshots
83+
- [ ] **Popup open** — the Context Window popup showing all fields.
84+
85+
---
86+
87+
## 3. Edge Cases
88+
89+
### TC-003: Donut resets when a new conversation is started
90+
91+
**Type:** `Edge Case`
92+
**Priority:** `P2`
93+
94+
#### Steps
95+
1. Start a conversation and let the donut show some utilization.
96+
2. Start a new conversation (clear or new session).
97+
3. Observe the donut state before any new response.
98+
99+
#### Expected Result
100+
- The donut resets (hidden or zero state) for the new conversation until a
101+
response with `ContextSizeInfo` is received.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Rate Limit Warning Banner
2+
3+
## Overview
4+
Tests the rate limit warning banner in the GitHub Copilot for Eclipse chat view.
5+
When the Copilot language server emits a `$/copilot/rateLimitWarning` LSP
6+
notification, a `StaticBanner` widget is displayed above the action bar input
7+
area. The banner shows the server-provided human-readable message, a
8+
"Get more info" hyperlink to `https://aka.ms/github-copilot-rate-limit-error`,
9+
and a "Dismiss" button. The banner is wired via an OSGi event topic
10+
(`TOPIC_RATE_LIMIT_WARNING`) from `CopilotLanguageClient``ChatView`
11+
`ActionBar`. Navigating chat history hides/shows the banner appropriately.
12+
13+
Entry points:
14+
- Triggered automatically by a `$/copilot/rateLimitWarning` LSP notification.
15+
- Dismissed manually via the "×" button on the banner.
16+
17+
---
18+
19+
## Prerequisites
20+
21+
- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated.
22+
- A GitHub account signed in with a Copilot subscription that has measurable
23+
usage quota (so that rate limit notifications can be triggered or simulated).
24+
- A way to trigger or mock a `$/copilot/rateLimitWarning` LSP notification —
25+
options include:
26+
- Exhausting the quota for the account.
27+
- Injecting the notification via a debug breakpoint in `CopilotLanguageClient`.
28+
- Using a test harness / mock language server.
29+
- The Copilot Chat view is open and visible in the workbench.
30+
31+
---
32+
33+
## 1. Banner Appearance
34+
35+
### TC-001: Banner appears in non-handoff mode on rate limit warning
36+
37+
**Type:** `Happy Path`
38+
**Priority:** `P1`
39+
40+
#### Preconditions
41+
- The Copilot Chat view is open in a **non-handoff** (standard) chat mode.
42+
43+
#### Steps
44+
1. Trigger a `$/copilot/rateLimitWarning` notification (type: "weekly" or
45+
"session") from the language server while in standard chat mode.
46+
2. Observe the area above the chat input field in the Action Bar.
47+
48+
#### Expected Result
49+
- A warning banner appears above the action bar input area.
50+
- The banner text matches the `message` field from the LSP notification.
51+
- No error dialog or exception is logged.
52+
53+
#### 📸 Key Screenshots
54+
- [ ] **Banner visible** — chat view showing the rate limit warning banner.
55+
56+
---
57+
58+
## 2. Banner Content
59+
60+
### TC-002: Banner contains "Get more info" link and Dismiss button
61+
62+
**Type:** `Happy Path`
63+
**Priority:** `P1`
64+
65+
#### Preconditions
66+
- The rate limit warning banner is currently visible in the chat view.
67+
68+
#### Steps
69+
1. Locate the **"Get more info"** link in the banner.
70+
2. Click the link.
71+
3. Locate the **"×"** (Dismiss) button in the banner.
72+
73+
#### Expected Result
74+
- The "Get more info" link opens `https://aka.ms/github-copilot-rate-limit-error`
75+
in the system default browser (or Eclipse's internal browser).
76+
- The "×" button is visible and interactive.
77+
78+
#### 📸 Key Screenshots
79+
- [ ] **Banner with link and dismiss button** — close-up of the banner widget.
80+
81+
---
82+
83+
### TC-003: Dismiss button closes the banner
84+
85+
**Type:** `Happy Path`
86+
**Priority:** `P1`
87+
88+
#### Preconditions
89+
- The rate limit warning banner is currently visible.
90+
91+
#### Steps
92+
1. Click the **"×"** (Dismiss) button on the banner.
93+
2. Observe the chat view layout.
94+
95+
#### Expected Result
96+
- The banner is removed from the chat view immediately.
97+
- The chat input area expands to fill the space previously occupied by the banner.
98+
- No exceptions or layout glitches occur.
99+
100+
#### 📸 Key Screenshots
101+
- [ ] **After dismiss** — chat view with banner removed.

0 commit comments

Comments
 (0)