Skip to content

fix(blazor): guard Monaco against external-echo clobber while editing (typing does nothing)#290

Open
rbuergi wants to merge 1 commit into
mainfrom
fix/monaco-external-echo-clobber
Open

fix(blazor): guard Monaco against external-echo clobber while editing (typing does nothing)#290
rbuergi wants to merge 1 commit into
mainfrom
fix/monaco-external-echo-clobber

Conversation

@rbuergi

@rbuergi rbuergi commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Recovers a complete-but-uncommitted fix for the chronic chat composer 'typing / backspace / arrows do nothing' bug (Safari). A data-bound Value arriving on a re-render mid-edit reconciled via SetValue and wiped the in-progress keystrokes; regressed when the userIsTyping flag was dropped in 9084b7ad5.

Two suppressors on the OnAfterRenderAsync reconcile: userIsTyping (synchronous same-render echo, re-arms) + editorHasFocus (async stream echoes while focused, from Monaco's onDidFocus/BlurEditorText). Legitimate programmatic pushes use SetValueAsync, so nothing real is blocked.

⚠️ Compiles under the Portal build; needs a real-browser confirm in Safari before merge.

🤖 Generated with Claude Code

… (typing does nothing)

A data-bound Value can arrive on a re-render WHILE the user is mid-edit — a live node-stream
echo behind MarkdownEditorView, or a lagging MessageText round-trip behind the chat composer.
Reconciling it via SetValue wiped the in-progress keystrokes and reset the cursor: the chronic
'typing / backspace / arrows do nothing' report (Safari composer). Regressed when the single
userIsTyping flag was dropped in 9084b7a.

Two complementary suppressors on the OnAfterRenderAsync reconcile:
  • userIsTyping   — set on each content change; suppresses the synchronous same-render echo the
                     keystroke itself triggers, then re-arms.
  • editorHasFocus — set from Monaco's onDidFocus/BlurEditorText (JS → HandleFocusChanged); the
                     user owns the buffer whenever focused, so ASYNC stream echoes are suppressed too.
Legitimate programmatic pushes use SetValueAsync (set lastSetValue), so nothing real is blocked.

NOTE: recovered from an uncommitted working-tree change this session; compiles under Portal build,
needs a real-browser confirm in Safari before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 2)

696 tests  ±0   694 ✅ ±0   1m 58s ⏱️ -2s
  9 suites ±0     2 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 1)

1 029 tests  ±0   1 028 ✅ ±0   3m 35s ⏱️ +3s
    8 suites ±0       1 💤 ±0 
    8 files   ±0       0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 4)

   10 files  ± 0     10 suites  ±0   4m 43s ⏱️ + 1m 17s
1 201 tests  - 17  1 201 ✅  - 17  0 💤 ±0  0 ❌ ±0 
1 210 runs   - 18  1 210 ✅  - 18  0 💤 ±0  0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

This pull request removes 17 tests.
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.AI.ModelProviderSett"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.AI.TeamsBot.md")
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.AccessC"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.DataSyn"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.Deploym"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.Grantin"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.MeshGra"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.NodeTyp"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.QueryRe"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.SyncedM"···)
…

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 3)

788 tests  ±0   788 ✅ ±0   3m 42s ⏱️ -7s
 10 suites ±0     0 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 5)

866 tests  +133   686 ✅ +132   4m 6s ⏱️ + 1m 29s
  9 suites ±  0   180 💤 +  1 
  9 files   ±  0     0 ❌ ±  0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results (shard 0)

631 tests  ±0   631 ✅ ±0   5m 9s ⏱️ +30s
 10 suites ±0     0 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results

   56 files  ±  0     56 suites  ±0   23m 16s ⏱️ + 3m 10s
5 211 tests +116  5 028 ✅ +115  183 💤 +1  0 ❌ ±0 
5 220 runs  +115  5 037 ✅ +114  183 💤 +1  0 ❌ ±0 

Results for commit 58c27ec. ± Comparison against base commit f057e77.

This pull request removes 17 and adds 133 tests. Note that renamed tests count towards both.
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.AI.ModelProviderSett"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.AI.TeamsBot.md")
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.AccessC"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.DataSyn"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.Deploym"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.Grantin"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.MeshGra"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.NodeTyp"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.QueryRe"···)
MeshWeaver.Persistence.Test.DocumentationCodeBlockCompilationTest ‑ ExecutedCsharpBlocks_MustCompile(embeddedResourceName: "MeshWeaver.Documentation.Data.Architecture.SyncedM"···)
…
MeshWeaver.Hosting.Monolith.Test.AgentChatClientNoSuitableAgentTest ‑ AgentChatClient_OnHostedSubHub_DoesNotReturn_NoSuitableAgent
MeshWeaver.Hosting.Monolith.Test.AgentPickerProjectionPartitionedTest ‑ PartitionedPath_ObserveAgents_FromHostedSubHub_PopulatesCombobox
MeshWeaver.Hosting.Monolith.Test.AgentPickerProjectionPartitionedTest ‑ PartitionedPath_ObserveAgents_PopulatesCombobox
MeshWeaver.Hosting.Monolith.Test.AgentPickerProjectionPartitionedTest ‑ PartitionedPath_ObserveModels_PopulatesCombobox
MeshWeaver.Hosting.Monolith.Test.AgentSyncedQueryFromHostedHubTest ‑ HostedSubHub_GetQuery_AgentDropdownNamesAreNonEmpty
MeshWeaver.Hosting.Monolith.Test.AgentSyncedQueryFromHostedHubTest ‑ HostedSubHub_GetQuery_ReturnsAgentsAndModels
MeshWeaver.Hosting.Monolith.Test.BrokenNodeTypeAccessTest ‑ AccessingInstance_OfNonCompilingNodeType_AnswersTerminalError_NotSilence
MeshWeaver.Hosting.Monolith.Test.CessionLayoutAreaTest ‑ BusinessRulesDoc_RelativeReference_ResolvesToMotorXL
MeshWeaver.Hosting.Monolith.Test.CessionLayoutAreaTest ‑ Cession_Trace_HubConfiguration
MeshWeaver.Hosting.Monolith.Test.CessionLayoutAreaTest ‑ MotorXL_LayoutArea_ReturnsContent
…

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.

1 participant