From b841358021b0cdf20df9b0bebf38ddcb8280a1c3 Mon Sep 17 00:00:00 2001 From: Zidong Lu <11402511+duzitong@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:31:20 +0800 Subject: [PATCH 1/2] chore: add 0.19.0 endgame test plans for duzitong - edit-files-outside-workspace: 7 test cases covering create/edit/keep/undo for local files outside the Eclipse workspace (PR#248) - auto-chat-context-compression: 4 test cases covering compacting banner show/hide, cancel, and conversation scoping (PR#250) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../auto-chat-context-compression.md | 118 ++++++++++ .../edit-files-outside-workspace.md | 211 ++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md create mode 100644 com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md diff --git a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md new file mode 100644 index 00000000..c75803b1 --- /dev/null +++ b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md @@ -0,0 +1,118 @@ +# Support Automatic Chat Context Compression + +## Overview +Verifies the **Auto Compress** feature that automatically compresses long conversations to keep context usage within the model's limit. Auto Compress is always enabled (no user-facing toggle). While compression is in progress the chat view shows a "Compacting conversation..." spinner below the latest Copilot turn, and the Context Size Donut updates once compression completes. + +--- + +## Test Cases + +### TC-001: Compacting banner appears when compression starts + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and authenticated. +- A model with a finite context window selected (e.g. Claude Sonnet 4.6 or GPT-4.1). +- The Copilot Chat view is open with a new conversation. + +#### Steps +1. Start a conversation and drive context usage toward the model limit β€” attach several large files and/or run multiple tool-heavy turns until the **Context Size Donut** approaches its warning threshold (β‰₯90%). +2. Continue sending messages until the conversation exceeds the threshold and the server initiates automatic compression. +3. Observe the latest Copilot turn while the server processes the request. + +#### Expected Result +- A banner appears **below the latest Copilot turn** containing an animated spinner and the text **"Compacting conversation..."**. +- The chat view layout refreshes so the banner is fully visible (not clipped). +- No error dialogs are shown. + +#### πŸ“Έ Key Screenshots +- [ ] **Compacting banner** β€” spinner + "Compacting conversation..." text rendered below the latest Copilot turn. + +--- + +### TC-002: Compacting banner is dismissed and Context Size Donut updates on completion + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- TC-001 has been executed and the "Compacting conversation..." banner is currently visible. + +#### Steps +1. Wait for the server to finish compression (typically a few seconds). +2. Observe the latest Copilot turn after compression completes. +3. Hover the **Context Size Donut** in the chat view control bar to open the Context Window popup. + +#### Expected Result +- The "Compacting conversation..." banner is removed from the Copilot turn. +- The chat view relayouts cleanly (no leftover blank space, no clipping). +- The Context Size Donut updates to reflect the new, smaller token usage (the ring's filled portion shrinks). +- The **Context Window** popup shows the post-compression token breakdown consistent with the new total. +- The subsequent reply continues to stream normally on top of the freshly compressed history. + +#### πŸ“Έ Key Screenshots +- [ ] **After completion** β€” Copilot turn without the banner. +- [ ] **Donut after compression** β€” Context Size Donut showing reduced usage. +- [ ] **Context Window popup** β€” Token breakdown after compression. + +--- + +### TC-003: Cancelling a chat turn hides the compacting banner + +**Type:** `Edge Case` +**Priority:** `P1` + +#### Preconditions +- A conversation is set up so the next send will trigger compression (as in TC-001). + +#### Steps +1. Send the message that triggers compression and wait for the "Compacting conversation..." banner to appear. +2. While the banner is showing, click the **Cancel** (stop) button in the chat input action bar. + +#### Expected Result +- The send button is restored from its stop/cancel state back to its normal send state. +- The "Compacting conversation..." banner is removed from the latest Copilot turn. +- Any buffered reply text that arrived just before cancellation is rendered (no missing trailing line). +- The chat view relayouts cleanly so the flushed reply is fully visible. +- The user can immediately send a new message in the same conversation. + +#### πŸ“Έ Key Screenshots +- [ ] **After cancel** β€” banner gone, send button reset, any buffered reply visible. + +--- + +### TC-004: Compacting banner is scoped to the active conversation only + +**Type:** `Edge Case` +**Priority:** `P2` + +#### Preconditions +- Two conversations exist in chat history: *Conversation A* (about to trigger compression) and *Conversation B* (short, well under the context limit). + +#### Steps +1. In *Conversation A*, send a message that triggers compression and wait for the "Compacting conversation..." banner to appear. +2. Without waiting for completion, open chat history and switch to *Conversation B*. +3. Inspect *Conversation B* for any compaction banner. +4. Switch back to *Conversation A*. + +#### Expected Result +- *Conversation B* never shows a "Compacting conversation..." banner β€” compaction status is scoped to *Conversation A* only. +- When returning to *Conversation A*, its state is consistent with the compression outcome (banner cleared if it completed; reply still streaming if still in progress). +- No errors or stale spinners are left behind in either conversation. + +#### πŸ“Έ Key Screenshots +- [ ] **Conversation B during A's compaction** β€” no banner shown. + +--- + +## Screenshots Checklist +> Consolidated list of all key screenshot moments. + +- [ ] `TC-001` Compacting banner under latest Copilot turn. +- [ ] `TC-002` Copilot turn after compaction completes (banner gone). +- [ ] `TC-002` Context Size Donut after compaction (reduced usage). +- [ ] `TC-002` Context Window popup with post-compaction token breakdown. +- [ ] `TC-003` State after cancel β€” banner gone, send button reset, buffered reply visible. +- [ ] `TC-004` Conversation B during Conversation A's compaction (no banner). diff --git a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md new file mode 100644 index 00000000..b403e1a5 --- /dev/null +++ b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md @@ -0,0 +1,211 @@ +# Support Editing/Creating Local Files Outside the Workspace + +## Overview +Verify that Copilot Agent mode can edit and create local filesystem files whose paths are outside the Eclipse workspace, and that those changes appear in the file change summary bar with the same View Diff, Keep, and Undo actions available for workspace files. + +--- + +## Test Cases + +### TC-001: Agent edits an existing local file and it appears in the summary bar + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- Eclipse IDE with the GitHub Copilot plugin is installed and the user is signed in. +- Copilot Chat is open in Agent mode. +- A writable local directory outside the Eclipse workspace exists (e.g. `%TEMP%\copilot-local-files` on Windows or `/tmp/copilot-local-files` on macOS/Linux). +- A file `existing-local-file.txt` exists in that directory containing exactly `before local edit`. + +#### Steps +1. Open **Copilot Chat** (`Window β†’ Show View β†’ Other… β†’ Copilot β†’ Copilot Chat`). +2. Switch the mode selector to **Agent**. +3. Send a prompt: `Edit so its entire content is exactly "after local edit".` +4. If Copilot requests tool confirmation, approve the file edit operation. +5. Wait for the Agent turn to complete. +6. Inspect the file change summary bar in the Chat view. +7. Verify `existing-local-file.txt` is listed in the summary bar with a local filesystem path. +8. Click **View Diff** for `existing-local-file.txt`. +9. Verify the Compare editor shows `before local edit` on the left and `after local edit` on the right. +10. Close the Compare editor. +11. Open `existing-local-file.txt` from the local filesystem and verify its content is `after local edit`. + +#### Expected Result +- Copilot completes the edit without reporting that the file is outside the workspace. +- `existing-local-file.txt` appears in the file change summary bar. +- The Compare editor correctly shows the before/after diff. +- The file on disk contains `after local edit`. +- No error dialog is shown; the Eclipse error log has no uncaught exception from the file tool or compare editor. + +#### πŸ“Έ Key Screenshots +- [ ] **Agent edit prompt** β€” Copilot Chat in Agent mode with the absolute local path visible in the prompt. +- [ ] **Summary bar after edit** β€” The edited local file listed in the file change summary bar. +- [ ] **Compare editor** β€” The Compare editor showing `before local edit` vs. `after local edit`. + +--- + +### TC-002: Keep clears the local file change and subsequent edits use the new baseline + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- TC-001 has completed: `existing-local-file.txt` contains `after local edit` and is listed in the summary bar. + +#### Steps +1. Click **Keep** for `existing-local-file.txt` in the file change summary bar. +2. Verify the file is removed from the summary bar. +3. Send another Agent prompt: `Edit so its entire content is exactly "second local edit".` +4. Approve the edit if prompted and wait for the turn to complete. +5. Click **View Diff** for `existing-local-file.txt` in the summary bar. +6. Verify the Compare editor shows `after local edit` as the baseline (left side) and `second local edit` as the new content (right side). + +#### Expected Result +- **Keep** accepts the current file content and removes the entry from the summary bar. +- The next edit of the same local file starts a fresh diff baseline from the kept content. +- The Compare editor correctly reflects the new before/after pair. + +#### πŸ“Έ Key Screenshots +- [ ] **After Keep** β€” Summary bar no longer lists the local file. +- [ ] **Second diff** β€” Compare editor showing `after local edit` as the new baseline. + +--- + +### TC-003: Undo restores the original local file content + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- TC-001 has completed: `existing-local-file.txt` contains `after local edit` and is listed in the summary bar. + +#### Steps +1. Click **Undo** for `existing-local-file.txt` in the file change summary bar. +2. Verify the file is removed from the summary bar. +3. Open `existing-local-file.txt` from the local filesystem and verify its content. + +#### Expected Result +- **Undo** restores the file to `before local edit` (the content captured before the tracked edit). +- The entry is removed from the summary bar after undo. +- No error dialog is shown; the Eclipse error log has no undo exception for a local file. + +#### πŸ“Έ Key Screenshots +- [ ] **Before Undo** β€” Summary bar listing the edited local file. +- [ ] **After Undo** β€” Summary bar cleared; file content restored to original. + +--- + +### TC-004: Agent creates a new local file outside the workspace + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- Copilot Chat is open in Agent mode. +- `created-local-file.txt` does not exist in the local test directory. + +#### Steps +1. Send a prompt: `Create with the exact content "created local content".` +2. If Copilot requests tool confirmation, approve the file create operation. +3. Wait for the Agent turn to complete. +4. Verify `created-local-file.txt` exists on disk and contains `created local content`. +5. Verify the file change summary bar lists `created-local-file.txt`. +6. Click **View Diff** for `created-local-file.txt`. +7. Verify Eclipse opens the file in an editor showing `created local content` (empty-baseline diff or direct open). + +#### Expected Result +- Copilot creates the local file without requiring it to be inside an Eclipse workspace project. +- The created file is listed in the summary bar. +- The file can be opened/diffed from the summary bar without errors. +- No error dialog is shown; the Eclipse error log has no local file create or editor-open exception. + +#### πŸ“Έ Key Screenshots +- [ ] **Agent create prompt** β€” Copilot Chat in Agent mode with the absolute create path visible. +- [ ] **Summary bar after create** β€” The created local file listed in the file change summary bar. +- [ ] **Created file view** β€” The external local file opened in an editor with `created local content`. + +--- + +### TC-005: Undo removes a newly created local file + +**Type:** `Happy Path` +**Priority:** `P0` + +#### Preconditions +- TC-004 has completed: `created-local-file.txt` exists on disk with `created local content` and is listed in the summary bar. + +#### Steps +1. Click **Undo** for `created-local-file.txt` in the file change summary bar. +2. Verify the file is removed from the summary bar. +3. Verify `created-local-file.txt` no longer exists on the local filesystem. + +#### Expected Result +- **Undo** for a created local file deletes the file from disk. +- The summary bar no longer lists the file after undo. +- No error dialog is shown; the Eclipse error log has no local file deletion exception. + +#### πŸ“Έ Key Screenshots +- [ ] **Before Undo** β€” Summary bar listing `created-local-file.txt`. +- [ ] **After Undo** β€” Summary bar cleared; file absent from disk. + +--- + +### TC-006: Workspace file behavior is unaffected by local file support + +**Type:** `Regression` +**Priority:** `P0` + +#### Preconditions +- Eclipse workspace contains a project with a file `workspace-file.txt` containing `workspace original`. +- Copilot Chat is open in Agent mode. + +#### Steps +1. Send a prompt: `Edit so its content is "workspace edited".` +2. Approve the edit if prompted and wait for the turn to complete. +3. Verify `workspace-file.txt` appears in the file change summary bar. +4. Click **View Diff** and verify the Compare editor shows the expected before/after content. +5. Click **Keep** and verify the workspace file is removed from the summary bar. + +#### Expected Result +- Workspace file edits continue to work exactly as before. +- No regressions in View Diff, Keep, or Undo for workspace files. + +--- + +### TC-007: Agent gracefully handles a non-writable local path + +**Type:** `Negative` +**Priority:** `P1` + +#### Preconditions +- Copilot Chat is open in Agent mode. +- A read-only file `readonly-local-file.txt` exists outside the workspace (set read-only via OS permissions). + +#### Steps +1. Send a prompt: `Edit so its content is "attempt edit".` +2. Approve any tool confirmation if prompted. +3. Observe the response in the Chat view. + +#### Expected Result +- Copilot reports a failure or error to the user rather than silently succeeding. +- The summary bar does not list the file as a pending change. +- No unhandled exception in the Eclipse error log. + +--- + +## Screenshots Checklist +> Consolidated list of all key screenshot moments. + +- [ ] `TC-001` Agent edit prompt with absolute local path +- [ ] `TC-001` Summary bar after local edit +- [ ] `TC-001` Compare editor showing before/after local edit +- [ ] `TC-002` Summary bar after Keep (local file removed) +- [ ] `TC-002` Compare editor showing new baseline after Keep +- [ ] `TC-003` Summary bar before Undo (local file listed) +- [ ] `TC-003` Summary bar after Undo (local file removed, content restored) +- [ ] `TC-004` Agent create prompt with absolute local path +- [ ] `TC-004` Summary bar after local file create +- [ ] `TC-004` Created local file opened in editor +- [ ] `TC-005` Summary bar before Undo (created file listed) +- [ ] `TC-005` Summary bar after Undo (created file absent from disk) From 3dbd65cd209d4e3b1161aff5437b00de17e4ddd3 Mon Sep 17 00:00:00 2001 From: Zidong Lu <11402511+duzitong@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:28:43 +0800 Subject: [PATCH 2/2] revert: remove duplicate test plans edit-files-outside-workspace is already covered by: test-plans/file-system/local-file-edit-and-create-tools.md auto-chat-context-compression is already covered by: test-plans/context-compress/context-compress.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../auto-chat-context-compression.md | 118 ---------- .../edit-files-outside-workspace.md | 211 ------------------ 2 files changed, 329 deletions(-) delete mode 100644 com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md delete mode 100644 com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md diff --git a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md deleted file mode 100644 index c75803b1..00000000 --- a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/auto-chat-context-compression/auto-chat-context-compression.md +++ /dev/null @@ -1,118 +0,0 @@ -# Support Automatic Chat Context Compression - -## Overview -Verifies the **Auto Compress** feature that automatically compresses long conversations to keep context usage within the model's limit. Auto Compress is always enabled (no user-facing toggle). While compression is in progress the chat view shows a "Compacting conversation..." spinner below the latest Copilot turn, and the Context Size Donut updates once compression completes. - ---- - -## Test Cases - -### TC-001: Compacting banner appears when compression starts - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and authenticated. -- A model with a finite context window selected (e.g. Claude Sonnet 4.6 or GPT-4.1). -- The Copilot Chat view is open with a new conversation. - -#### Steps -1. Start a conversation and drive context usage toward the model limit β€” attach several large files and/or run multiple tool-heavy turns until the **Context Size Donut** approaches its warning threshold (β‰₯90%). -2. Continue sending messages until the conversation exceeds the threshold and the server initiates automatic compression. -3. Observe the latest Copilot turn while the server processes the request. - -#### Expected Result -- A banner appears **below the latest Copilot turn** containing an animated spinner and the text **"Compacting conversation..."**. -- The chat view layout refreshes so the banner is fully visible (not clipped). -- No error dialogs are shown. - -#### πŸ“Έ Key Screenshots -- [ ] **Compacting banner** β€” spinner + "Compacting conversation..." text rendered below the latest Copilot turn. - ---- - -### TC-002: Compacting banner is dismissed and Context Size Donut updates on completion - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- TC-001 has been executed and the "Compacting conversation..." banner is currently visible. - -#### Steps -1. Wait for the server to finish compression (typically a few seconds). -2. Observe the latest Copilot turn after compression completes. -3. Hover the **Context Size Donut** in the chat view control bar to open the Context Window popup. - -#### Expected Result -- The "Compacting conversation..." banner is removed from the Copilot turn. -- The chat view relayouts cleanly (no leftover blank space, no clipping). -- The Context Size Donut updates to reflect the new, smaller token usage (the ring's filled portion shrinks). -- The **Context Window** popup shows the post-compression token breakdown consistent with the new total. -- The subsequent reply continues to stream normally on top of the freshly compressed history. - -#### πŸ“Έ Key Screenshots -- [ ] **After completion** β€” Copilot turn without the banner. -- [ ] **Donut after compression** β€” Context Size Donut showing reduced usage. -- [ ] **Context Window popup** β€” Token breakdown after compression. - ---- - -### TC-003: Cancelling a chat turn hides the compacting banner - -**Type:** `Edge Case` -**Priority:** `P1` - -#### Preconditions -- A conversation is set up so the next send will trigger compression (as in TC-001). - -#### Steps -1. Send the message that triggers compression and wait for the "Compacting conversation..." banner to appear. -2. While the banner is showing, click the **Cancel** (stop) button in the chat input action bar. - -#### Expected Result -- The send button is restored from its stop/cancel state back to its normal send state. -- The "Compacting conversation..." banner is removed from the latest Copilot turn. -- Any buffered reply text that arrived just before cancellation is rendered (no missing trailing line). -- The chat view relayouts cleanly so the flushed reply is fully visible. -- The user can immediately send a new message in the same conversation. - -#### πŸ“Έ Key Screenshots -- [ ] **After cancel** β€” banner gone, send button reset, any buffered reply visible. - ---- - -### TC-004: Compacting banner is scoped to the active conversation only - -**Type:** `Edge Case` -**Priority:** `P2` - -#### Preconditions -- Two conversations exist in chat history: *Conversation A* (about to trigger compression) and *Conversation B* (short, well under the context limit). - -#### Steps -1. In *Conversation A*, send a message that triggers compression and wait for the "Compacting conversation..." banner to appear. -2. Without waiting for completion, open chat history and switch to *Conversation B*. -3. Inspect *Conversation B* for any compaction banner. -4. Switch back to *Conversation A*. - -#### Expected Result -- *Conversation B* never shows a "Compacting conversation..." banner β€” compaction status is scoped to *Conversation A* only. -- When returning to *Conversation A*, its state is consistent with the compression outcome (banner cleared if it completed; reply still streaming if still in progress). -- No errors or stale spinners are left behind in either conversation. - -#### πŸ“Έ Key Screenshots -- [ ] **Conversation B during A's compaction** β€” no banner shown. - ---- - -## Screenshots Checklist -> Consolidated list of all key screenshot moments. - -- [ ] `TC-001` Compacting banner under latest Copilot turn. -- [ ] `TC-002` Copilot turn after compaction completes (banner gone). -- [ ] `TC-002` Context Size Donut after compaction (reduced usage). -- [ ] `TC-002` Context Window popup with post-compaction token breakdown. -- [ ] `TC-003` State after cancel β€” banner gone, send button reset, buffered reply visible. -- [ ] `TC-004` Conversation B during Conversation A's compaction (no banner). diff --git a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md b/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md deleted file mode 100644 index b403e1a5..00000000 --- a/com.microsoft.copilot.eclipse.swtbot.test/test-plans/edit-files-outside-workspace/edit-files-outside-workspace.md +++ /dev/null @@ -1,211 +0,0 @@ -# Support Editing/Creating Local Files Outside the Workspace - -## Overview -Verify that Copilot Agent mode can edit and create local filesystem files whose paths are outside the Eclipse workspace, and that those changes appear in the file change summary bar with the same View Diff, Keep, and Undo actions available for workspace files. - ---- - -## Test Cases - -### TC-001: Agent edits an existing local file and it appears in the summary bar - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- Eclipse IDE with the GitHub Copilot plugin is installed and the user is signed in. -- Copilot Chat is open in Agent mode. -- A writable local directory outside the Eclipse workspace exists (e.g. `%TEMP%\copilot-local-files` on Windows or `/tmp/copilot-local-files` on macOS/Linux). -- A file `existing-local-file.txt` exists in that directory containing exactly `before local edit`. - -#### Steps -1. Open **Copilot Chat** (`Window β†’ Show View β†’ Other… β†’ Copilot β†’ Copilot Chat`). -2. Switch the mode selector to **Agent**. -3. Send a prompt: `Edit so its entire content is exactly "after local edit".` -4. If Copilot requests tool confirmation, approve the file edit operation. -5. Wait for the Agent turn to complete. -6. Inspect the file change summary bar in the Chat view. -7. Verify `existing-local-file.txt` is listed in the summary bar with a local filesystem path. -8. Click **View Diff** for `existing-local-file.txt`. -9. Verify the Compare editor shows `before local edit` on the left and `after local edit` on the right. -10. Close the Compare editor. -11. Open `existing-local-file.txt` from the local filesystem and verify its content is `after local edit`. - -#### Expected Result -- Copilot completes the edit without reporting that the file is outside the workspace. -- `existing-local-file.txt` appears in the file change summary bar. -- The Compare editor correctly shows the before/after diff. -- The file on disk contains `after local edit`. -- No error dialog is shown; the Eclipse error log has no uncaught exception from the file tool or compare editor. - -#### πŸ“Έ Key Screenshots -- [ ] **Agent edit prompt** β€” Copilot Chat in Agent mode with the absolute local path visible in the prompt. -- [ ] **Summary bar after edit** β€” The edited local file listed in the file change summary bar. -- [ ] **Compare editor** β€” The Compare editor showing `before local edit` vs. `after local edit`. - ---- - -### TC-002: Keep clears the local file change and subsequent edits use the new baseline - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- TC-001 has completed: `existing-local-file.txt` contains `after local edit` and is listed in the summary bar. - -#### Steps -1. Click **Keep** for `existing-local-file.txt` in the file change summary bar. -2. Verify the file is removed from the summary bar. -3. Send another Agent prompt: `Edit so its entire content is exactly "second local edit".` -4. Approve the edit if prompted and wait for the turn to complete. -5. Click **View Diff** for `existing-local-file.txt` in the summary bar. -6. Verify the Compare editor shows `after local edit` as the baseline (left side) and `second local edit` as the new content (right side). - -#### Expected Result -- **Keep** accepts the current file content and removes the entry from the summary bar. -- The next edit of the same local file starts a fresh diff baseline from the kept content. -- The Compare editor correctly reflects the new before/after pair. - -#### πŸ“Έ Key Screenshots -- [ ] **After Keep** β€” Summary bar no longer lists the local file. -- [ ] **Second diff** β€” Compare editor showing `after local edit` as the new baseline. - ---- - -### TC-003: Undo restores the original local file content - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- TC-001 has completed: `existing-local-file.txt` contains `after local edit` and is listed in the summary bar. - -#### Steps -1. Click **Undo** for `existing-local-file.txt` in the file change summary bar. -2. Verify the file is removed from the summary bar. -3. Open `existing-local-file.txt` from the local filesystem and verify its content. - -#### Expected Result -- **Undo** restores the file to `before local edit` (the content captured before the tracked edit). -- The entry is removed from the summary bar after undo. -- No error dialog is shown; the Eclipse error log has no undo exception for a local file. - -#### πŸ“Έ Key Screenshots -- [ ] **Before Undo** β€” Summary bar listing the edited local file. -- [ ] **After Undo** β€” Summary bar cleared; file content restored to original. - ---- - -### TC-004: Agent creates a new local file outside the workspace - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- Copilot Chat is open in Agent mode. -- `created-local-file.txt` does not exist in the local test directory. - -#### Steps -1. Send a prompt: `Create with the exact content "created local content".` -2. If Copilot requests tool confirmation, approve the file create operation. -3. Wait for the Agent turn to complete. -4. Verify `created-local-file.txt` exists on disk and contains `created local content`. -5. Verify the file change summary bar lists `created-local-file.txt`. -6. Click **View Diff** for `created-local-file.txt`. -7. Verify Eclipse opens the file in an editor showing `created local content` (empty-baseline diff or direct open). - -#### Expected Result -- Copilot creates the local file without requiring it to be inside an Eclipse workspace project. -- The created file is listed in the summary bar. -- The file can be opened/diffed from the summary bar without errors. -- No error dialog is shown; the Eclipse error log has no local file create or editor-open exception. - -#### πŸ“Έ Key Screenshots -- [ ] **Agent create prompt** β€” Copilot Chat in Agent mode with the absolute create path visible. -- [ ] **Summary bar after create** β€” The created local file listed in the file change summary bar. -- [ ] **Created file view** β€” The external local file opened in an editor with `created local content`. - ---- - -### TC-005: Undo removes a newly created local file - -**Type:** `Happy Path` -**Priority:** `P0` - -#### Preconditions -- TC-004 has completed: `created-local-file.txt` exists on disk with `created local content` and is listed in the summary bar. - -#### Steps -1. Click **Undo** for `created-local-file.txt` in the file change summary bar. -2. Verify the file is removed from the summary bar. -3. Verify `created-local-file.txt` no longer exists on the local filesystem. - -#### Expected Result -- **Undo** for a created local file deletes the file from disk. -- The summary bar no longer lists the file after undo. -- No error dialog is shown; the Eclipse error log has no local file deletion exception. - -#### πŸ“Έ Key Screenshots -- [ ] **Before Undo** β€” Summary bar listing `created-local-file.txt`. -- [ ] **After Undo** β€” Summary bar cleared; file absent from disk. - ---- - -### TC-006: Workspace file behavior is unaffected by local file support - -**Type:** `Regression` -**Priority:** `P0` - -#### Preconditions -- Eclipse workspace contains a project with a file `workspace-file.txt` containing `workspace original`. -- Copilot Chat is open in Agent mode. - -#### Steps -1. Send a prompt: `Edit so its content is "workspace edited".` -2. Approve the edit if prompted and wait for the turn to complete. -3. Verify `workspace-file.txt` appears in the file change summary bar. -4. Click **View Diff** and verify the Compare editor shows the expected before/after content. -5. Click **Keep** and verify the workspace file is removed from the summary bar. - -#### Expected Result -- Workspace file edits continue to work exactly as before. -- No regressions in View Diff, Keep, or Undo for workspace files. - ---- - -### TC-007: Agent gracefully handles a non-writable local path - -**Type:** `Negative` -**Priority:** `P1` - -#### Preconditions -- Copilot Chat is open in Agent mode. -- A read-only file `readonly-local-file.txt` exists outside the workspace (set read-only via OS permissions). - -#### Steps -1. Send a prompt: `Edit so its content is "attempt edit".` -2. Approve any tool confirmation if prompted. -3. Observe the response in the Chat view. - -#### Expected Result -- Copilot reports a failure or error to the user rather than silently succeeding. -- The summary bar does not list the file as a pending change. -- No unhandled exception in the Eclipse error log. - ---- - -## Screenshots Checklist -> Consolidated list of all key screenshot moments. - -- [ ] `TC-001` Agent edit prompt with absolute local path -- [ ] `TC-001` Summary bar after local edit -- [ ] `TC-001` Compare editor showing before/after local edit -- [ ] `TC-002` Summary bar after Keep (local file removed) -- [ ] `TC-002` Compare editor showing new baseline after Keep -- [ ] `TC-003` Summary bar before Undo (local file listed) -- [ ] `TC-003` Summary bar after Undo (local file removed, content restored) -- [ ] `TC-004` Agent create prompt with absolute local path -- [ ] `TC-004` Summary bar after local file create -- [ ] `TC-004` Created local file opened in editor -- [ ] `TC-005` Summary bar before Undo (created file listed) -- [ ] `TC-005` Summary bar after Undo (created file absent from disk)