Develop#302
Merged
Merged
Conversation
send() appended the optimistic sent message, but the 3s poll could have
already replaced the list with the server's copy of the same id — leaving
two items with the same ULID. The chat LazyColumn keys by message id, so
the duplicate threw IllegalArgumentException ("Key ... was already used")
on the post-send animateScrollToItem and crashed the screen.
Dedupe by the same key the LazyColumn uses before the list reaches state,
in the shared builder used by reload/poll/send.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WmL9gFL2uKNVZDnkm9Mch
TweetListActivity's window-insets listener cast the root view's layoutParams to CoordinatorLayout.LayoutParams. A content view's layoutParams type comes from the activity content FrameLayout parent, not from the root itself being a CoordinatorLayout, so on Nothing OS it is FrameLayout.LayoutParams and the cast throws — crashing bookmarks/likes/quotes. (OPPO happened to yield CoordinatorLayout params, so it didn't crash there.) Apply the system-bar insets as padding on the root instead; padding is independent of the layoutParams type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WmL9gFL2uKNVZDnkm9Mch
Compose lists keyed by item id crash with IllegalArgumentException
("Key ... was already used") when the backing data contains a duplicate id
(paging across pages, a server returning a repeat, etc.). The timeline (the
01KVME2WQT crash in the logs) keyed paged tweets by id; notifications,
follow requests, chats, new-chat search, who-to-follow, thread and filters
lists were likewise unguarded.
- Timeline: drop the id key for positional keys, matching SearchTweetesFragment.
- Everything else: de-duplicate by id before display — at the ViewModel
source, inline at the items() call for plain lists, or via a shared local
val for index-based lists so indices stay aligned.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WmL9gFL2uKNVZDnkm9Mch
Dropping the timeline's id paging key (to stop the duplicate-key crash) left three sites reading LazyListItemInfo.key as the status id — the view-dwell recordView set and the load-more scroll anchoring. Re-derive the id from the item index via the bounds-safe getOptId(index) so both keep working with positional keys. Also from review: chat orderedForDisplay uses one key fn (equal to the LazyColumn key) for both de-dup and the sort tie-break; the thread de-dup is memoized with remember. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WmL9gFL2uKNVZDnkm9Mch
Extract messageDisplayKey() shared by ChatMessagesViewModel (de-dup + sort tie-break) and ChatMessagesActivity's LazyColumn key, so the two can't drift apart. The id-less fallback is senderId-prefixed (fixed-length ULID) so distinct messages can't collide on createdAt+text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WmL9gFL2uKNVZDnkm9Mch
…861u3 Fix warpdroid crashes: duplicate LazyColumn keys + insets ClassCast
… samples generateSample descended into the first non-empty subdirectory and only fell back to the current directory's files when every subtree failed, so files outside leaf directories were almost never sampled. Treat each subdirectory and each file as equal candidates at every level so coverage spans the whole tree. Replace the random line substring (which could be a single near-worthless character) with the whole file's contents as the sample. FileStack now carries just the file index. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AKujXgp59pHmUDM4uaiTF
Add deterministic tests on an in-memory tree (fstest.MapFS) for the two fixed bugs: every sample is a whole file (not a substring), files at every directory depth are sampled (not just leaves), the generate/resolve round-trip holds, the challenge equals SHA256(wholeFile + nonce), and the index/empty-stack/empty-codebase error paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AKujXgp59pHmUDM4uaiTF
Consolidate the whole-file/all-level traversal tests into the existing challenge_test.go instead of a separate file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AKujXgp59pHmUDM4uaiTF
io/fs paths (embed.FS, fstest.MapFS) are always slash-separated. filepath.Join produces backslashes on Windows, so traversal below the top level failed and only root files were sampled - breaking sampling on Windows nodes and cross-platform challenges. Switch to path.Join. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AKujXgp59pHmUDM4uaiTF
findSample resolves a SampleLocation that arrives over the wire (JSON) from a peer; a negative file_stack/dir_stack value passed the upper-bound-only check and panicked on slice indexing. Guard both lower bounds and return ErrSampleIndexOutOfBounds. Addresses a PR review comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AKujXgp59pHmUDM4uaiTF
Simplify challenge sampling to use full file content
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
No description provided.