|
| 1 | +# Auto Context Compression |
| 2 | + |
| 3 | +## Overview |
| 4 | +Verifies the **Auto Compress** feature that automatically compresses long |
| 5 | +conversations to keep context usage within the model's limit. Auto Compress |
| 6 | +is always enabled (no user-facing preference). While compression is in |
| 7 | +progress, the chat view shows a "Compacting conversation..." spinner below |
| 8 | +the latest Copilot turn, and the context size donut updates once it |
| 9 | +completes. |
| 10 | + |
| 11 | +Entry points: |
| 12 | +- **Copilot Chat view** → latest Copilot turn (spinner banner appears here). |
| 13 | +- **Copilot Chat view** → control bar **Context Size Donut** (updates after |
| 14 | + compression completes). |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed (built from |
| 21 | + the branch containing the staged Auto Compress changes). |
| 22 | +- A valid GitHub Copilot subscription is active (authentication completed). |
| 23 | +- A model that supports a finite context window is selected (so the donut and |
| 24 | + compression can be exercised — e.g. Claude Sonnet 4.6 or GPT-4.1). |
| 25 | +- The Copilot Chat view is open and visible. |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Test Cases |
| 30 | + |
| 31 | +### TC-001: Compacting banner appears when compression starts |
| 32 | + |
| 33 | +**Type:** `Happy Path` |
| 34 | +**Priority:** `P0` |
| 35 | + |
| 36 | +#### Preconditions |
| 37 | +- The Copilot Chat view is open with a new conversation. |
| 38 | + |
| 39 | +#### Steps |
| 40 | +1. Start a conversation and drive the context usage toward the model limit — |
| 41 | + for example, attach several large files and/or run multiple tool-heavy |
| 42 | + turns until the **Context Size Donut** approaches its warning threshold |
| 43 | + (≥90 %). |
| 44 | +2. Continue sending messages until the conversation goes over the threshold |
| 45 | + so the server initiates automatic compression. |
| 46 | +3. Observe the latest Copilot turn while the server processes the request. |
| 47 | + |
| 48 | +#### Expected Result |
| 49 | +- A small banner appears **below the latest Copilot turn** containing: |
| 50 | + - An animated spinner. |
| 51 | + - The status text **"Compacting conversation..."**. |
| 52 | +- The chat view layout refreshes so the banner is fully visible (not clipped). |
| 53 | +- No error dialogs are shown. |
| 54 | + |
| 55 | +#### 📸 Key Screenshots |
| 56 | +- [ ] **Compacting banner** — spinner + "Compacting conversation..." text |
| 57 | + rendered under the latest Copilot turn. |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +### TC-002: Compacting banner is dismissed and context donut updates on completion |
| 62 | + |
| 63 | +**Type:** `Happy Path` |
| 64 | +**Priority:** `P0` |
| 65 | + |
| 66 | +#### Preconditions |
| 67 | +- TC-001 has been executed and the "Compacting conversation..." banner is |
| 68 | + currently visible. |
| 69 | + |
| 70 | +#### Steps |
| 71 | +1. Wait for the server to finish compression (typically a few seconds). |
| 72 | +2. Observe the latest Copilot turn after compression completes. |
| 73 | +3. Hover the **Context Size Donut** in the chat view control bar. |
| 74 | + |
| 75 | +#### Expected Result |
| 76 | +- The "Compacting conversation..." banner is removed from the Copilot turn. |
| 77 | +- The chat view scroller relayouts cleanly (no leftover blank space, no |
| 78 | + clipping). |
| 79 | +- The Context Size Donut updates to reflect the new, smaller token usage |
| 80 | + (the ring's filled portion shrinks). |
| 81 | +- The **Context Window** popup shows the post-compression token breakdown |
| 82 | + consistent with the new total. |
| 83 | +- The subsequent reply continues to stream normally on top of the freshly |
| 84 | + compressed history. |
| 85 | + |
| 86 | +#### 📸 Key Screenshots |
| 87 | +- [ ] **After completion** — Copilot turn without the banner. |
| 88 | +- [ ] **Donut after compression** — Context Size Donut showing reduced usage. |
| 89 | +- [ ] **Context Window popup** — Token breakdown after compression. |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +### TC-003: Cancelling a chat hides the compacting banner |
| 94 | + |
| 95 | +**Type:** `Edge Case` |
| 96 | +**Priority:** `P1` |
| 97 | + |
| 98 | +#### Preconditions |
| 99 | +- A conversation is set up so the next send will trigger compression |
| 100 | + (as in TC-001). |
| 101 | + |
| 102 | +#### Steps |
| 103 | +1. Send the message that triggers compression and wait for the |
| 104 | + "Compacting conversation..." banner to appear. |
| 105 | +2. While the banner is showing, click the **Cancel** (stop) button in the |
| 106 | + chat input action bar. |
| 107 | + |
| 108 | +#### Expected Result |
| 109 | +- The send button is restored from its stop/cancel state back to its normal |
| 110 | + send state. |
| 111 | +- The "Compacting conversation..." banner is removed from the latest Copilot |
| 112 | + turn. |
| 113 | +- Any buffered reply text that arrived just before cancellation is rendered |
| 114 | + (no missing trailing line). |
| 115 | +- The chat view relayouts cleanly so the flushed reply is fully visible. |
| 116 | +- The user can immediately send a new message in the same conversation. |
| 117 | + |
| 118 | +#### 📸 Key Screenshots |
| 119 | +- [ ] **After cancel** — banner gone, send button reset, any buffered reply |
| 120 | + visible. |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +### TC-004: Compacting banner only updates the matching conversation |
| 125 | + |
| 126 | +**Type:** `Edge Case` |
| 127 | +**Priority:** `P2` |
| 128 | + |
| 129 | +#### Preconditions |
| 130 | +- Two conversations exist in chat history: *Conversation A* (about to |
| 131 | + trigger compression) and *Conversation B* (short, well under the limit). |
| 132 | + |
| 133 | +#### Steps |
| 134 | +1. In *Conversation A*, send a message that triggers compression and wait |
| 135 | + for the "Compacting conversation..." banner to appear. |
| 136 | +2. Without waiting for completion, open chat history and switch to |
| 137 | + *Conversation B*. |
| 138 | +3. Inspect *Conversation B* for any compaction banner. |
| 139 | +4. Switch back to *Conversation A*. |
| 140 | + |
| 141 | +#### Expected Result |
| 142 | +- *Conversation B* never shows a "Compacting conversation..." banner — the |
| 143 | + compaction status is scoped to *Conversation A* only. |
| 144 | +- When you return to *Conversation A*, its state is consistent with the |
| 145 | + compression outcome (banner cleared if it completed in the meantime; new |
| 146 | + reply continues to stream if still in progress). |
| 147 | +- No errors or stale spinners are left behind in either conversation. |
| 148 | + |
| 149 | +#### 📸 Key Screenshots |
| 150 | +- [ ] **Conversation B during A's compaction** — no banner shown. |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +## Screenshots Checklist |
| 155 | +> Consolidated list of all key screenshot moments. |
| 156 | +
|
| 157 | +- [ ] `TC-001` Compacting banner under latest Copilot turn. |
| 158 | +- [ ] `TC-002` Copilot turn after compaction completes (banner gone). |
| 159 | +- [ ] `TC-002` Context Size Donut after compaction (reduced usage). |
| 160 | +- [ ] `TC-002` Context Window popup with post-compaction token breakdown. |
| 161 | +- [ ] `TC-003` State after cancel — banner gone, send button reset, buffered |
| 162 | + reply visible. |
| 163 | +- [ ] `TC-004` Conversation B during Conversation A's compaction (no banner). |
0 commit comments