Skip to content

Remove total count from search - #48

Merged
yamcodes merged 5 commits into
mainfrom
45-show-total-contact-count-in-search-placeholder
Mar 21, 2026
Merged

Remove total count from search#48
yamcodes merged 5 commits into
mainfrom
45-show-total-contact-count-in-search-placeholder

Conversation

@yamcodes

@yamcodes yamcodes commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • Removals

    • Removed the /contacts/count endpoint.
  • Changes

    • Search functionality now updates the browser URL when navigating results.
    • Simplified search placeholder text.
  • Refactor

    • Updated Alpine.js directive syntax throughout templates.

@yamcodes yamcodes linked an issue Mar 21, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4af2876b-03d7-48e2-98b7-6f29b73e68c7

📥 Commits

Reviewing files that changed from the base of the PR and between dc310aa and 653cace.

📒 Files selected for processing (4)
  • src/main/java/codes/yam/contacts/ContactController.java
  • src/main/java/codes/yam/contacts/ContactService.java
  • src/main/resources/templates/contacts/index.html
  • src/main/resources/templates/layout.html
💤 Files with no reviewable changes (2)
  • src/main/java/codes/yam/contacts/ContactController.java
  • src/main/java/codes/yam/contacts/ContactService.java

📝 Walkthrough

Walkthrough

Removed the count() endpoint from ContactController and the corresponding method from ContactService. Updated Alpine.js directive syntax from x-bind: to shorthand : notation across template files. Removed dynamic placeholder text based on total elements, replaced with static text, and added URL replacement to HTMX search requests.

Changes

Cohort / File(s) Summary
Count Functionality Removal
src/main/java/codes/yam/contacts/ContactController.java, src/main/java/codes/yam/contacts/ContactService.java
Removed count() method from controller's GET /contacts/count endpoint and corresponding service method, eliminating public ability to retrieve total contact record count.
Template Syntax and Layout Updates
src/main/resources/templates/contacts/index.html, src/main/resources/templates/layout.html
Converted Alpine.js binding directives from verbose x-bind: to shorthand : syntax. Removed dynamic th:placeholder dependent on contactPage.totalElements and replaced with static placeholder text. Added hx-replace-url="true" to HTMX search requests for URL history management.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 The count hops away with the dawn,
Alpine syntax carries on.
Whispers grow shorter, cleaner, lean,
Templates brightest ever seen! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title refers to removing count functionality, which is only partially accurate. The PR removes the total count endpoint and method, but the main changes also include Alpine.js shorthand syntax updates and search placeholder simplification. Consider a more comprehensive title like 'Remove count endpoint and simplify search placeholder' or clarify if count removal is truly the primary focus.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 45-show-total-contact-count-in-search-placeholder

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.

@yamcodes yamcodes changed the title 45 show total contact count in search placeholder Remove total count from search Mar 21, 2026
@yamcodes
yamcodes marked this pull request as ready for review March 21, 2026 17:51
@yamcodes
yamcodes merged commit c5cb112 into main Mar 21, 2026
4 checks passed
@yamcodes
yamcodes deleted the 45-show-total-contact-count-in-search-placeholder branch March 21, 2026 17:54
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.

Show total contact count in search placeholder

1 participant