-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Background
This playground serves both contributors and users:
- Helps newcomers understand SafeBox's threading behavior.
- Verifies lifecycle correctness and
OnSharedPreferenceChangeListener
support. - Aids in debugging performance, concurrency, and cryptographic internals.
- Lays the groundwork for future observability features.
Goal
Introduce a minimal Jetpack Compose-based :app
module that serves as an interactive SafeBox Playground:
UI Features
-
Key input field
-
Value input field
-
Switch: Toggles between Apply/Commit Mode.
-
Buttons:
Validate Key
: CallssafeBox.contains(key)
and shows a snackbar with the result.Get
: CallssafeBox.getString(...)
then updates Value field with result (default:null
).Put
: StartssafeBox.edit()
(if needed) then callseditor.putString(key, value)
.Clear
: StartssafeBox.edit()
(if needed) then callseditor.clear()
.Apply
/Commit
: Triggers apply/commit towards the staged changes. Shows a snackbar if no edits are staged.
-
Dispatcher Toggle:
Choose coroutine context forsafeBox.getString(...)
betweenMain
,IO
, orDefault
. -
Staged Changes View:
Displays all pending (uncommitted) key-value pairs. -
Committed Entries View:
Displays current key-value pairs fromsafeBox.getAll()
, auto-updated viaOnSharedPreferenceChangeListener
.
MVP Scope
- Built with Jetpack Compose (preferred for future UI benchmarking).
- Clean, unidirectional architecture with MVVM/MVI.
- No Gradle script changes unless necessary.
- No metrics/benchmarking tools for now.
- No DI or Hilt/Koin setup required.
Future Ideas (Not part of MVP)
- Add
Choreographer
-based frame skip detection. - Visualize read/write durations.
- Monitor
CipherPool
size and idle lifespan. - Simulate race conditions for educational purposes.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
Backlog