Repository navigation
Conversation
ChatsModel holds the Chats tab's filter, chip reveal and select mode over ChatListProjection, so the shared behavior files can run against it with swift test on the Mac. ChatListFilter moves to FlipcashCore with it; the app keeps the chip titles and empty messages. The screen doesn't use the model yet. ChatsBehaviorTests replays the synced copy in Fixtures/behaviors/chats/.
ChatsPuppetHost moves out of ChatsBehaviorTests into a ChatsPuppet library in FlipcashCoreVectors, so the test and a new chats-puppet-host executable answer the same requests. The executable reads one JSON request per line on stdin (ls, do, reset) for the orchestrator's puppet CLI, in the same shape as the Android host. Built with swift build --product chats-puppet-host, it runs on the Mac with no simulator; the four Chats behavior files take 0.07 s through the CLI.
Adding the ChatsPuppet library and host targets renames the package's Xcode scheme from FlipcashCoreVectors-Package to FlipcashCoreVectors, so the vectors job's xcodebuild test call would fail to find its scheme. SelectionStarted's input schema now lists the optional chatId, matching what perform accepts and what the Android host reports.
TipConversationsScreen ran its filter, chip and selection rules itself, so the Puppet host tested a copy the app never used. The screen now reads ChatsModel's state and sends it actions: - Opening a chat, the archived list and a new chat go through ChatsDestination; the screen maps each to the existing router push. - ChatSelection wraps ChatListSelectionMode from FlipcashCore, so the tab bar's select actions and the host share one set of rules. - The Puppet host answers launch, keeps a stack of pushed screens and lends Back above the root. ChatsBehaviorTests replays files through the host's handle(), the same path the CLI uses. navigation.json is the synced copy from the orchestrator.
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.
TipConversationsScreenran its own filter, chip and selection rules, so nothing outside a simulator could check them. This moves those rules intoChatsModelin FlipcashCore. It also adds a headless Puppet host that replays the shared Chats behavior files withswift teston the Mac. The orchestrator'spuppetCLI can drive the same host as a process.ChatsModelholds the filter, chip reveal and select mode overChatListProjection.ChatListFiltermoves to FlipcashCore with it. The app keeps the chip titles and empty-state messages.ChatsDestination, and the screen maps each case to the existing router push.ChatSelectionwrapsChatListSelectionMode, so the tab bar's select actions follow the same rules as the host.ChatsPuppetlibrary andchats-puppet-hostexecutable in FlipcashCoreVectors. The host reads one JSON request per line (ls,do,launch,reset), keeps a stack of pushed screens and offersBackabove the root.ChatsBehaviorTestsreplaysFixtures/behaviors/chats/through the samehandle()the CLI calls.FlipcashCoreVectors-PackagetoFlipcashCoreVectors, sovectors.ymlnow builds the new name.The behavior files are synced copies. The canonical files, the protocol and the runner are in code-payments/flipcash-client-orchestrator#127, and the Android host is in code-payments/code-android-app#1974.
AppRouter.Destinationstays in the app for now. Moving it into FlipcashCore means moving its 65 cases plus theNavigationPathand withdraw and buy flows that depend on it, so that move will be its own PR.