Fix/android UI msdp and polish - #8
Merged
Merged
Conversation
…board) + B-polish
Device-reported fixes
- Scrollback race crash: Session.Scrollback handed out the live List<ScrollbackLine>
which the telnet read thread mutated mid-enumeration on the Blazor render thread
("Collection was modified" -> dead UI). The getter now returns an immutable ToArray()
snapshot under a lock guarding both append sites. Regression test:
ScrollbackConcurrencyTests (bounded/deterministic).
- MSDP native crash: the server's MSDP negotiation crashed Mono with a SIGSEGV because
TelnetNegotiationCore < 2.5.1 shipped the F# MSDPLibrary but never declared FSharp.Core,
so it was missing from the APK. Bumped TNC to 2.5.1 (which now declares it); FSharp.Core
now flows in transitively and is packaged.
- Status-bar inset + soft keyboard: pure CSS env()/visualViewport can't work on the
device's Android System WebView 133 (needs WebView >= 136/139/144). Added a native
WindowInsets -> CSS-variable bridge (Platforms/Android/WebViewInsetsBridge.cs, wired from
MainPage on BlazorWebViewInitialized) that pushes --sc-safe-* and --sc-keyboard-height;
MainActivity sets adjustResize; app.css consumes them (max(env, var) padding,
height minus keyboard).
B-polish
- Protocol-toggle button got a real <> SVG icon (was literal "{ }"); session header
styled with a connection state-pill; ProtocolPanel fully styled (was 0 CSS).
- History-search UI: HistorySearchViewModel + HistorySearchView + /history page + 4th
bottom-nav entry, wired to the existing FTS5 ISessionHistory.SearchAsync, character
names resolved via IWorldStore; registered in both hosts.
- Web preferences are now file-backed (App_Data/preferences.json) so they survive reload;
WebSecretStore documented as deliberately in-memory (no plaintext creds on disk).
All test suites pass (184 TUnit + 46 bUnit + 17 Data); Android head and Web host build
0-warning. On-device inset/keyboard behavior needs verification after install.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHCRc5CJ6595iMzEgYYdQp
…tions break it
The Release Android build's trimmer ("optimize assemblies for size") aborts with
IL2040 / NETSDK1144 on FSharp.Core's embedded ILLink.Substitutions.xml: it tries
to remove F# signature/optimization embedded resources it can't find. FSharp.Core
now enters the closure via TelnetNegotiationCore's F# MSDP assembly (needed to fix
the MSDP runtime crash), and the substitution step can't be suppressed or skipped
(rooting the assembly does not bypass it). Set PublishTrimmed=false for the Android
Release config (AOT was already disabled). The APK is larger but builds; trimming
can return if FSharp.Core's linker metadata is fixed upstream.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHCRc5CJ6595iMzEgYYdQp
The column math hard-coded a 0.6em monospace advance to pick the font and compute NAWS. The real rendered advance is wider (~0.616), so an advertised MinColumns (78) physically fit only ~76 and the server's 78-wide lines wrapped two columns short. Port SharpMUSH.Client's terminalMetrics.js approach into sc-interop.js `measureGrid`: - advance + line-height MEASURED from hidden probes (200-char run averages sub-pixel rounding; 5-line probe for line-height), copying the resolved --mono family, letter-spacing and font-feature-settings — never derived from font-size; - fit the font so exactly MinColumns span the content width, with a closed-loop correction (re-measure MinColumns chars, shrink on overflow) for glyph-advance non-linearity from hinting; - padding-aware content width (matches the ResizeObserver contentRect basis); - report exactly MinColumns over NAWS and publish --out-fs/--sc-cols on the element. OutputView's track now holds a `calc(var(--sc-cols) * 1ch)` min-width and the output area scrolls horizontally, so on a screen too narrow to fit MinColumns at the minimum font the lines scroll instead of wrapping — what the player sees matches the server's wrap width. Removed the now-unused setFontSize interop. Tests: 184 TUnit + 46 bUnit green; UI/Web build 0-warning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHCRc5CJ6595iMzEgYYdQp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.