fix: fix AnalyticsScreen LazyColumn crash and expand list key test coverage - #68
Merged
Merged
Conversation
Key on the log's original position in the analytics list (via withIndex()) instead of log.timestamp — timestamps are not unique under rapid logging and caused IllegalArgumentException when multiple events shared the same millisecond. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix log() helper: counter-based default timestamp prevents tests from silently sharing the same key when default is used - Add logsWithSameTimestampAllRender: verifies three logs with identical timestamps all render, catching any future key regression Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verifies that local and remote features of mixed types all render as distinct list items, acting as a regression guard for the item key. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verifies that multiple endpoint cards (getUser + createUser) both render in the staging group, acting as a regression guard for the compositeKey. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…guide Adds Compose List Keys section to code-style.md covering: uniqueness, stability under state changes, and semantic meaning. Adds matching item to PR checklist in pull-requests.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
matthiaslao
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devview-analytics) —AnalyticsScreenLazyColumn was keyed onlog.timestamp(epoch-milliseconds), which is not unique under rapid logging. ChangedfilteredAnalyticsto useanalytics.withIndex()so each item carries its original list position, then keys onitem.index— guaranteed unique sinceAnalyticsLogger.logsis append-only.devview-analytics) — fixedlog()helper (all tests defaulted to the same timestamp, silently broken); addedlogsWithSameTimestampAllRendertest that verifies three same-timestamp logs all render without crashing.FeatureFlipScreenTestandNetworkMockScreenTestas regression guards for their respective item keys.code-style.md(uniqueness, stability, semantic meaning rules) and a matching item to the PR checklist inpull-requests.md.Test plan
.\gradlew.bat assembleDebug -Pandroidx.baselineprofile.skipgeneration.\gradlew.bat testAndroidHostTest -Pandroidx.baselineprofile.skipgeneration.\gradlew.bat connectedAndroidDeviceTest -Pandroidx.baselineprofile.skipgeneration.\gradlew.bat detektFull🤖 Generated with Claude Code