Skip to main content

Shared types

Screen recovery state​

ProjectVScreenRecoveryState (.Presentation.Recovery) is on every data screen snapshot as Recovery:

MemberMeaning
PhaseProjectVScreenPhase: Idle, Loading, Live, Empty, Partial, Cached, Stale, Offline, Error
MessageSafe text describing the state
HasUsableDataKeep rendering the current data
CanRetryShow a Retry button (calls the same refresh)
CanSyncShow a Sync button (re-read the server after an unknown outcome)
RetryAfterSecondsDisable Retry for this long, when set

Do not blank a screen that still has usable data because a refresh failed; show an offline or partial indicator instead.

Transaction confirmation​

Costly actions are confirmed before they run. A presenter that supports them exposes a ProjectVTransactionConfirmationCoordinator (for example IProjectVCharacterPresenter.Transactions):

MemberMeaning
StatusProjectVTransactionStatus: Idle, AwaitingConfirmation, InFlight, Succeeded, Rejected, Cancelled, UnknownOutcome
CurrentProjectVTransactionConfirmation: Kind, Title, ItemOrRewardSummary, PriceSummary, Balances, DataLossScope, ExpiresAtUnixSeconds, IsAffordable
LastResultProjectVTransactionResult: Status, Message, CanRetry, CanSync
IsBusy, CanConfirm, CanCancelButton state
Cancel()Close the open confirmation
ChangedEvent raised on every change

ProjectVBalancePreview (in Balances) shows ResourceId, CurrentBalance, Cost and ProjectedBalance; these are a preview of the confirmation, not new balances. ProjectVTransactionKind: WalletPurchase, GachaDraw, AccountDeletion, CharacterSkillUpgrade, CharacterEquipmentUpgrade.

Errors​

ProjectVBackendErrorCategory: Cancelled, Validation, Authentication, Authorization, NotFound, Conflict, RateLimited, Timeout, Unavailable, Network, Protocol, Server, Client.

Login-side errors (Startup, Authentication, Account, Lobby) expose LocalizationKey in the form projectv.<screen>.<category>, for example projectv.authentication.network. Data-screen errors (Character, Alliance, Campaign, Shop) expose SafeMessage. Every error has Code and an optional RequestId to show in a support panel.

Typed identifiers​

IDs are small readonly structs compared by value with .Equals: ProjectVCharacterId, ProjectVCharacterSkillId, ProjectVCampaignMissionId, ProjectVShopOfferId, ProjectVItemId, ProjectVResourceId, ProjectVCurrencyId, ProjectVEquipmentId, ProjectVEquipmentSlotId, ProjectVSkinId, ProjectVLoadoutSlotId, ProjectVBackpackSlotId, ProjectVHeaderViewKey, ProjectVGameplayKey, ProjectVGameplaySkillId, ProjectVGameplayItemId. Each has a Value string.

Well-known values: ProjectVLoadoutSlots.Main / .ActiveAlly, ProjectVCharacterKinds.Character / .Ally, and ProjectVHeaderViewKeys (Credit, Gold, CoreDust, Diamond).

Map IDs to game assets (characters, items, scenes) with an explicit table. Never parse display names or reuse Unity asset GUIDs as server IDs.

UI subscriptions​

ProjectVUiSubscriptions adds SubscribeUiAsync to the Authentication, Startup and Header presenters:

var subscription = await header.SubscribeUiAsync(ProjectVUiBindingId.Header, ApplyHeader, token);

ProjectVUiBindingId (LoginAuthentication, LoginStartup, Header) must match the presenter, otherwise it throws. The helper observes when the synchronous apply callback returns (not rendering or backend completion); otherwise it behaves like SubscribeAsync.