Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Sep 8, 2025

명소 실시간 혼잡도 정보 표시방법 변경

[기존] 현재시간 기준으로 이전 시간 표시 -> [변경] 현재시간 기준으로 앞,뒤 시간 표시하도록 변경

Summary by CodeRabbit

  • Bug Fixes
    • Corrected congestion time window calculation to center around the selected hour, improving accuracy and consistency of displayed congestion trends.
    • Fixed ordering of hourly congestion data, ensuring a more intuitive progression across hours.

@ggamnunq ggamnunq self-assigned this Sep 8, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updated hour-block generation in PlaceCongestionQueryService.getCongestion: replaced a descending loop of 7 three-hour blocks with a symmetric range from -3 to 3 centered on the base hour. Other logic, including adjustedDateTime calculation and congestion data retrieval, remains unchanged.

Changes

Cohort / File(s) Summary
Service hour-block logic
src/main/kotlin/busanVibe/busan/domain/place/service/PlaceCongestionQueryService.kt
Adjusted 3-hour block construction from iterating i=6..0 to using a symmetric range -3..3 around the base hour, changing the set and ordering of computed hours (mod 24). No public API changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant Service as PlaceCongestionQueryService
  participant Time as TimeUtils
  participant Repo as CongestionRepository

  Caller->>Service: getCongestion(placeId, baseDateTime)
  Service->>Time: Compute adjustedDateTime
  note right of Service: Generate hour blocks using range [-3..3]<br/>(3-hour intervals centered on base hour)
  Service->>Repo: Fetch congestion for computed hour blocks
  Repo-->>Service: Congestion data
  Service-->>Caller: Aggregated congestion result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through hours, seven in a ring,
From minus three to plus—what a swing!
Centered on time, my whiskers align,
Gathering vibes in a tidy design.
Thump-thump—blocks snapped neat and bright,
Busan’s pulse mapped just right. 🐇⌚️


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0aa1a8 and 6aab857.

📒 Files selected for processing (1)
  • src/main/kotlin/busanVibe/busan/domain/place/service/PlaceCongestionQueryService.kt (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ggamnunq ggamnunq merged commit e76ee65 into main Sep 8, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants