You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f050a66
Browse filesBrowse the repository at this point in the historyBrowse files
- Local draft per account, reply drafts per parent. The quick reply sheet and the editor's reply mode share the slot; the sheet's model is kept app-wide (see the post screen), so whenever the editor's reply mode writes a reply draft that model reads it again in place (`AppEnvironment.replyDraftWrittenElsewhere`, `ComposeReplyModel.draftChangedElsewhere`; a sheet showing it stays alive), except while it sends, uploads an image or has typing not saved yet (on a two pane window the later save wins), and keeps what it shows when nothing could be read back. Text the sheet is given back (iOS sets its field and echoes it) saves nothing. A reload never drops a permlink a failed send of the sheet left, and Send reads the saved draft's permlink when the sheet has none (its own save may still be waiting). The editor tells the sheet when it saves the permlink of a send, before the broadcast (`theSheetKnowsTheEditorsPermlinkBeforeItsBroadcastAnswers`), and the sheet's own save keeps such a permlink, so for a send whose answer was lost a retry from the sheet asks the chain first and never posts a second reply. An edit of a reply writes its own slot and leaves the quick replies under it alone. Before this a reply continued in the editor ("Open editor") came back in the sheet as it was before, or empty, and the next keystroke wrote that over the editor's text (Android 4.0.0 user report; `EditorModelTest.theQuickReplySheetShowsWhatTheEditorWroteAfterIt`, `aQuickReplyBeingSentKeepsItsModelWhenTheEditorSaves`, `editingAReplyLeavesTheQuickRepliesToItAlone`, `QuickReplyToolsTest.aDraftSavedElsewhereNeverReplacesAnUploadOrUnsavedTyping`, `aReloadKeepsTheSheetOnAFailedReadAndAnEchoNeverBlocksTheNext`, `EditorModelTest.aReplyTheEditorSentIsNeverSentAgainFromTheSheet`, `theSheetsOwnSaveKeepsThePermlinkTheEditorSentUnder`).
1117
+
- Local draft per account, reply drafts per parent. The quick reply sheet and the editor's reply mode share the slot; the sheet's model is kept app-wide (see the post screen), so whenever the editor's reply mode writes a reply draft that model reads it again in place (`AppEnvironment.replyDraftWrittenElsewhere`, `ComposeReplyModel.draftChangedElsewhere`; a sheet showing it stays alive), except while it sends, uploads an image or has typing not saved yet (on a two pane window the later save wins), and keeps what it shows when nothing could be read back. Text the sheet is given back (iOS sets its field and echoes it) saves nothing. A reload never drops a permlink a failed send of the sheet left, nor applies a read made before a send of the sheet ran, and Send reads the saved draft's permlink when the sheet has none (its own save may still be waiting). The editor tells the sheet when it saves the permlink of a send, before the broadcast (`theSheetKnowsTheEditorsPermlinkBeforeItsBroadcastAnswers`), and the sheet's own save keeps such a permlink, so for a send whose answer was lost a retry from the sheet asks the chain first and never posts a second reply. An edit of a reply writes its own slot and leaves the quick replies under it alone. Before this a reply continued in the editor ("Open editor") came back in the sheet as it was before, or empty, and the next keystroke wrote that over the editor's text (Android 4.0.0 user report; `EditorModelTest.theQuickReplySheetShowsWhatTheEditorWroteAfterIt`, `aQuickReplyBeingSentKeepsItsModelWhenTheEditorSaves`, `editingAReplyLeavesTheQuickRepliesToItAlone`, `QuickReplyToolsTest.aDraftSavedElsewhereNeverReplacesAnUploadOrUnsavedTyping`, `aReloadKeepsTheSheetOnAFailedReadAndAnEchoNeverBlocksTheNext`, `EditorModelTest.aReplyTheEditorSentIsNeverSentAgainFromTheSheet`, `theSheetsOwnSaveKeepsThePermlinkTheEditorSentUnder`).
1118
1118
- Save draft (update or save as new), save on leaving. Difference from RN: a draft deleted elsewhere (the web, another phone) is saved as a new draft, which later saves update; RN failed every save, as the private API answers the update with 404 (Sentry ECENCY-MOBILE-3R2). Only a 404 that the drafts list confirms (the draft id is no longer in it; `EditorApi.hasDraft`, strict where `allDrafts` is lenient: a body that does not parse, has no list, or has a row without a string `_id` answers nothing) does that: a 404 from a broken route with the draft still there, or a list that cannot be read, fails the save and makes no second draft; any other failure stays a failure; a replacement that failed to be created is tried again by the next save (`EditorModelTest.aDraftDeletedElsewhereIsSavedAsANewDraft`, `aBrokenUpdateRouteNeverDuplicatesAnExistingDraft`, `aFailedReplacementIsTriedAgainByTheNextSave`, `anUnreadableDraftsListNeverConfirmsADraftGone`, `anotherDraftUpdateFailureIsStillAFailure`).
1119
1119
- Drafts screen: Drafts, Schedules, Templates, paging by 20, unsynced local draft row, open, delete, clone, batch delete. Each row shows RN's summary (`postBodySummary` of 100: plain text, links as their text, cut at a word; `DraftsState.summaries`, made off the main thread)
- **Leaving a running send**: back asks first ("Still sending"); the send goes on without its screen (`WalletSends` counts the screens that own it, `SendOwnership`) and a send nobody owns any more reports its outcome as one toast and is forgotten. An account that leaves (logout, logout-all, wipe) stops its sends at once: nothing signs again for it.
1568
1568
- **Links**: hive:// and ecency://sign operations go through the same `WalletSends` (one action per confirmed link, "check your wallet", same transaction); the requesting app hears only the final word: `status=success&id=...`, `user_cancelled`, `unconfirmed` when the chain cannot tell, else `qr.transaction_failed`.
1569
1569
- **One amount reading**: every amount, the checks and the signed text alike, goes through `Amounts.normalize` / `Dec.of`: ".5" is 0.5 (read as 0.000 it would delete a schedule when sent as a recurrent transfer), "", "." and "1e3" are not amounts. Single-recipient kinds refuse several typed names instead of sending to the first.
1570
-
- **Restart journal** (`SendJournal`): when a key account's send turns uncertain, `{account, actionId, txId, expiration, operation name}` goes into the secure store entry `wallet.sendJournal` (no key, signature, amount, recipient or memo; `WalletModelsTest` checks the stored text); it is removed when the send settles in this run. At launch (`env.sendJournal.start()`, called by both apps at launch) every entry left is resolved with `transaction_status_api.find_transaction`: in a block or the mempool "went through", `expired_irreversible` "did not go through", `too_old` or the chain's head time past expiration + 10 minutes "could not confirm"; anything else keeps checking (after 5, 10, 20 s, then every 30 s for about 10 minutes while the app runs, again at the next start). The result shows as a notice on the account's Wallet tab until dismissed. Logout removes the account's entries, undecided ones included (the account's sends stop at the same time; the user checks that account's wallet after signing in again). Stopping a send does not take back a request already on the wire: a broadcast a node had received before the logout may still land; a wipe removes the store. A change the store refuses (iOS before the first unlock: a send journaled, settled, dismissed or forgotten while the Keychain is locked) is kept in memory and in an ordered list of unsaved changes; the next read that works (the next change, or `start()` again at the next activation) applies them again, in order, to the stored list before its own change and writes the result, so an entry recorded while locked keeps its notice and its place in the 32 below, and one removed while locked is not brought back by the stored copy (every change is idempotent, so one applied twice after a failed write is the same; `WalletDeltaFixesTest.aSendRecordedWhileLockedSurvivesTheStartAfterTheUnlock`, `theFirstChangeAfterTheUnlockKeepsTheSendRecordedWhileLocked`, `removalsWhileLockedAreNotBroughtBackByTheStoredCopy`). Updates run one at a time, from taking the queued changes to clearing them, so two at once after the unlock replay a change once and never write back what the other settled (`twoChangesAtOnceAfterTheUnlockNeverBringASettledSendBack`). At most 32 entries: past that, decided entries whose notice was not read give way, oldest first; undecided ones never do, and while 32 undecided entries wait no new value send starts ("Too many earlier sends are still being checked...").
1570
+
- **Restart journal** (`SendJournal`): when a key account's send turns uncertain, `{account, actionId, txId, expiration, operation name}` goes into the secure store entry `wallet.sendJournal` (no key, signature, amount, recipient or memo; `WalletModelsTest` checks the stored text); it is removed when the send settles in this run. At launch (`env.sendJournal.start()`, called by both apps at launch) every entry left is resolved with `transaction_status_api.find_transaction`: in a block or the mempool "went through", `expired_irreversible` "did not go through", `too_old` or the chain's head time past expiration + 10 minutes "could not confirm"; anything else keeps checking (after 5, 10, 20 s, then every 30 s for about 10 minutes while the app runs, again at the next start). The result shows as a notice on the account's Wallet tab until dismissed. Logout removes the account's entries, undecided ones included (the account's sends stop at the same time; the user checks that account's wallet after signing in again). Stopping a send does not take back a request already on the wire: a broadcast a node had received before the logout may still land; a wipe removes the store. A change the store refuses (iOS before the first unlock: a send journaled, settled, dismissed or forgotten while the Keychain is locked) is kept in memory and in an ordered list of unsaved changes; the next read that works (the next change, or `start()` again at the next activation) applies them again, in order, to the stored list before its own change and writes the result, so an entry recorded while locked keeps its notice and its place in the 32 below, and one removed while locked is not brought back by the stored copy (every change is idempotent, so one applied twice after a failed write is the same; `WalletDeltaFixesTest.aSendRecordedWhileLockedSurvivesTheStartAfterTheUnlock`, `theFirstChangeAfterTheUnlockKeepsTheSendRecordedWhileLocked`, `removalsWhileLockedAreNotBroughtBackByTheStoredCopy`). Updates run one at a time, from taking the queued changes to clearing them, so two at once after the unlock replay a change once and never write back what the other settled (`twoChangesAtOnceAfterTheUnlockNeverBringASettledSendBack`). A start after a good launch writes the changes a later lock kept in memory (`aChangeRefusedAfterAGoodLaunchIsWrittenAtTheNextStart`), and a send's settle on success is not cancellable, as on the failure paths. At most 32 entries: past that, decided entries whose notice was not read give way, oldest first; undecided ones never do, and while 32 undecided entries wait no new value send starts ("Too many earlier sends are still being checked...").
1571
1571
1572
1572
Differences from RN
1573
1573
- Link decoding wants JSON numbers for percents, recurrence and executions.
0 commit comments