Skip to content

Conversation

@jurgenwerk
Copy link
Contributor

@jurgenwerk jurgenwerk commented Jan 14, 2026

This PR addresses two issues:

  • When viewing blank files in code mode, it removes the "Syntax error" display - this is not really a syntax error so we can just say the file is blank and that the module inspector tools are unavailable for that
  • We will soon add a feature where if you are in interact mode and the assistant begins to create a file, it will currently switch you to code mode and open the index card, which is not a very good user experience - here we'll change this so that it first creates a blank file, switches to code mode and navigates to it, then starts generating the content. So in this case we'll show the "File is empty - the content is currently being generated by the AI Assistant" (last image below)
image image image

Note

Improves empty-file UX in code mode and reflects AI generation status tied to recent assistant patches.

  • Replaces SyntaxErrorDisplay for 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 canceled
  • Adds generation detection logic in module-inspector.gts by inspecting Matrix room messages, author, streaming state, code patch readiness, and per-room canceled action tracking
  • Introduces per-room cancellation tracking in matrix-service.ts (markActionAsCanceled, getLastCanceledActionEventId) and wires it from matrix/room.gts cancelActionBar
  • Adds/updates acceptance tests to cover streaming, pending-acceptance, and cancel flows; updates schema-editor test to expect the new empty-file message

Written by Cursor Bugbot for commit d5091e3. This will update automatically on new commits. Configure here.

@github-actions
Copy link

Preview deployments

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Host Test Results

    1 files  ±  0      1 suites  ±0   1h 38m 55s ⏱️ - 39m 28s
1 874 tests +234  1 859 ✅ +248  15 💤 ±0  0 ❌  -  1 
1 889 runs  +235  1 874 ✅ +262  15 💤 ±0  0 ❌  - 14 

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.
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.a0f1fa411c6f69fe7c73.js, line 150984  While executing test: Acceptance | index card home resolution > operator submodes: host submode uses hostHome and updates after edit 
Chrome ‑ Acceptance | Code patches tests: empty file shows generating content while streaming a new file patch
Chrome ‑ Acceptance | Code patches tests: empty file shows generating content while waiting for patch acceptance
Chrome ‑ Acceptance | Code patches tests: empty file stops showing generating content after canceling patch
Chrome ‑ Acceptance | index card home resolution > operator submodes: host submode uses hostHome and updates after edit
Chrome ‑ Integration | Store: added instance that was previously not saved will begin to auto save after being added
Chrome ‑ Integration | Store: an instance can be restored after a loader reset
Chrome ‑ Integration | Store: an instance can debounce auto saves
Chrome ‑ Integration | Store: an instance can live update thru an error state
Chrome ‑ Integration | Store: an instance live updates from indexing events for a code update
Chrome ‑ Integration | Store: an instance live updates from indexing events for an instance update
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

Copilot AI left a 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.

@jurgenwerk jurgenwerk force-pushed the cs-10005-empty-gts-file-should-not-show-a-syntax-error branch from 79b80b1 to d963689 Compare January 14, 2026 12:58
Copy link
Contributor

Copilot AI left a 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.

@jurgenwerk jurgenwerk force-pushed the cs-10005-empty-gts-file-should-not-show-a-syntax-error branch from 3058b72 to 5177fce Compare January 15, 2026 09:30
@jurgenwerk jurgenwerk requested a review from a team January 15, 2026 10:07
@jurgenwerk jurgenwerk marked this pull request as ready for review January 15, 2026 10:37
@jurgenwerk jurgenwerk merged commit ad44cf2 into main Jan 16, 2026
146 of 147 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.

3 participants