Skip to content

Conversation

@ChuckBuilds
Copy link
Owner

@ChuckBuilds ChuckBuilds commented Jan 18, 2026

  • Updated LEDMatrix.code-workspace to include all plugin repos as root folders
  • Removed symlinks from plugin-repos/ and plugins/ directories
  • Updated .gitignore to reflect new plugin management approach
  • Added setup_plugin_repos.py script for managing plugin symlinks (if needed)
  • Added MULTI_ROOT_WORKSPACE_SETUP.md documentation

Plugins are now managed as independent repositories via multi-root workspace, allowing for easier development and independent updates without modifying the LEDMatrix project structure.

Summary by CodeRabbit

  • Documentation

    • Added a guide for multi-root workspace setup, plugin organization, and developer workflows.
  • New Features

    • Editor workspace expanded to a multi-root layout to manage plugins as separate projects.
    • New automation script to create/manage local plugin repository links for development.
  • Chores

    • Simplified ignore rules so individual plugin directories are no longer explicitly whitelisted; obsolete submodule pointers removed from repository metadata.

✏️ Tip: You can customize this high-level summary in your review settings.

- Updated LEDMatrix.code-workspace to include all plugin repos as root folders
- Removed symlinks from plugin-repos/ and plugins/ directories
- Updated .gitignore to reflect new plugin management approach
- Added setup_plugin_repos.py script for managing plugin symlinks (if needed)
- Added MULTI_ROOT_WORKSPACE_SETUP.md documentation

Plugins are now managed as independent repositories via multi-root workspace,
allowing for easier development and independent updates without modifying
the LEDMatrix project structure.
@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

This PR replaces per-plugin git submodule pointers with a multi-root VS Code workspace and adds tooling/docs to manage plugins as separate repositories via symlinks; it also removes per-plugin .gitignore whitelist entries and adds a script to create symlinks into plugin-repos/.

Changes

Cohort / File(s) Summary
Workspace & Ignore
\.gitignore, LEDMatrix.code-workspace
Removed per-plugin whitelist exceptions from .gitignore; expanded LEDMatrix.code-workspace from single-root to multi-root with many plugin entries and added editor file-exclude settings.
Documentation
docs/MULTI_ROOT_WORKSPACE_SETUP.md
New guide describing multi-root workspace layout, symlink-based plugin discovery, setup/update steps, workflow, and troubleshooting.
Plugin submodule metadata
Plugins (cohort)
plugins/* (e.g., plugins/baseball-scoreboard, plugins/youtube-stats, plugins/ledmatrix-*, plugins/*-scoreboard, etc.)
Deleted single-line git submodule commit references across many plugins/* entries (removing gitlink metadata only). No source code or API changes.
Setup Automation
scripts/setup_plugin_repos.py
New script that parses the workspace, locates plugin repo paths (../...), validates sources under the GitHub directory, and creates relative symlinks in plugin-repos/, emitting created/skipped/error counts and exit status.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as "Developer"
  participant Workspace as "LEDMatrix.code-workspace"
  participant Script as "scripts/setup_plugin_repos.py"
  participant GitHub as "GitHub dir (../ledmatrix-*/)"
  participant FS as "Local FS (plugin-repos/)"

  Dev->>Workspace: open multi-root workspace
  Dev->>Script: run setup_plugin_repos.py
  Script->>Workspace: read folder entries (../...)
  Script->>GitHub: check existence of target repo paths
  alt repo exists
    Script->>FS: create relative symlink in plugin-repos/
    FS-->>Script: success
  else missing repo
    Script-->>Dev: log error (missing source)
  end
  Script-->>Dev: report created/skipped/errors and exit code
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Feature/one shot installer #178 — touches plugin submodule handling and .gitignore plugin whitelist entries; directly related to removing per-plugin gitlinks.
  • Fix plugins directory #149 — changes plugin discovery/location to a plugin-repos layout; closely related to the new setup script and workspace layout.
  • Feature/one shot installer #175 — reintroduces or adjusts per-plugin .gitignore exceptions and specific submodule entries (conflicts with this PR's removal of those entries).

Poem

🐰 I hop through symlinks, tidy and spry,

Plugins unplugged from submodule sky.
Multi-roots planted, neat little rows,
Symlinks sing where the codewind blows. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the primary change: migrating from Git submodules to a multi-root VSCode workspace for managing plugins. It directly corresponds to the main objectives and the majority of changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@docs/MULTI_ROOT_WORKSPACE_SETUP.md`:
- Around line 54-59: The docs show a deprecated command "python3
scripts/clone_plugin_repos.py" as an actionable step; remove that line or
replace it with the current recommended action so readers aren't confused. Edit
MULTI_ROOT_WORKSPACE_SETUP.md to delete the "python3
scripts/clone_plugin_repos.py  # Note: This script was removed, see below" entry
(or update it to reference the new script or explicit manual steps), and ensure
any surrounding text clarifies that the old script clone_plugin_repos.py is
removed and points to the correct alternative.
- Around line 16-29: The code fence containing the directory tree in
MULTI_ROOT_WORKSPACE_SETUP.md is missing a language tag (triggering MD040);
update the opening triple-backtick for the directory-tree block to include a
language identifier such as "text" (i.e., change ``` to ```text) so the block is
recognized as plain text—look for the directory-tree code fence showing
"/home/chuck/Github/" and modify its opening backticks accordingly.

In `@scripts/setup_plugin_repos.py`:
- Around line 22-30: In get_workspace_plugins(), wrap the json.load call in a
try/except that catches json.JSONDecodeError specifically (in addition to
existing file existence check) and handle it by printing or logging a clear,
user-friendly message and returning an empty list; ensure the exception handling
references the workspace variable/file and leaves other exceptions unmodified so
only parse errors are swallowed.
🧹 Nitpick comments (4)
docs/MULTI_ROOT_WORKSPACE_SETUP.md (2)

16-35: Use a placeholder path instead of a hard-coded /home/chuck/Github.
Consider $HOME/GitHub or <parent_dir> so the doc applies beyond a single machine.


112-117: Document the plugin pre-push hook setup.
Add a step to copy scripts/git-hooks/pre-push-plugin-version into each plugin repo’s .git/hooks/pre-push so version bumps stay consistent.

Based on learnings, consider adding this to the “Adding New Plugins” steps.

scripts/setup_plugin_repos.py (2)

75-106: Avoid broad Exception for filesystem operations.
Narrow to OSError (and optionally RuntimeError) so unexpected issues aren’t silently swallowed.

♻️ Suggested adjustment
-                except Exception as e:
+                except OSError as e:
                     print(f"  ⚠️  {plugin['name']} - error checking link: {e}")
-                    link_path.unlink()
+                    try:
+                        link_path.unlink()
+                    except OSError as unlink_err:
+                        print(f"  ⚠️  {plugin['name']} - failed to remove link: {unlink_err}")
+                        errors += 1
+                        continue
...
-        except Exception as e:
+        except OSError as e:
             print(f"  ✗  {plugin['name']} - failed to create link: {e}")
             errors += 1
As per coding guidelines, catch specific exceptions rather than broad `Exception`.

46-64: Consider structured logging and type hints for maintainability.
Replacing print with the logging module (with a [Plugin Setup] context) and adding return type hints would improve Pi troubleshooting and clarity.

As per coding guidelines, use structured logging with context and add type hints.

- Remove deprecated clone_plugin_repos.py command reference
- Add language tag to directory tree code fence (fixes MD040)
- Add JSONDecodeError handling in setup_plugin_repos.py with user-friendly error messages
@ChuckBuilds ChuckBuilds merged commit bff16d3 into main Jan 18, 2026
1 check passed
@ChuckBuilds ChuckBuilds deleted the refactor/multi-root-workspace-migration branch January 19, 2026 01:49
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.

2 participants