Skip to content

Commit 469e232

Browse files
committed
fix: recover async preference init failures
1 parent 758bc1b commit 469e232

13 files changed

Lines changed: 182 additions & 39 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and sourced reasoning; mine them for *why*, but pick the next task from
1818
`ROADMAP.md`.
1919

2020
1. [`PROJECT_CONTEXT.md`](PROJECT_CONTEXT.md) — single-page consolidated
21-
project context. Pins the load-bearing invariants, current v1.8.239
21+
project context. Pins the load-bearing invariants, current v1.8.240
2222
stack, the module layout, roadmap-file routing, and current source-of-truth
2323
state.
2424
2. [`ARCHITECTURE.md`](ARCHITECTURE.md) — contributor-facing module,
@@ -91,7 +91,7 @@ evidence. A matching `fastlane/metadata/android/en-US/changelogs/<versionCode>.t
9191

9292
`gradle.properties` `projectVersionCode` + `projectVersionName` bump in lockstep
9393
with the changelog commit. Tag the release commit at the same time
94-
(`git push --tags`). HEAD is `v1.8.239` (versionCode 2039) as of 2026-06-04.
94+
(`git push --tags`). HEAD is `v1.8.240` (versionCode 2040) as of 2026-06-04.
9595

9696
### 5. Definition of Done (per [ROADMAP.md](ROADMAP.md) §15)
9797

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SwiftFloris Architecture
22

3-
Last updated: 2026-06-04, against the v1.8.239 codebase.
3+
Last updated: 2026-06-04, against the v1.8.240 codebase.
44

55
This file is the fast architectural map for contributors. It is intentionally
66
shorter than `ROADMAP.md` and more code-oriented than `PROJECT_CONTEXT.md`.

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,46 @@
22

33
All SwiftFloris release history is consolidated here. This replaces the former root-level `RELEASE_NOTES_v*.md` file-per-release pattern.
44

5+
<a id="v1.8.240"></a>
6+
## v1.8.240
7+
8+
Released: 2026-06-04
9+
10+
### Startup preference recovery
11+
12+
R11-1 is closed. Async preference-store initialization now runs under a supervised app scope, stages failures through the existing crash-report path, unblocks the Settings splash wait in a non-cancelled completion path, and re-checks staged startup crashes before normal Settings content renders.
13+
14+
### Changes
15+
16+
- **`FlorisApplication.kt`** - switches the app background scope to `SupervisorJob`, extracts a testable preference-init helper, stages/logs init failures, and marks `preferenceStoreLoaded` true in `finally` so the splash cannot wait forever.
17+
- **`FlorisAppActivity.kt`** - re-checks `stagedStartupCrashIntent(...)` after the preference-loaded flow unblocks and redirects to `CrashDialogActivity` before reading prefs or rendering normal Settings content.
18+
- **`StartupCrashRecoveryTest.kt`** - adds focused coverage for async preference-init failure staging, splash unblock, crash-dialog intent routing, stacktrace persistence, and successful init without staged-crash leakage.
19+
- **`README.md` / `PROJECT_CONTEXT.md` / `AGENTS.md` / `ARCHITECTURE.md` / `ROADMAP.md` / `COMPLETED.md` / `RESEARCH_REPORT.md` / `gradle.properties` / fastlane metadata** - advances the release marker to v1.8.240 / versionCode 2040 and closes R11-1.
20+
21+
### Verification
22+
23+
- `cmd /c ".\gradlew.bat --no-daemon --no-parallel --max-workers=1 -Dorg.gradle.jvmargs=-Xmx1536m -Dkotlin.daemon.jvm.options=-Xmx1536m :app:testDebugUnitTest --tests dev.patrickgold.florisboard.app.StartupCrashRecoveryTest"` - PASS in 45s.
24+
- Initial focused run compiled touched app code, then failed because JUnit4 rejected expression-bodied `runBlocking` tests as non-void methods; the tests now use block bodies.
25+
- `git diff --check` - PASS.
26+
- `bash scripts/check-fastlane-metadata.sh` - PASS for versionCode 2040.
27+
- APK assembly and manual forced preference-init smoke were intentionally skipped in this local batch per operator request to avoid repeated heavy Android builds.
28+
29+
### Files Touched
30+
31+
- `AGENTS.md`
32+
- `ARCHITECTURE.md`
33+
- `CHANGELOG.md`
34+
- `COMPLETED.md`
35+
- `PROJECT_CONTEXT.md`
36+
- `README.md`
37+
- `RESEARCH_REPORT.md`
38+
- `ROADMAP.md`
39+
- `app/src/main/kotlin/dev/patrickgold/florisboard/FlorisApplication.kt`
40+
- `app/src/main/kotlin/dev/patrickgold/florisboard/app/FlorisAppActivity.kt`
41+
- `app/src/test/kotlin/dev/patrickgold/florisboard/app/StartupCrashRecoveryTest.kt`
42+
- `fastlane/metadata/android/en-US/changelogs/2040.txt` (new)
43+
- `gradle.properties` (versionCode 2039->2040, versionName 1.8.239->1.8.240)
44+
545
<a id="v1.8.239"></a>
646
## v1.8.239
747

COMPLETED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Consolidated from the archived open-work checklist (closed items). Full per-rele
7878
- [x] RA-9 (P2) — Settings search destination highlights now consume the process-wide target once into local screen state, expose a close action, and do not reappear on later visits without a new search. Shipped v1.8.237. — *Source: ROADMAP.md Researcher Queue Cycle 1.*
7979
- [x] R4-2 (P3) — Clipboard image/video history tiles now expose localized TalkBack labels with media type, history group, and copied-time context while keeping thumbnail/video overlay icons decorative. Shipped v1.8.238. — *Source: ROADMAP.md Researcher Queue Cycle 4.*
8080
- [x] R10-1 (P2) — Editor start-view and selection-update content generation is cancelled or superseded across reset, finishInput, and input-connection switches so delayed jobs cannot republish stale editor state or touch an old `InputConnection`. Shipped v1.8.239. — *Source: ROADMAP.md Researcher Queue Cycle 10.*
81+
- [x] R11-1 (P2) — Async preference-store initialization failures now stage a crash report, unblock the Settings splash wait, and redirect to the existing crash recovery surface before normal Settings content renders. Shipped v1.8.240. — *Source: ROADMAP.md Researcher Queue Cycle 11.*
8182
- [x] F1, F2, F15, F16, F17, F19, F20, F25, F26, F32, F34, F35, F36, F41, F42, EI8, EI11, EI4 (doc) — Closed across v1.8.174 -> v1.8.187. — *Source: TODO_2026-06-03.md*
8283
- [x] IMPROVEMENT_PLAN Workstreams 1, 3, 4, 5, 6 complete; Workstream 2 (lint) monotonically decreasing. — *Source: IMPROVEMENT_PLAN_2026-05-18.md*
8384

PROJECT_CONTEXT.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Maintained at root for fast onboarding.**
44
**Last consolidated:** 2026-06-04 (from the autonomous research run at
55
[`.ai/research/2026-05-17/`](.ai/research/2026-05-17/) plus follow-up slices
6-
through v1.8.239).
6+
through v1.8.240).
77

88
This file is the single fastest read for an AI session, new contributor, or
99
maintainer-context refresh. It does **not** replace [ROADMAP.md](ROADMAP.md),
@@ -47,7 +47,7 @@ them requires changing both the relevant code *and* the gate.
4747
If a proposed change conflicts with any of these, the answer is "move that
4848
feature into an addon" — never "loosen the invariant."
4949

50-
## 3. Stack at HEAD (v1.8.239)
50+
## 3. Stack at HEAD (v1.8.240)
5151

5252
```
5353
Kotlin 2.3.21 · Compose BOM 2026.05.01 · Material 3 + material-kolor 4.1.1
@@ -204,7 +204,7 @@ and in [`ROADMAP.md` §0 v5.5 + v5.4](ROADMAP.md). Net deltas to invariants:
204204
at `docs/outreach/2026-05-17-swiftkey-migration/` covering
205205
AlternativeTo, BGR, Android Authority, and r/Swiftkey.
206206

207-
**v1.8.104 - v1.8.239** ships the seventh research-pass privacy,
207+
**v1.8.104 - v1.8.240** ships the seventh research-pass privacy,
208208
voice, clipboard, NLP, visual-regression, Addons trust/asset/catalog layer, and
209209
input-behavior testability plus conservative lint/dependency cleanup and
210210
performance-baseline / CI-quality / repo-hygiene / destructive-confirmation
@@ -538,7 +538,7 @@ keyboard preview field now renders as a distinct bottom surface, exposes
538538
ready/active focus-state feedback, preserves bottom-bar traversal ordering, and
539539
uses coroutine-safe feedback when Android cannot open the keyboard picker.
540540

541-
v1.8.171 through v1.8.239 refresh the release front door after the 2026-05-31
541+
v1.8.171 through v1.8.240 refresh the release front door after the 2026-05-31
542542
SwiftKey account-export cutoff, consolidate planning into `ROADMAP.md`,
543543
backfill audit docs, ship settings search and search polish, add hardware
544544
keyboard import and per-app language/accent discovery, harden release gates
@@ -599,6 +599,10 @@ v1.8.239 closes the editor content-generation lifecycle gap: delayed start-view
599599
and selection-update jobs are cancelled or superseded across reset,
600600
finishInput, and input-connection switches before they can republish stale
601601
editor state or touch an old `InputConnection`.
602+
v1.8.240 closes the async preference-store startup recovery gap: failed
603+
`FlorisPreferenceStore.initAndroid(...)` work is staged through the existing
604+
crash-report path, the Settings splash wait is unblocked, and Settings checks
605+
for that staged failure before rendering normal content.
602606

603607
## 4. Module layout
604608

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SwiftFloris
22

3-
![Version](https://img.shields.io/badge/version-v1.8.239-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-green) ![Platform](https://img.shields.io/badge/platform-Android%208.0+-orange) ![Network](https://img.shields.io/badge/network-none-lightgrey) ![Dictionary imports](https://img.shields.io/badge/dictionary%20imports-local%20files-green)
3+
![Version](https://img.shields.io/badge/version-v1.8.240-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-green) ![Platform](https://img.shields.io/badge/platform-Android%208.0+-orange) ![Network](https://img.shields.io/badge/network-none-lightgrey) ![Dictionary imports](https://img.shields.io/badge/dictionary%20imports-local%20files-green)
44

55
**SwiftFloris** is a privacy-first Android keyboard, forked from FlorisBoard and pushed toward SwiftKey-class multilingual typing without the cloud. It ships under Apache-2.0, holds no `INTERNET` permission, and binds zero accounts.
66

@@ -37,7 +37,7 @@
3737
3838
## Highlights
3939

40-
| Area | What's in v1.8.239 | Privacy posture |
40+
| Area | What's in v1.8.240 | Privacy posture |
4141
|------|-------------------|-----------------|
4242
| **Autocorrect / prediction** | SCOWL 117k English dictionary, SymSpell d1+d2, bigram + trigram next-word, capitalization-aware completions, contraction handling, instant-remember user-dictionary overlay | On-device |
4343
| **Multilingual typing** | Bilingual subtype presets (EN+ES / EN+FR / EN+DE), per-token Latin language identification, top-two straddle guard, sentence-local context scoring, and opt-in remembered keyboard language per app | On-device |
@@ -287,6 +287,7 @@ Real device-number collection is tracked in [`docs/BENCHMARKS.md`](docs/BENCHMAR
287287

288288
The full release stream lives in [`CHANGELOG.md`](CHANGELOG.md) and on [GitHub Releases](https://github.com/SysAdminDoc/SwiftFloris/releases).
289289

290+
- **v1.8.240** (2026-06-04) — Async preference-store init failures now stage a crash report, unblock the Settings splash wait, and redirect to recovery instead of hanging. ([notes](CHANGELOG.md#v1.8.240))
290291
- **v1.8.239** (2026-06-04) — Editor start/selection content-generation jobs now cancel or supersede stale work before reset, finishInput, or field switches can republish old state. ([notes](CHANGELOG.md#v1.8.239))
291292
- **v1.8.238** (2026-06-04) — Clipboard image/video history tiles now expose localized TalkBack labels with media type, history group, and copied-time context while keeping decorative thumbnail overlays hidden. ([notes](CHANGELOG.md#v1.8.238))
292293
- **v1.8.237** (2026-06-04) — Settings search destination highlights are now one-shot and dismissible, so stale search-result cards do not reappear on later visits. ([notes](CHANGELOG.md#v1.8.237))
@@ -469,7 +470,7 @@ limitations under the License.
469470

470471
## Status
471472

472-
🚀 **Active development.** Current release: **v1.8.239** (2026-06-04). The SwiftKey account export window closed on **2026-05-31**; local/on-device migration paths remain documented above.
473+
🚀 **Active development.** Current release: **v1.8.240** (2026-06-04). The SwiftKey account export window closed on **2026-05-31**; local/on-device migration paths remain documented above.
473474

474475
---
475476

0 commit comments

Comments
 (0)