ADFA-3597: Move Layout Editor into a plugin #1471
Conversation
The Layout Editor now ships as a .cgp plugin, so the host must not also bundle the layouteditor module — otherwise its classes shadow the plugin's via the parent-first plugin classloader (caused a NoSuchMethodError on the plugin's converted FileCreator). Removing it is also where the APK/build savings come from. - Delete PreviewLayoutAction (it only launched the XML layout editor now that stage moved Compose preview elsewhere) + its registration in EditorActivityActions. - Decouple the recent-projects UI from layouteditor's ProjectFile: add a lightweight host-side com.itsaky.androidide.models.ProjectFile + res/layout/rename_project_textinput.xml, and repoint RecentProjectsViewModel/Adapter, DeleteProjectListAdapter, RecentProjectsFragment, ProjectInfoBottomSheet (and drop the now-unused TextinputlayoutBinding). - MainFragment: drop the layouteditor ProjectManager.openedProject gate on git-URL drop (always true on the home screen once the editor is a separate plugin). - Remove :layouteditor + :vectormaster from settings.gradle.kts and the app dependency. (The orphaned layouteditor/ and vectormaster/ module dirs remain on disk but are no longer in the build; they can be deleted separately.)
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
The module was removed from the build (settings.gradle.kts and the app dependency) when the Layout Editor moved to a .cgp plugin. Its source still sat on disk; this deletes it. The top-level vectormaster/ module is likewise orphaned and can be removed separately.
📝 Walkthrough
WalkthroughThis PR removes the layouteditor and vectormaster Gradle modules, deletes the PreviewLayoutAction editor action, introduces a new local ChangesLayouteditor removal and ProjectFile migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/main/java/com/itsaky/androidide/models/ProjectFile.kt`:
- Around line 20-24: The ProjectFile.rename() method currently ignores the
boolean result of File.renameTo() and updates path/name even when the filesystem
move fails. Update rename() to check the renameTo outcome and only mutate the
ProjectFile state on success; if it fails, surface the failure by throwing an
exception so RecentProjectsAdapter.promptRenameProject can stay in its existing
catch block and avoid calling onFileRenamed/updateProject with a bad location.
Consider adding a unit test for the failure path in ProjectFile.rename().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b101eb8-0716-4791-8f28-ef406ce26774
📒 Files selected for processing (19)
app/build.gradle.ktsapp/src/main/java/com/itsaky/androidide/actions/etc/PreviewLayoutAction.ktapp/src/main/java/com/itsaky/androidide/adapters/DeleteProjectListAdapter.ktapp/src/main/java/com/itsaky/androidide/adapters/RecentProjectsAdapter.ktapp/src/main/java/com/itsaky/androidide/fragments/MainFragment.ktapp/src/main/java/com/itsaky/androidide/fragments/RecentProjectsFragment.ktapp/src/main/java/com/itsaky/androidide/models/ProjectFile.ktapp/src/main/java/com/itsaky/androidide/ui/ProjectInfoBottomSheet.ktapp/src/main/java/com/itsaky/androidide/utils/EditorActivityActions.ktapp/src/main/java/com/itsaky/androidide/viewmodel/RecentProjectsViewModel.ktapp/src/main/res/layout/rename_project_textinput.xmlresources/src/main/res/anim/project_list_animation.xmlresources/src/main/res/drawable/arrow_left.xmlresources/src/main/res/drawable/circle_shape.xmlresources/src/main/res/drawable/dots_vertical.xmlresources/src/main/res/drawable/edit.xmlresources/src/main/res/drawable/ic_launcher.xmlresources/src/main/res/values/layouteditor_migrated.xmlsettings.gradle.kts
💤 Files with no reviewable changes (4)
- app/build.gradle.kts
- app/src/main/java/com/itsaky/androidide/utils/EditorActivityActions.kt
- app/src/main/java/com/itsaky/androidide/actions/etc/PreviewLayoutAction.kt
- settings.gradle.kts
No description provided.