Skip to content

Add cleanup scripts to remove unwanted apps in the apps directory #1082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

IAmABear
Copy link
Contributor

@IAmABear IAmABear commented Jul 3, 2025

Context

Removes all directories in the apps directory with web- and/or vscode-nightly in their name. This can easily be adjusted to remove any future directories that are pulled in from roo-code that are redundant.

This is mostly done to remove redundant files that have no impact on kilocode.

Implementation

Run a bash scripts that scans in the apps/ directory and does a name match to see what he finds. Gives a prompt with the results for a user to confirm before removing the files.

How to Test

Run the scripts in using bash:

bash scripts/kilocode/roomerge_04_apps_cleanup.sh

Check the output which should consist out of the following with the default search patterns:

/apps/web-docs
/apps/web-evals
/apps/web-roo-code
/apps/vscode-nightly

Currently removes all directories with "web-" and/or "vscode-nightly"
in their name. This can easily be asjusted to remove any future
directories that are pulled in from roo-code that are redundant.

This is mostly done to remove redundant files that have no impact
on kilocode.
Copy link

changeset-bot bot commented Jul 3, 2025

⚠️ No Changeset found

Latest commit: d6e69aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kevinvandijk kevinvandijk requested a review from Copilot July 3, 2025 21:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new Bash script to clean up unwanted application directories under apps/ based on configurable name patterns, with an interactive confirmation step before deletion.

  • Introduces roomerge_04_apps_cleanup.sh under scripts/kilocode
  • Configurable SEARCH_PATTERNS and uses find to locate matching dirs
  • Prompts the user for confirmation and removes each directory


echo "Searching for directories matching patterns: $SEARCH_PATTERNS in $APP_DIR..."

MATCHING_DIRS=""
Copy link
Preview

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a Bash array to collect matching directories instead of building a newline-delimited string. Arrays handle spaces robustly and simplify iteration, e.g. MATCHING_DIRS=(); MATCHING_DIRS+=("$dir"); for dir in "${MATCHING_DIRS[@]}"; do ....

Copilot uses AI. Check for mistakes.

APP_DIR="$PROJECT_ROOT/apps"

if [ ! -d "$APP_DIR" ]; then
echo "Error: Directory $APP_DIR does not exist"
Copy link
Preview

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redirect error messages to stderr for clarity, e.g. echo "Error: Directory $APP_DIR does not exist" >&2.

Suggested change
echo "Error: Directory $APP_DIR does not exist"
echo "Error: Directory $APP_DIR does not exist" >&2

Copilot uses AI. Check for mistakes.

@@ -0,0 +1,68 @@
#!/bin/bash
Copy link
Preview

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per Kilocode Change Marking Guidelines, new files must include a // kilocode_change - new file comment at the top. Please add this annotation above the shebang.

Copilot uses AI. Check for mistakes.

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.

1 participant