feat: add web (wasmJs) target with FormattedString refactor - #227
Closed
codebutler wants to merge 2 commits into
Closed
feat: add web (wasmJs) target with FormattedString refactor#227codebutler wants to merge 2 commits into
codebutler wants to merge 2 commits into
Conversation
codebutler
force-pushed
the
formatted-string
branch
2 times, most recently
from
February 16, 2026 16:15
0e57185 to
4248725
Compare
…led class Introduce FormattedString sealed class (Literal, Resource, Plural, Concat) to defer string resolution to the UI layer, eliminating all runBlocking and getStringBlocking usage that blocked the JS event loop on wasmJs. Key changes: - All user-facing string fields (cardName, agencyName, routeName, stationName, subscriptionName, warning, emptyStateMessage, etc.) now return FormattedString instead of String - Remove StringResource interface, DefaultStringResource, TestStringResource, and all getStringBlocking platform actuals - Remove ObfuscatedTrip and TripObfuscator (unused) - Update FareBotUiTree/ListItem/HeaderListItem to use FormattedString - Update all ~100 transit modules to use FormattedString(Res.string.xxx) - For @serializable types (Station, TransitBalance), use @transient formattedName/formattedStationName fields alongside serializable String fields - Update App.kt, HelpScreen, TripMapScreen, CardViewModel, HistoryViewModel - Update all test files to use assertFormattedEquals() helper and assertResourceEquals() for resource key comparison - wasmJs and JVM targets compile and tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
codebutler
force-pushed
the
formatted-string
branch
from
February 16, 2026 16:15
4248725 to
a636de5
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
StringResource/runBlocking/getStringBlockingusage with deferred string resolution (Literal,Resource,Plural,Concat), unblocking the wasmJs target whererunBlockingis unavailableKnown limitations (web)
CardTransceiver.transceive()and WebUSB's async APITest plan
./gradlew allTests./gradlew :app:web:wasmJsBrowserDistributionbuilds successfullymake web-run— app loads, can import a card JSON and view transit data with station names🤖 Generated with Claude Code