Skip to content

SCRUM-267 design: add search result screen#33

Open
gdaegeun539 wants to merge 6 commits intoproject-lyrics:developfrom
gdaegeun539:feature/SCRUM-267-search-result-screen
Open

SCRUM-267 design: add search result screen#33
gdaegeun539 wants to merge 6 commits intoproject-lyrics:developfrom
gdaegeun539:feature/SCRUM-267-search-result-screen

Conversation

@gdaegeun539
Copy link
Copy Markdown
Member

@gdaegeun539 gdaegeun539 commented Apr 13, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines

What kind of change does this PR introduce?

Select your one and delete others

  • Implement design

What is the current behavior?

You can also link to an open issue here

곡을 이용한 노트 검색의 상세 화면이 구현되어 있지 않습니다.

What is the new behavior (if this is a feature change)?

곡을 이용한 노트 검색의 상세 화면을 추가합니다.
기능 연동은 로그인/회원가입 연동 이후 진행합니다.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

노트 카테고리를 표현하는 Enum을 추가합니다.

ScreenShots (If needed)

노트 검색 화면이 추가된 이후 스크린샷을 촬영하겠습니다.

Other information:

#32 병합 이후 라우팅 연결을 진행하고 Draft를 해제하겠습니다.

Summary by CodeRabbit

  • New Features

    • Note search results UI with topic filters (All, Interpretation, Free, Question)
    • Pagination with prefetching and next-page loading
    • Collapsible header, sticky/pinned filter row, and song summary card
    • Localized labels for note topics
  • Documentation

    • Added interactive commit-suggestion and staged-commit workflow guides

@gdaegeun539 gdaegeun539 self-assigned this Apr 13, 2026
@gdaegeun539 gdaegeun539 added the design 디자인 관련 수정 label Apr 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

📝 Walkthrough

Walkthrough

Adds a new note search results feature: a NoteTopic enum and label extension, view state/data classes, a ViewModel with topic filtering and paginated loading, a Jetpack Compose screen with collapsible header and prefetch pagination, plus related documentation updates.

Changes

Cohort / File(s) Summary
Domain Model
app/src/main/java/com/lyrics/feelin/core/domain/enum/NoteTopic.kt
Adds NoteTopic enum (ALL, INTERPRETATION, FREE, QUESTION).
Presentation Utilities
app/src/main/java/com/lyrics/feelin/presentation/util/NoteTopicLabelExtension.kt
Adds val NoteTopic.label: String extension mapping topics to Korean labels.
View State & Models
app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewState.kt
Introduces NoteSearchResultStatus, NoteSearchResultSongSummary, and NoteSearchResultViewState with pagination fields and initial() factory.
ViewModel (logic & pagination)
app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewModel.kt
Adds NoteSearchResultViewModel implementing initial load, topic selection, page loading, dummy-data filtering, cursor-based pagination, and loading-state management.
UI Composable
app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSerachResultScreen.kt
Adds NoteSearchResultScreen Compose UI with expandable/collapsible header, pinned filter row behavior, prefetch-triggered loadNextPage(), conditional loading/empty/error states, and related composables.
Docs / Workflows
.agent/workflows/commit.md, .opencode/command/commit.md, .opencode/command/suggest_commit.md
Updates commit workflow docs to require staged-only commits; adds interactive commit suggestion and commit workflow docs that analyze staged diffs and propose messages.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Screen as NoteSearchResultScreen
    participant VM as NoteSearchResultViewModel
    participant State as ViewState

    User->>Screen: open screen
    Screen->>VM: init / request loadInitial()
    VM->>State: set status = LOADING, clear notes
    VM->>VM: simulate delay -> filter dummy notes by selectedNoteTopic
    VM->>State: set status = SUCCESS/EMPTY, notes = first page, nextCursor
    State-->>Screen: viewState updated
    Screen->>Screen: render header, filter, list

    User->>Screen: select topic
    Screen->>VM: selectTopic(topic)
    VM->>VM: update selectedNoteTopic -> loadInitial()

    User->>Screen: scroll near end
    Screen->>VM: trigger loadNextPage()
    VM->>VM: set isNextPageLoading, simulate delay, append next page, update nextCursor
    VM->>State: update notes and loading flag
    State-->>Screen: viewState updated
    Screen->>Screen: append new items
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped into code, a curious sight,

Filters set, pagination light,
Headers collapse with a gentle spring,
Notes arrive — hooray! I sing! 🎶

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'SCRUM-267 design: add search result screen' directly corresponds to the main feature added: a new Jetpack Compose search result screen for notes with filtering by topic, header collapsing, and pagination—all core deliverables of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
app/src/main/java/com/lyrics/feelin/presentation/util/NoteTopicLabelExtension.kt (1)

5-10: Move these labels to string resources.

Hardcoded Korean copy here makes localization and copy changes require code edits. A safer shape is mapping NoteTopic to @StringRes and resolving the text in the UI layer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/main/java/com/lyrics/feelin/presentation/util/NoteTopicLabelExtension.kt`
around lines 5 - 10, Replace the hardcoded Korean strings in the NoteTopic.label
extension with resource IDs: change the extension on NoteTopic (NoteTopic.label)
to return an `@StringRes` Int and map each enum case (NoteTopic.ALL,
INTERPRETATION, FREE, QUESTION) to R.string identifiers (e.g.,
R.string.note_topic_all, etc.), then update call sites in the UI layer to
resolve the text with context.getString(noteTopic.label) or view.getString(...);
ensure string entries are added to strings.xml for each label and adjust
imports/annotations to use androidx.annotation.StringRes where appropriate.
app/src/main/java/com/lyrics/feelin/core/domain/enum/NoteTopic.kt (1)

3-7: Keep ALL out of the domain enum.

NoteTopic lives under core.domain, but ALL is a UI filter, not an actual note category. Keeping it here makes later API or persistence mappings easy to misuse once this enum is reused outside the screen. A separate presentation-layer filter type would keep the boundary cleaner.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/lyrics/feelin/core/domain/enum/NoteTopic.kt` around
lines 3 - 7, Remove the UI-only value ALL from the domain enum NoteTopic and
keep NoteTopic limited to actual categories (INTERPRETATION, FREE, QUESTION);
introduce a separate presentation-layer filter type (e.g., NoteTopicFilter or
PresentationNoteTopic) in the UI/presentation module that includes ALL and any
other UI-only options, and add explicit mapping code between the new
presentation filter and the domain NoteTopic where the UI interacts with the
domain (update callers that relied on NoteTopic.ALL to use the new filter and
convert to nullable/Optional or explicit domain values before passing into
domain/persistence code).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewModel.kt`:
- Around line 27-33: When switching to the LOADING state in
NoteSearchResultViewModel, also reset the previous total note count so
ExpandedSearchHeader doesn't show the old count for the new query; update the
_viewState.value.copy call that sets status = NoteSearchResultStatus.LOADING to
include totalNoteCount = null (or 0 if your UI expects an int) alongside notes =
emptyList(), nextCursor = null, isNextPageLoading = false, and errorMessage =
null.

In
`@app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewState.kt`:
- Around line 30-44: The initial() companion factory for
NoteSearchResultViewState currently hardcodes a NoteSearchResultSongSummary (시퍼런
봄 / 쏜애플); change the factory to accept the selected song (e.g., a
NoteSearchResultSongSummary? or required param) instead of embedding a concrete
song, remove the hardcoded NoteSearchResultSongSummary from
NoteSearchResultViewState.initial, and update callers (such as
NoteSearchResultViewModel construction) to pass the actual selected song into
the new factory so viewState.songSummary reflects the real selection at startup.

In
`@app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSerachResultScreen.kt`:
- Around line 130-133: The NoteSearchResultScreen currently hardcodes an inert
back action; add a parameter onBackClick: () -> Unit = {} to the
NoteSearchResultScreen signature and pass it into the app bar/back-action
composable so the screen API exposes navigation to callers (also update the
other NoteSearchResultScreen declaration/usage that mirrors this
implementation). Locate the NoteSearchResultScreen function and any duplicate
definitions/usages, add the onBackClick parameter, and forward it to the app
bar's onBackClick handler so callers can supply navigation behavior.

---

Nitpick comments:
In `@app/src/main/java/com/lyrics/feelin/core/domain/enum/NoteTopic.kt`:
- Around line 3-7: Remove the UI-only value ALL from the domain enum NoteTopic
and keep NoteTopic limited to actual categories (INTERPRETATION, FREE,
QUESTION); introduce a separate presentation-layer filter type (e.g.,
NoteTopicFilter or PresentationNoteTopic) in the UI/presentation module that
includes ALL and any other UI-only options, and add explicit mapping code
between the new presentation filter and the domain NoteTopic where the UI
interacts with the domain (update callers that relied on NoteTopic.ALL to use
the new filter and convert to nullable/Optional or explicit domain values before
passing into domain/persistence code).

In
`@app/src/main/java/com/lyrics/feelin/presentation/util/NoteTopicLabelExtension.kt`:
- Around line 5-10: Replace the hardcoded Korean strings in the NoteTopic.label
extension with resource IDs: change the extension on NoteTopic (NoteTopic.label)
to return an `@StringRes` Int and map each enum case (NoteTopic.ALL,
INTERPRETATION, FREE, QUESTION) to R.string identifiers (e.g.,
R.string.note_topic_all, etc.), then update call sites in the UI layer to
resolve the text with context.getString(noteTopic.label) or view.getString(...);
ensure string entries are added to strings.xml for each label and adjust
imports/annotations to use androidx.annotation.StringRes where appropriate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 86c0ce97-9065-40a4-ac4f-978a4f02d145

📥 Commits

Reviewing files that changed from the base of the PR and between ef72f7c and 0745cec.

📒 Files selected for processing (5)
  • app/src/main/java/com/lyrics/feelin/core/domain/enum/NoteTopic.kt
  • app/src/main/java/com/lyrics/feelin/presentation/util/NoteTopicLabelExtension.kt
  • app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewModel.kt
  • app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewState.kt
  • app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSerachResultScreen.kt

gdaegeun539 and others added 2 commits April 14, 2026 22:10
Update commit command and workflow documents to use the
repository's English-only `type: Subject` format and
staged-only flow with explicit confirmation before commit.
Reset the note count when a new search result load starts so the
header does not briefly show the previous topic's total.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
.opencode/command/suggest_commit.md (1)

1-132: Consider refactoring shared content with commit.md.

Steps 1–4 (lines 9–122) are nearly identical between suggest_commit.md and commit.md. This duplication makes maintenance harder and increases the risk of inconsistencies when rules are updated.

Consider extracting the shared workflow steps into a common reference document (e.g., .agent/rules/commit-message-generation.md) and having both command files reference it, leaving only the execution/presentation differences in each file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/command/suggest_commit.md around lines 1 - 132, The sections in
suggest_commit.md and commit.md are duplicated; extract the shared Steps 1–4
content into a new shared reference file named commit-message-generation.md and
replace the duplicated blocks in both suggest_commit.md and commit.md with a
short include/reference line pointing to commit-message-generation.md, leaving
only the command-specific differences (presentation/execution rules) in each
original file; update any internal references in suggest_commit.md (e.g., "Step
1: Gather Context", "Step 2: Analyze Changes", "Step 3: Generate Commit
Message", "Step 4: Present Options") to use the shared document so future edits
are made in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.opencode/command/commit.md:
- Around line 98-122: In the "Suggested Commits" section update the three fenced
code blocks (Option 1 (recommended), Option 2 (minimal), Option 3 (detailed)) to
include a language specifier (e.g., text) after the opening triple-backticks so
markdownlint warnings are resolved; locate the blocks by their headings and
replace ``` with ```text for the examples under those three options.
- Around line 58-91: The commit guideline is missing the capitalization rule:
add a short bullet to the commit message rules (e.g., under "1. 커밋 메시지는 영문으로 쓴다"
or near the title rules) stating that "The first letter of the subject (after
the `type:` prefix) must be capitalized," mirroring the rule in the referenced
standard; ensure the wording is concise and consistent with existing bullets and
update any nearby examples or notes if present to reflect this capitalization
requirement.

In @.opencode/command/suggest_commit.md:
- Around line 98-122: The three fenced commit-message blocks under the headings
"Option 1 (recommended)", "Option 2 (minimal)", and "Option 3 (detailed)" are
missing language specifiers and trigger markdownlint warnings; fix by adding a
language tag (e.g., text) to each opening triple-backtick so the blocks become
```text, ensuring all three commit examples include the language specifier.
- Around line 57-92: Add the missing capitalization rule into the "Core rules"
section (near "1. 커밋 메시지는 영문으로 쓴다") by stating that the first letter of the
subject (the first character after the "type: " prefix, e.g., in "feat: Add
feature") must be capitalized; update the numbered list to include this rule and
mirror the wording from the referenced git-commit-rules.md standard so readers
know to use "feat: Add ..." not "feat: add ...".

---

Nitpick comments:
In @.opencode/command/suggest_commit.md:
- Around line 1-132: The sections in suggest_commit.md and commit.md are
duplicated; extract the shared Steps 1–4 content into a new shared reference
file named commit-message-generation.md and replace the duplicated blocks in
both suggest_commit.md and commit.md with a short include/reference line
pointing to commit-message-generation.md, leaving only the command-specific
differences (presentation/execution rules) in each original file; update any
internal references in suggest_commit.md (e.g., "Step 1: Gather Context", "Step
2: Analyze Changes", "Step 3: Generate Commit Message", "Step 4: Present
Options") to use the shared document so future edits are made in one place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b0c9002-7e78-4970-ab2e-3fc913928d53

📥 Commits

Reviewing files that changed from the base of the PR and between 0745cec and cf2cc71.

📒 Files selected for processing (4)
  • .agent/workflows/commit.md
  • .opencode/command/commit.md
  • .opencode/command/suggest_commit.md
  • app/src/main/java/com/lyrics/feelin/presentation/view/note/search/result/NoteSearchResultViewModel.kt
✅ Files skipped from review due to trivial changes (1)
  • .agent/workflows/commit.md

Comment thread .opencode/command/commit.md
Comment thread .opencode/command/commit.md
Comment thread .opencode/command/suggest_commit.md
Comment thread .opencode/command/suggest_commit.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design 디자인 관련 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant