-
Notifications
You must be signed in to change notification settings - Fork 12
Indicate when file in code mode is empty - don't show a syntax error #3836
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
Indicate when file in code mode is empty - don't show a syntax error #3836
Conversation
Preview deployments |
Host Test Results 1 files ± 0 1 suites ±0 1h 38m 55s ⏱️ - 39m 28s Results for commit d5091e3. ± Comparison against base commit 75067cd. This pull request removes 1 and adds 235 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the user experience when viewing empty files in code mode by displaying a friendly message instead of a syntax error. It also adds intelligent detection to show when the AI Assistant is generating content for an empty file.
Changes:
- Replaced error display for empty files with a user-friendly "File is empty" message
- Added dynamic message updates to show "generating content in the AI Assistant..." when AI is actively creating content for empty files
- Implemented tracking of canceled actions in the matrix service to properly hide generating messages when patches are canceled
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/host/tests/acceptance/code-submode/schema-editor-test.ts |
Updated test to verify empty file message instead of syntax error display |
packages/host/tests/acceptance/code-patches-test.gts |
Added comprehensive tests for empty file scenarios including streaming, patch acceptance, and cancellation |
packages/host/app/services/matrix-service.ts |
Added canceled action message tracking with getter/setter methods and proper cleanup |
packages/host/app/components/operator-mode/code-submode/module-inspector.gts |
Implemented empty file detection and generating content logic with associated styling |
packages/host/app/components/matrix/room.gts |
Integrated canceled action tracking with the matrix service when user cancels actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
79b80b1 to
d963689
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/host/app/components/operator-mode/code-submode/module-inspector.gts
Show resolved
Hide resolved
packages/host/app/components/operator-mode/code-submode/module-inspector.gts
Show resolved
Hide resolved
3058b72 to
5177fce
Compare
This PR addresses two issues:
Note
Improves empty-file UX in code mode and reflects AI generation status tied to recent assistant patches.
SyntaxErrorDisplayfor empty files with a centered message; shows "content is being generated by the AI Assistant" when the latest assistant message targets the file (streaming or ready patch), and hides it if canceledmodule-inspector.gtsby inspecting Matrix room messages, author, streaming state, code patch readiness, and per-room canceled action trackingmatrix-service.ts(markActionAsCanceled,getLastCanceledActionEventId) and wires it frommatrix/room.gtscancelActionBarWritten by Cursor Bugbot for commit d5091e3. This will update automatically on new commits. Configure here.