Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 2, 2025

Implements import of links from text files with a preview screen allowing users to review and select links before importing.

Changes

TextFileImporter

  • Parses comma-separated or newline-separated links from text files
  • Intelligently detects format (>50% threshold) to avoid splitting URLs with commas in query parameters
  • Provides parseForPreview() for validation and importSelected() for batch import
  • Validates links via isValidDeeplink() and checks for duplicates against existing database entries

ImportPreviewScreen

  • Displays parsed links with checkboxes, validation status, and duplicate indicators
  • Pre-selects valid non-duplicate links by default
  • Includes Select All/Deselect All actions
  • Visual indicators: error border for invalid links, tertiary border for duplicates

Integration

  • Added to ImportRepositoryImpl available importers
  • Special handling in RestoreScreen routes to preview flow (vs direct import for other formats)
  • Navigation entry in MainActivity for ImportPreviewScreen
  • Koin DI registration for TextFileImporter

Example Usage

Comma-separated:

https://github.com, https://google.com, https://stackoverflow.com

Newline-separated:

https://github.com
https://google.com
https://stackoverflow.com

URLs with query params (correctly handled as newline-separated):

https://example.com?tags=a,b,c
https://google.com?items=x,y,z

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>Import Links from text file</issue_title>
<issue_description>Import links from text file, find valid links from text file and show a list with checkbox to review the links which they want to import and on import button import all the links for which the checkbox is enabled, by default all checkbox will be enabled.

The text file can be comma seperated links as well as line break links.</issue_description>

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Import links from text file with review option Add text file link import with preview and selection Nov 2, 2025
Copilot AI requested a review from yogeshpaliyal November 2, 2025 17:08
Copilot finished work on behalf of yogeshpaliyal November 2, 2025 17:08
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.

Import Links from text file

2 participants