Skip to content

Conversation

@sacrodge
Copy link

@sacrodge sacrodge commented Nov 4, 2025

Problem

Created a new component in the mynah-ui, to display modified files along with per file undo button and undoall button for more than one files. Instead of sending duplicate data, added additional properties in existing data and rendered them in new component

Solution

For every time a file is modified, adding a new property "modifiedFilesTracker" to the chatMessage/chatItem to send to the UI with modified file details and undo buttons. With this, same file details will be shown in 2 places and will have capability to undo from any place

Concerns :

Without creating the "LocalProjectContextController" fallback instance, seeing the following error which is breaking the functionality completely :

console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Connection got disposed. (at console.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:203:32117))
gbs @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
C @ event.ts:1201
fire @ event.ts:1232
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:383
console.ts:137 [Extension Host] stack trace: Error: Connection got disposed.
  • This error is introduced just by consuming new mynah version along with LSR version, and no changes to Language Servers code

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 27.02170% with 370 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.49%. Comparing base (44df68d) to head (1849d8c).
⚠️ Report is 37 commits behind head on feature/upgrade-modified-files-ux.

Files with missing lines Patch % Lines
...ge-server/agenticChat/tools/mcp/mcpEventHandler.ts 5.00% 171 Missing ⚠️
...nguage-server/agenticChat/agenticChatController.ts 10.10% 89 Missing ⚠️
...p-codewhisperer/src/shared/codeWhispererService.ts 46.75% 41 Missing ⚠️
...sperer/src/shared/localProjectContextController.ts 5.55% 34 Missing ⚠️
...r/localProjectContext/localProjectContextServer.ts 0.00% 14 Missing ⚠️
...ed/supplementalContextUtil/crossFileContextUtil.ts 0.00% 10 Missing ⚠️
...line-completion/handler/inlineCompletionHandler.ts 55.55% 4 Missing ⚠️
...rc/language-server/agenticChat/tools/toolServer.ts 0.00% 2 Missing ⚠️
...supplementalContextUtil/supplementalContextUtil.ts 0.00% 2 Missing ⚠️
chat-client/src/client/mynahUi.ts 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                          Coverage Diff                          @@
##           feature/upgrade-modified-files-ux    #2461      +/-   ##
=====================================================================
- Coverage                              62.73%   62.49%   -0.25%     
=====================================================================
  Files                                    266      266              
  Lines                                  59697    60109     +412     
  Branches                                3842     3865      +23     
=====================================================================
+ Hits                                   37451    37563     +112     
- Misses                                 22170    22470     +300     
  Partials                                  76       76              
Flag Coverage Δ
unittests 62.49% <27.02%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Will Lo <96078566+Will-ShaoHua@users.noreply.github.com>
@sacrodge sacrodge marked this pull request as ready for review November 4, 2025 21:51
@sacrodge sacrodge requested a review from a team as a code owner November 4, 2025 21:51
},
],
modifiedFilesTracker: {
title: 'Following files were modified : ',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We need to change this string!

buttons: [{ id: BUTTON_UNDO_CHANGES, text: 'Undo', icon: 'undo' }],
},
modifiedFilesTracker: {
title: 'Following files were modified : ',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declare const and assign wherever its been used!

@laileni-aws
Copy link
Contributor

Approved for testing!

XiaoxuanLu and others added 8 commits November 10, 2025 10:38
* chore: add the dummpy package back the the script

* chore: fix the zip to cp

* chore: move the file into zip folder
aws#2475)

* feat: differenciate implicit and explicit reject for inline completion

* fix: add UT for inline reject metric type
Co-authored-by: Boyu <bywang@amazon.com>
* fix: McpManager not initialized error

* fix: adding more try catch to avoid crashes due to mcpmanager initialization error

* fix: adding error to debug logs
@laileni-aws laileni-aws merged commit 62b4a0e into aws:feature/upgrade-modified-files-ux Nov 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants