fix: show favorites above recent models in the model picker#81
Merged
Merged
Conversation
The favorites filter built its key as "$provider.id/..." without brace-wrapping provider.id, so it interpolated Provider.toString() instead of the id and never matched favoriteModelKeys, hiding the favorites section entirely. Also cap the recent list at 3 entries when rendering, matching the storage-side limit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JPgh5Ax2U4XfUzysSPKcgH
yuga-hashimoto
marked this pull request as ready for review
July 25, 2026 05:14
Contributor
API 34 emulator screenshot failureDiagnostic logs were uploaded as the |
yuga-hashimoto
pushed a commit
that referenced
this pull request
Jul 25, 2026
`captureReviewedScreens` asserted that a node with the text "project" — the composer's workspace chip — was displayed on the empty chat screen. The paseo composer redesign (5e290b1) narrowed that button row to attach / model / thinking … mic / send and dropped the workspace chip; `CompactWorkspaceButton` has been dead code ever since, so the assertion could never pass again. The emulator screenshot job has failed identically on every PR since (#80, #81, #82, #83 all show the same `UiScreenshotInstrumentedTest.kt:103` failure and were merged anyway). Assert the composer's own placeholder instead, which keeps the screen's intent covered — 02-runtime-not-ready already asserts the same text is *absent* while the runtime is not ready, so the two cases now check the same element from both sides. Verified `:app:compileDebugAndroidTestKotlin`. The emulator run itself could not be reproduced locally (no emulator in this environment). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L3eN8AmoAcBDCTEeMTY3ba
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
"$provider.id/${it.id}"— Kotlin only interpolates the identifier immediately after$, so this evaluatedprovider.toString()and appended the literal text.id/...instead ofprovider.id. That key never matched anything infavoriteModelKeys, so favorited models fell through to the "最近利用" (recent) list or the full provider list instead of appearing in their own section above recent."${provider.id}/${it.id}", matching the correct pattern already used elsewhere in the same file (hidden models, recent-entries dedup, and the star toggle state).MAX_RECENT_MODELS), matching the existing storage-side cap (SecureSettingsRepository.MAX_RECENT_MODELS/AppPreferencesRepository.selectModel's.take(3)), so any previously-stored longer list can't display more than 3.Test plan
ModelAndRuntimePickerSheet.kt.Generated by Claude Code