Skip to content

[Bug]: Interests top-level nav label sources string from feature/search instead of feature/interests #2112

Description

@Noahs212

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • 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

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 (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

<string name="feature_interests_api_title">Interests</string>

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_YOUforYouR.string.feature_foryou_api_title
  • BOOKMARKSbookmarksR.string.feature_bookmarks_api_title
  • INTERESTS → ❌ searchR.string.feature_search_api_interests

Relevant logcat output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions