Skip to content

Add comprehensive GitHub Copilot instructions for FloatingX development#234

Merged
Petterpx merged 3 commits intomainfrom
copilot/fix-233
Aug 27, 2025
Merged

Add comprehensive GitHub Copilot instructions for FloatingX development#234
Petterpx merged 3 commits intomainfrom
copilot/fix-233

Conversation

Copy link
Contributor

Copilot AI commented Aug 27, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides GitHub Copilot coding agents with detailed instructions for working effectively in the FloatingX codebase.

What's Included

The instructions provide a complete developer onboarding guide covering:

Build & Test Procedures

  • Step-by-step build commands with proper timeout values (15+ minutes for full builds)
  • Test execution procedures for unit tests and instrumented tests
  • Critical "NEVER CANCEL" warnings for long-running operations
  • Library publication workflow for local development

Manual Validation Requirements

  • Comprehensive floating window testing scenarios (system, app-level, local scope)
  • Specific UI testing procedures for different floating window types
  • Permission handling validation (SYSTEM_ALERT_WINDOW)
  • Compose integration testing steps
  • Edge case testing (immersive mode, RecyclerView, blacklist functionality)

Project Navigation

  • Detailed module breakdown (app, floatingx, floatingx_compose)
  • Key file locations and their purposes
  • API entry points and usage patterns
  • Demo application structure and test scenarios

Development Workflow

  • Prerequisites (Java 17, Android SDK, network requirements)
  • Code quality checks (lint, detekt)
  • Debugging commands and troubleshooting guide
  • ADB commands for device testing

Key Features

  • Imperative tone throughout with clear "Do this", "Never do that" directives
  • Explicit timeout values with 50% safety buffers for all build operations
  • Real validation scenarios that require actual floating window interaction
  • Comprehensive troubleshooting section for common issues
  • Network dependency documentation for environments with restricted access

The instructions start with a firm directive to always follow the provided information first, only falling back to additional search when the instructions are incomplete or incorrect.

Example usage pattern documented:

// System floating window (requires permission)
FloatingX.install {
    setContext(context)
    setLayout(R.layout.item_floating)
    setScopeType(FxScopeType.SYSTEM_AUTO)
}.show()

// Local floating window (scoped to Activity)
private val activityFx by createFx {
    setLayout(R.layout.item_floating)
    setEnableLog(true, "activityFx")
    build().toControl(this@MainActivity)
}

This enables GitHub Copilot agents to work efficiently in the FloatingX codebase without extensive exploration or trial-and-error.

Fixes #233.

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.14.3-all/8fdzzxam9lo77uruaibtsldo0/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-all/8fdzzxam9lo77uruaibtsldo0/gradle-8.14.3/lib/agents/gradle-instrumentation-agent-8.14.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.3 (dns block)
    • Triggering command: curl -I REDACTED (dns block)
  • jitpack.io
    • 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.14.3-all/8fdzzxam9lo77uruaibtsldo0/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-all/8fdzzxam9lo77uruaibtsldo0/gradle-8.14.3/lib/agents/gradle-instrumentation-agent-8.14.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.3 (dns block)

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 27, 2025 01:09
Co-authored-by: Petterpx <41142188+Petterpx@users.noreply.github.com>
Co-authored-by: Petterpx <41142188+Petterpx@users.noreply.github.com>
@Petterpx Petterpx marked this pull request as ready for review August 27, 2025 01:15
@Petterpx Petterpx merged commit 18fcd68 into main Aug 27, 2025
1 check passed
@Petterpx Petterpx deleted the copilot/fix-233 branch August 27, 2025 01:15
Copilot AI restored the copilot/fix-233 branch August 27, 2025 01:15
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for FloatingX development Aug 27, 2025
Copilot AI requested a review from Petterpx August 27, 2025 01:15
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.

✨ Set up Copilot instructions

2 participants