feat: minor improvements to activity history - #506
Conversation
Introduces a sharable on-device store for Android and iOS to retain credential activity. We're re-using some components from the Wallet storage here, while maintaining a separate database for the local activity as it is a separate concern and should never be backed up with the existing systems. I've modeled the changes after how I typically use rust; mod.rs is mainly imports with most of the code in dedicated files, and tests in their related files. This system is expected to evolve over time so i've prioritized a sensible migration strategy as part of these changes. Tested integration on iOS. Will do Android later and follow up with any PRs that might be necessary for their integration. No runtime differences until the host apps are updated to use the new system.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f43c1afef5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f43c1af to
7d21d81
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d21d81. Configure here.

store the failure_reason as text (negligible perf difference, much clearer)
Note
Medium Risk
Changing the activity column type and serialization can break reads for existing DBs that still store integer failure codes unless a migration runs;
CREATE TABLE IF NOT EXISTSalone will not alter old tables.Overview
Activity history now persists
failure_reasonas lowercase text in SQLite instead of integer codes, and read/write paths usestrum(Display/FromStr) instead of hand-rolledi64mappers.activity_entries.failure_reasonis defined asTEXT NOT NULLwith an empty string when there is no reason (replacing SQLNULL). Cache schema reset is renamed toreset_cache_schemaand documents that disposable-cache resets do not drop activity history; a related test assertion is simplified.Reviewed by Cursor Bugbot for commit 77bc96b. Bugbot is set up for automated code reviews on this repo. Configure here.