Skip to content

fix(ui): SizeDisplay binding must be OneWay (read-only property)#20

Merged
LXBStudioLLC merged 1 commit into
mainfrom
fix/llm-size-display-binding
Jul 5, 2026
Merged

fix(ui): SizeDisplay binding must be OneWay (read-only property)#20
LXBStudioLLC merged 1 commit into
mainfrom
fix/llm-size-display-binding

Conversation

@LXBStudioLLC

Copy link
Copy Markdown
Owner

Summary

Fixes a crash when opening the LLM Settings view (Ollama options) when models are present.

Root Cause

LLMSettingsView.xaml line 95 bound <Run Text="{Binding SizeDisplay}"/>. The Run.Text dependency property defaults to TwoWay binding mode. LLMModelInfo.SizeDisplay is a read-only computed property (getter only, no setter). WPF throws InvalidOperationException → wrapped as XamlParseException when it tries to activate a TwoWay binding on a read-only property, crashing the entire DataTemplate instantiation for every model in the list.

Fix

Added Mode=OneWay to the binding:

<Run Text="{Binding SizeDisplay, Mode=OneWay}"/>

This tells WPF to only read source → target (one-directional), which is valid for read-only properties.

Test Results

Passed! - Failed: 0, Passed: 57 - Envoy.Core.Tests.dll
Passed! - Failed: 0, Passed: 15 - Envoy.Discovery.Tests.dll
Passed! - Failed: 0, Passed: 61 - Envoy.GhostDetection.Tests.dll

Checklist

  • One-line fix, no other files touched
  • Build succeeds (Release)
  • All 133 tests pass
  • No CAPTCHA/bot-detection code

LLMSettingsView.xaml bound Run.Text to SizeDisplay with the default
TwoWay mode. SizeDisplay is a read-only computed property (getter only),
so WPF threw XamlParseException at template instantiation time, crashing
the entire LLM provider card list whenever models were present.

Adding Mode=OneWay tells WPF to only read source -> target, which is
valid for read-only properties.
@LXBStudioLLC LXBStudioLLC merged commit a7dbfec into main Jul 5, 2026
1 check passed
@LXBStudioLLC LXBStudioLLC deleted the fix/llm-size-display-binding branch July 5, 2026 19:30
LXBStudioLLC added a commit that referenced this pull request Jul 5, 2026
Run.Text defaults to TwoWay in WPF. When bound to a read-only or
init-only property, WPF throws XamlParseException at template
instantiation, crashing the entire view.

PR #20 fixed SizeDisplay in LLMSettingsView. This PR fixes the
remaining 7 Run.Text bindings across 4 XAML files:

- BrowserSelectionView.xaml: StatusText
- DashboardView.xaml: Email, Phone, Experience.Count, Skills.Count
- FindJobsView.xaml: Company, Location
- LLMSettingsView.xaml: StatusText, ModelCountText

Every Run Text={Binding...} in the codebase now has Mode=OneWay.
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