| name | review-case |
| description | Review an existing case implementation against project-specific red lines and coding standards. Use after implementing or modifying a case. Use when: reviewing a Compose case for correctness, checking red-line compliance, verifying lifecycle and state patterns, auditing an existing Composable. Keywords: review, audit, check, red lines, lifecycle, state, compliance, Compose.
|
Review Case — APIExample-Compose
Run through every item below before considering a case implementation complete.
Open the case's Composable source file and verify each point against the actual code.
Checklist
Teardown & Lifecycle
State Management
Threading
Permissions
If a Check Fails
DisposableEffect(Unit) is used — change key to lifecycleOwner, then verify back navigation triggers cleanup.
RtcEngine stored in rememberSaveable or state fields in remember only — fix to RtcEngine -> remember, UI/session state -> rememberSaveable, then verify rotation.
- Toast/Dialog shown directly in callback — move UI-thread-only calls into
coroutineScope.launch(Dispatchers.Main).
- Permission launcher bypassed before
joinChannel() — gate join flow behind permission callback and re-test denied/granted paths.
NEVER
- NEVER approve a review when
DisposableEffect key is Unit for case teardown logic.
- NEVER approve a review when
RtcEngine uses rememberSaveable.
- NEVER treat Compose callback state safety as permission to call Toast/Dialog off main thread.
- NEVER skip rotation and back-navigation checks for lifecycle-sensitive Compose cases.