Skip to content

Add link counts to tag selection bottom sheet#163

Merged
yogeshpaliyal merged 4 commits intomasterfrom
copilot/add-tag-link-counts
Oct 9, 2025
Merged

Add link counts to tag selection bottom sheet#163
yogeshpaliyal merged 4 commits intomasterfrom
copilot/add-tag-link-counts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 9, 2025

Closes #[issue_number]

This PR implements the same feature as #118 but for tags - displaying the number of links associated with each tag in the tag selection bottom sheet.

Changes

Each tag in the tag selection bottom sheet now displays the count of links associated with it in the format TagName (count), for example:

  • Social (15)
  • Work (8)
  • Personal (3)

This follows the same pattern implemented in #118 where the search bar displays Search (14) to show the total number of links.

Implementation

The implementation adds:

  1. New SQL query (getAllTagsWithCount) that performs a LEFT JOIN between Tags and LinkTags tables to count links per tag
  2. ViewModel exposure of tags with counts via a new allTagsWithCount StateFlow
  3. UI updates to display the count alongside each tag name in the bottom sheet

All changes are minimal and follow existing code patterns in the repository. The GetAllTagsWithCount data class is auto-generated by SQLDelight from the new query.

Testing

The feature can be tested by:

  1. Creating several tags
  2. Assigning different numbers of links to each tag
  3. Opening the tag selection bottom sheet
  4. Verifying that each tag displays the correct count of associated links

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/agents/gradle-instrumentation-agent-8.13.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.13 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Do the same as #118 but for tags</issue_title>
<issue_description>#118</issue_description>

<agent_instructions>Add number of links have in each tag next to the tag name in tag bottom sheet like Social (15)</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #148

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Add link counts to tag bottom sheet Add link counts to tag selection bottom sheet Oct 9, 2025
Copilot AI requested a review from yogeshpaliyal October 9, 2025 05:26
@yogeshpaliyal yogeshpaliyal marked this pull request as ready for review October 9, 2025 05:38
@yogeshpaliyal yogeshpaliyal merged commit b783f2c into master Oct 9, 2025
1 check passed
@yogeshpaliyal yogeshpaliyal deleted the copilot/add-tag-link-counts branch October 9, 2025 05:47
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.

Do the same as #118 but for tags

2 participants