android / android/nowinandroid
[Bug]: Interests top-level nav label sources string from feature/search instead of feature/interests
- Dominant language
- Kotlin
- Stars
- 21.8k
- Forks
- 4.6k
- Avg merge
- 19h 20m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is there a StackOverflow question about this issue?
- [X] I have searched StackOverflow
### What happened?
The `INTERESTS` entry in `TopLevelNavItem.kt` sources its `iconTextId` and `titleTextId` from the search module's string resource rather than from the interests module:
https://github.com/android/nowinandroid/blob/main/app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/TopLevelNavItem.kt#L62-L67
```kotlin
val INTERESTS = TopLevelNavItem(
selectedIcon = NiaIcons.Grid3x3,
unselectedIcon = NiaIcons.Grid3x3,
iconTextId = searchR.string.feature_search_api_interests,
titleTextId = searchR.string.feature_search_api_interests,
)
```
`feature_search_api_interests` is the inline "Interests" link label used by the search screen's empty-result body at [SearchScreen.kt:248](https://github.com/android/nowinandroid/blob/main/feature/search/impl/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/search/impl/SearchScreen.kt#L248) (the "Try another search or **Interests** to browse topics" text). Reusing it as the bottom-nav tab title creates a silent cross-feature coupling: a contributor changing the in-search "Interests" link text would unintentionally change the bottom-nav tab label too.
Meanwhile, the interests module already has its own dedicated title resource that is **completely unused** anywhere in the codebase:
https://github.com/android/nowinandroid/blob/main/feature/interests/api/src/main/res/values/strings.xml#L18
```xml
Interests
```
The resource was added on 2025-11-19 in commit `068d8cc` ("Split feature modules into api and impl modules") but never wired up.
This also breaks the per-module-ownership pattern used by the other top-level nav items in the same file:
- `FOR_YOU` → `forYouR.string.feature_foryou_api_title`
- `BOOKMARKS` → `bookmarksR.string.feature_bookmarks_api_title`
- `INTERESTS` → ❌ `searchR.string.feature_search_api_interests`
### Relevant logcat output
```shell
```
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start in app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/TopLevelNavItem.kt and compare the INTERESTS entry with feature/interests/api/src/main/res/values/strings.xml. Use the interests module's dedicated title resource for the top-level navigation labels, and confirm the search module's feature_search_api_interests resource remains specific to SearchScreen.kt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100