Skip to content

opt.: include core repos via submodules#1046

Merged
lollipopkit merged 4 commits intomainfrom
codex/issue-1007-direct-include
Feb 6, 2026
Merged

opt.: include core repos via submodules#1046
lollipopkit merged 4 commits intomainfrom
codex/issue-1007-direct-include

Conversation

@lollipopkit
Copy link
Owner

@lollipopkit lollipopkit commented Feb 6, 2026

Summary

  • add direct Git submodule inclusion for dartssh2, xterm, fl_lib, fl_build, and server_box_monitor
  • switch app dependencies to local path dependencies for dartssh2, xterm, fl_lib, and dev dependency fl_build
  • keep submodules tracking upstream default branches via .gitmodules (main/master)
  • refresh lockfile to path sources

Why

  • addresses issue request to include these repos directly instead of consuming them via pub git refs

Validation

  • flutter test
  • flutter analyze lib test

Closes #1007

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow to improve code analysis processes
    • Restructured dependency management by converting remote package references to local package paths
    • Updated included package versions

@gemini-code-assist
Copy link

Summary of Changes

Hello @lollipopkit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors how several core dependencies are managed within the project. Instead of relying on direct Git references for these packages, they are now included as Git submodules. This change aims to provide a more integrated and potentially more stable development environment by allowing local modifications and consistent versioning of these internal dependencies.

Highlights

  • Git Submodule Integration: Five core repositories (dartssh2, xterm, fl_lib, fl_build, and server_box_monitor) have been integrated as Git submodules, tracking their respective upstream default branches (master/main).
  • Dependency Management Shift: The project's dependencies on these repositories have been switched from direct Git references in pubspec.yaml to local path dependencies, pointing to the newly added submodule directories.
  • Lockfile Update: The pubspec.lock file has been refreshed to reflect the change in dependency resolution, now sourcing these packages from local paths rather than Git URLs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .gitmodules
    • Added a new file to define five Git submodules: dartssh2, xterm, fl_lib, fl_build, and server_box_monitor. Each submodule is configured with its path, URL, and branch.
  • dartssh2
    • Added as a Git submodule directory, pointing to a specific commit of the dartssh2 repository.
  • fl_build
    • Added as a Git submodule directory, pointing to a specific commit of the fl_build repository.
  • fl_lib
    • Added as a Git submodule directory, pointing to a specific commit of the fl_lib repository.
  • pubspec.lock
    • Modified the dependency entries for dartssh2, fl_build, fl_lib, and xterm to change their source from git to path, referencing their respective local submodule directories.
  • pubspec.yaml
    • Updated the dependency declarations for dartssh2, xterm, fl_lib, and fl_build from git blocks (specifying URL and ref) to path references, pointing to the new submodule locations.
  • server_box_monitor
    • Added as a Git submodule directory, pointing to a specific commit of the server_box_monitor repository.
  • xterm
    • Added as a Git submodule directory, pointing to a specific commit of the xterm.dart repository.
Activity
  • No specific activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request migrates external package dependencies to git submodules. The changes introduce five git submodules (dartssh2, xterm, fl_lib, fl_build, and server_box_monitor) by creating a new .gitmodules configuration file, updating pubspec.yaml to reference these packages via local paths instead of git URLs, adding submodule commit references, and updating the CI workflow to fetch submodules recursively with the analysis command switched from Dart to Flutter analyzer.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'opt.: include core repos via submodules' accurately and concisely summarizes the main change of converting dependencies to git submodules.
Linked Issues check ✅ Passed All coding requirements from issue #1007 are met: five repositories (xterm, dartssh2, fl_lib, fl_build, server_box_monitor) are now included as git submodules with local path dependencies configured.
Out of Scope Changes check ✅ Passed All changes are scope-aligned: workflow updates to support submodules, .gitmodules configuration, pubspec.yaml dependency changes, and submodule commit references directly support the core objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/issue-1007-direct-include

🧹 Recent nitpick comments
pubspec.yaml (1)

65-75: Consider removing the now-stale commented-out overrides.

These commented-out dependency_overrides point to sibling directories (../dartssh2, ../xterm, etc.) for local development. Now that these packages live under packages/ as submodules and are already referenced as path dependencies, these overrides are no longer useful and may confuse future contributors.

🧹 Suggested cleanup
 dependency_overrides:
-  # webdav_client_plus:
-  #   path: ../webdav_client
-  # dartssh2:
-  #   path: ../dartssh2
-  # xterm:
-  #   path: ../xterm.dart
-  # fl_lib:
-  #   path: ../fl_lib
-  # fl_build:
-  #   path: ../fl_build
📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b06f50 and aacda6c.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .gitmodules
  • packages/dartssh2
  • packages/fl_build
  • packages/fl_lib
  • packages/server_box_monitor
  • packages/xterm
  • pubspec.yaml
✅ Files skipped from review due to trivial changes (5)
  • packages/server_box_monitor
  • packages/fl_lib
  • packages/xterm
  • packages/dartssh2
  • packages/fl_build
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitmodules
🧰 Additional context used
📓 Path-based instructions (1)
pubspec.yaml

📄 CodeRabbit inference engine (CLAUDE.md)

Use hive_ce instead of hive for Hive integration

Files:

  • pubspec.yaml
🧠 Learnings (7)
📓 Common learnings
Learnt from: GT-610
Repo: lollipopkit/flutter_server_box PR: 0
File: :0-0
Timestamp: 2026-01-22T05:10:54.502Z
Learning: For all future pull requests in the flutter_server_box repository, check if participants from issues resolved by the PR are added to the `participants` field in `lib/data/res/github_id.dart`. If any participants are missing, propose adding them. First verify if they already exist or have been added in the PR commits.
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to lib/generated/**/*.dart : Do not manually edit files in lib/generated (localization output)

Applied to files:

  • pubspec.yaml
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to **/*.{g,freezed}.dart : Do not manually edit generated Dart files (*.g.dart, *.freezed.dart)

Applied to files:

  • pubspec.yaml
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to lib/data/model/ssh/**/*.dart : Place SSH models under lib/data/model/ssh/

Applied to files:

  • pubspec.yaml
📚 Learning: 2026-01-17T04:24:16.501Z
Learnt from: GT-610
Repo: lollipopkit/flutter_server_box PR: 0
File: :0-0
Timestamp: 2026-01-17T04:24:16.501Z
Learning: In lib/core/extension/ssh_client.dart and lib/data/provider/container.dart, when executing Docker/Podman commands via SSH, stderr must be included in the output (not set to stderr: false) because the error detection logic relies on stderr messages like "command not found" to properly detect when Docker/Podman is not installed and display appropriate error prompts to users.

Applied to files:

  • pubspec.yaml
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Use Riverpod with code generation (riverpod_annotation) for state management

Applied to files:

  • pubspec.yaml
📚 Learning: 2025-10-08T09:36:41.682Z
Learnt from: CR
Repo: lollipopkit/flutter_server_box PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-08T09:36:41.682Z
Learning: Applies to lib/data/provider/**/*.dart : Organize Riverpod providers by feature under lib/data/provider/

Applied to files:

  • pubspec.yaml
🔇 Additional comments (1)
pubspec.yaml (1)

42-43: LGTM — local path dependencies correctly reference submodule locations.

All four dependencies (dartssh2, xterm, fl_lib, fl_build) are properly switched from git refs to local packages/ paths matching the new submodule layout. This aligns with the PR objective of simplifying local development via submodules.

Also applies to: 48-49, 62-63, 97-98

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request switches several dependencies from being consumed as pub git references to being included as Git submodules. This is done to include the repositories directly, as requested in an issue. The changes involve adding a .gitmodules file to define the submodules, updating pubspec.yaml to use local path dependencies, and refreshing pubspec.lock accordingly. My review focuses on the configuration of the new submodules. I have one suggestion regarding the submodule configuration to improve build reproducibility.

Comment on lines 1 to 20
[submodule "dartssh2"]
path = dartssh2
url = https://github.com/lollipopkit/dartssh2
branch = master
[submodule "xterm"]
path = xterm
url = https://github.com/lollipopkit/xterm.dart
branch = master
[submodule "fl_lib"]
path = fl_lib
url = https://github.com/lollipopkit/fl_lib
branch = main
[submodule "fl_build"]
path = fl_build
url = https://github.com/lppcg/fl_build.git
branch = main
[submodule "server_box_monitor"]
path = server_box_monitor
url = https://github.com/lollipopkit/server_box_monitor
branch = main

Choose a reason for hiding this comment

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

medium

Using the branch property for submodules can lead to non-reproducible builds. When a developer runs git submodule update --remote, they will pull the latest commit from the tracked branch, which may differ from the commit other developers or the CI system are using. This can cause inconsistencies and "it works on my machine" issues.

For better stability and reproducibility, it's recommended to pin submodules to specific commits by omitting the branch property. Updates then become a deliberate action: a developer manually checks out a specific commit or tag within the submodule and then commits the new submodule hash to the parent repository. This ensures everyone is using the exact same version of the dependency.

Consider removing the branch properties to enforce this safer workflow.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Keeping branch in .gitmodules is intentional for this issue (#1007), which explicitly requests keeping these direct-included repos on latest upstream origin/main/origin/master. We still keep reproducibility via committed submodule SHA in the parent repo; branch here is only to define the target branch for explicit git submodule update --remote updates.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

🐛 1 issue in files not directly in the diff

🐛 Analysis CI workflow missing submodule checkout will fail on flutter pub get (.github/workflows/analysis.yml:19-21)

The analysis workflow will fail because it does not checkout submodules, but the project now depends on local path dependencies (dartssh2, xterm, fl_lib, fl_build) that require the submodules to be initialized.

Root Cause

The pubspec.yaml now uses path dependencies:

dartssh2:
  path: dartssh2
xterm:
  path: xterm
fl_lib:
  path: fl_lib
fl_build:
  path: fl_build

However, .github/workflows/analysis.yml:19-21 only has:

- uses: actions/checkout@v6
  with:
    fetch-depth: 1

Without submodules: recursive, the submodule directories will be empty, causing flutter pub get at line 28 to fail with errors like "Could not find package dartssh2 at path dartssh2".

In contrast, .github/workflows/release.yml correctly specifies submodules: recursive in all its checkout steps (lines 23-24, 72-73, 111-112, 141-142, 172-173).

Impact: All PR checks and pushes to main will fail the analysis workflow, breaking CI.

View 3 additional findings in Devin Review.

Open in Devin Review

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 6, 2026
@lollipopkit lollipopkit merged commit a2922f9 into main Feb 6, 2026
2 checks passed
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.

opt.: use git submodule

1 participant