MMRL X Theme Migration#69
Draft
DerGoogler wants to merge 55 commits into
Draft
Conversation
Add Module, ModulePaths and ModuleState data types and migrate UI and viewmodel to use them. Refactor ModulesViewModel into an AndroidViewModel with separated source/sorted/filtered flows, root/non-root loaders, and a RootCallable-based banner loader; implement disk-based scanning (listModules/toModule) to read module.prop and state files. Update ModuleList/ModuleItem UI to consume the new model, load banners via RootCallable, and adapt various interactions (remove, indicators, previews). Build and infra updates: switch APK naming to androidComponents, add packaging excludes for release, add runtime dependency for RootThread, bump AGP/Kotlin/Hilt/KSP versions in libs.versions.toml, change datastore namespace, and set android.disallowKotlinSourceSets=false. Also fix convention plugins to use newer Kotlin Gradle APIs (compilerOptions.optIn) and tidy plugin application. Minor utility additions: Context.getNonRootBaseDir and addRootThread calls in BaseActivity/MainActivity.
Remove decorative section separators, explanatory comments and a few docblocks from ModulesViewModel.kt to reduce clutter. No functional changes were made — all flows, functions and logic (comparators, loaders, search, etc.) remain intact; only comments and some whitespace were removed for readability.
Update module list/item UI and viewmodel wiring, and add helper functions for root-thread file I/O. - ModuleItem: remove debug log, use module.paths.adbDir and toModId to launch WebUI via context.launchWebUIX with WebUIActivity; import related extensions. - ModuleList / ModulesScreen: remove isProviderAlive parameter/prop from list/item flows and simplify RemoveButton usage by providing a default enabled value. - ModulesViewModel: simplify platform observation (remove coroutine/onEach flow handling) and remove the isProviderAlive getter; minor cleanup of comments. - Extensions: add root-thread helpers (rootSync, RootCallable.sync) and File.inputStream0 that performs file reads on the root thread. These changes consolidate WebUI launch logic, reduce extraneous state passing, and introduce safe root-thread file access utilities.
Introduce dev.mmrlx UI library and refactor module screens and models to use it. Key changes: - build: add dependencies dev.mmrlx:ui and dev.mmrlx:nio; keep thread dependency. - Model: make Module properties non-nullable (name, version, versionCode, author, description). - New file: add commented SearchToolbar stub. - MainScreen: replace Material NavigationBar/Scaffold usage with dev.mmrlx Scaffold/BottomNavigation, use ProvideLocalScaffoldScope and scaffoldHazeSource for nav host padding. - ModuleItem: rewrite layout to use dev.mmrlx components (AppAvatar, AppSeparator, ProvideTextStyle, card, Text/theme) simplify click handling to launch WebUI, remove many legacy imports and commented code, show size/version in new footer row. - ModuleList: change signature to ScaffoldScope.ModulesList, adjust contentPadding to account for scaffold paddings, wire with LocalScaffoldScope; vertical scrollbar usage commented out. - ModulesScreen: switch to dev.mmrlx Toolbar/Scaffold, inline ModulesList call, simplify loading/empty-state logic and comment out PullToRefresh. - BaseActivity: wrap MMRLAppTheme with MMRLXTheme and import theme. - settings.gradle.kts: add mavenLocal and optional GitHub Packages maven repository using GPR credentials from gradle properties or env vars. These changes migrate UI pieces to the mmrlx design system, simplify layouts, and prepare repo resolution for mmrlx artifacts.
Introduce status bar contrast detection and safer activity/context handling across the WebUI stack. - Add webui/src/main/assets/ext/statusbar.js to measure top-of-page luminance and call window.webui.updateStatusBarIconTint. - Implement ApplicationInterface.updateStatusBarIconTint to toggle status bar icon tinting via WindowInsetsControllerCompat. - Make KernelSUInterface.fullScreen use context.findActivity() and the activity window when changing system UI. - Harden HybridWebUI activity discovery and lifecycle: validate activity state, cache application context, provide safeApplicationContext/safeBaseContext accessors, add isActivitySafe, and clear cached context on detach/destroy. - JavaScriptInterface now resolves context from view.safeApplicationContext. - Add a mainThread helper to WXInterface to post to the main looper. - Inject the statusbar script from WebrootPathHandler when auto status bar styling is enabled. Also includes minor import cleanup and logging for robustness.
Introduce per-source WebConsoleStore (add source param and factory in HybridWebUIStore) so each JS interface can have its own console history. Add ConsoleEntry helpers (info/warn/error/debug/trace) and a private logLevel builder to normalize args into ResultNode.Primitive values. Add PrimitiveKind.parse companion to infer primitive kinds from Kotlin values. Update JavaScriptInterface to use buildConsoleStore, clear console logs on onDestroy (with @callsuper), and normalize several method signatures. Update WXInterface to find the Activity via context.findActivity, use consoleLogs.* helpers, and pass the resolved Activity into posted runnables. Misc: small formatting and minor null/flow safety adjustments.
Introduce a reusable BottomNavigation composable and wire it into ModulesScreen and SettingsScreen; remove the old inline BottomNav from MainScreen and simplify its nav host setup. Remove dependency on LocalScaffoldScope in ModuleList and adjust bottom padding. Refactor console handling across hwui and webui: use store.buildConsoleStore(TAG) / view.consoleLogs instead of direct consoleStore access, and replace manual fallback console entries with console.error(e). Bump dev.mmrlx:ui dependency to 1.0.8 and apply minor import/formatting cleanups.
Remove the local hwui module and migrate usage to the dev.mmrlx.hybridwebui/artifacts. Updated imports across the app to use dev.mmrlx.hybridwebui and adjusted code to new APIs (console, iife, interfaces). Register HybridWebUI event emitter and keyboard observer in WebUIActivity, add FileChooser from the new package, and enableOnBackInvokedCallback in the activity manifest. Bumped dev.mmrlx UI dependency (1.0.8 -> 1.0.9) and updated Compose/foundation versions and dependency metadata in libs.versions.toml. Refactored UI usages to match new compose API (icon/Text/IconButton imports, SearchableToolbar, input state handling, nestedScroll) and removed the projects.hwui dependency.
Migrate ModulesMenu to use rememberModalBottomSheet instead of a manual open state and BottomSheet. Convert MenuBottomSheet into a ColumnScope MenuBottomSheetContent that is provided to the modal sheet; IconButton now opens the sheet. Remove custom SegmentedButtonsDefaults styling and rely on the SegmentedButtons API. Add a reusable MenuChip composable implemented with FilterChip (including leading/trailing icons) and a small Point Canvas helper to draw the selection dot. Clean up imports and adapt to dev.mmrlx UI components.
Replace the withActivity block with a direct activity.exit(options) wrapped in a try/catch to prevent unhandled exceptions from crashing the app and to log failures via consoleLogs.error. Adds the dev.mmrlx.hybridwebui.store.error import used for logging. This ensures exit errors are reported instead of causing crashes.
Add an in-app WebUI implementation and developer tools plus related UI and platform integrations. - Added WebUI X activity and support: new WebUIActivity, ExtraOptions, path handlers, platform helpers and utilities to register Su/Webroot/Internal handlers and read module config; included WebUI compose view and developer tools integration (DevTools, ConsoleTab, DOMTab, NetworkTab, ViewTab, TabRow, etc.). - Added error-page.css asset for WebUI error page styling. - Refactored modules UI to use LocalModule/State APIs (ModuleItem, ModuleList, ModulesScreen): support launching module WebUI via intent with module id/baseDir, combinedClickable for long-press to open file explorer, updated cover loading to use SuFile and provider state, switched view model list source to viewModel.local and enabled pull-to-refresh & provider alive flag. - Manifest and build updates: added a dedicated WebUI activity entry (permissions/process/taskAffinity) and changed main activity intent-filter action/category; added mmrlx.utilities dependency in build.gradle.kts. - Minor code cleanups: removed unused imports, switched some icons to painterResource, and adjusted imports/usages across several files. These changes enable launching and inspecting module WebUIs inside the app and add a suite of devtools for debugging web content.
Introduce comprehensive SuFile read/write extensions (SuFileReadWrite.kt): buffered readers/writers, read/write text and bytes, streaming helpers (forEachBlock/forEachLine/useLines), and input/output stream constructors. Add a placeholder WebUI JavaScript interface (FileSystemInterface.kt) that currently throws UnsupportedOperationException pending a filesystem rework; commented stubs show intended API. Bump mmrlx version to 1.0.51 in libs.versions.toml. Remove redundant JSONObject opt* helper aliases from JSONCollectionExt.kt.
Introduce MD3 and MMRLX prompt/confirm composables and wire them into the Web UI interface. Adds two new alert components (app/src/.../alerts/Confirm.kt and Prompt.kt) and a new prompt ExportMethod in ApplicationInterface that shows themed overlays via activity.addOverlayView; confirm() was updated to use the new composables as well. Minor refactors: switched parameter map builders in WebUIActivity to use add(pair) calls, removed an obsolete onReceivedError override and unused imports in WebrootPathHandler, and bumped the mmrlx library version to 1.0.52.
Migrate internal list/toolbar APIs to the new dev.mmrlx compose UI library and modernize related screens. - Replace legacy list components with dev.mmrlx equivalents (RadioDialogOption, RawItem, List, Section, InputDialogItem, SwitchItem, etc.) and update ListItems to use Modifier-based APIs and slots. - Add NavigateUpToolbar composable for consistent up-navigation (overloads for NavController/Context/onBack). - Update FeaturedManager to produce RadioDialogOption and remove old RadioOptionItem usage. - Refactor DeveloperScreen and SettingsScreen to use mmrlx toolbar, list, dialogs and theme primitives; convert dialogs to rememberDialog/InputDialogItem and add a remote domain info dialog. - Rename Separator usage in ModuleItem and adjust imports across UI files. - Add new WebUIEngine value (MX) and related string resources (settings_webui_engine_mx, cancel/confirm/learn_more). - Bump mmrlx dependency version in libs.versions.toml. These changes migrate UI code to the mmrlx component APIs, simplify item composition with Modifier-based patterns, and introduce a shared NavigateUp toolbar. Review calling sites for API changes (dialog/item types and modifier helpers).
Migrate UI code to newer mmrlx components and APIs. ModuleItem: replace .card() with .flashlightCard() and update import. LicensesScreen: refactor to use dev.mmrlx scaffold/toolbar/list primitives (ToolbarDefaults/ToolbarScrollBehavior, Scaffold.toolbar/bottomBar, NavigateUpToolbar), move list rendering into a ScaffoldScope extension, replace custom Card/List DSL with List/RawItem, use Modifier.onClick for external links, FormatText+inline Icon for link hint, and Badges for version/license labels. Also add bottom navigation and adjust scaffold padding/content arrangement. Bump mmrlx version to 1.0.63.
Adjust module item click handling to launch the appropriate WebUI based on userPreferences.webuiEngine. The condition was changed to use canWenUIAccessed and imports updated to enable launchWebUIX. If the MX engine is selected, an Intent starts WebUIActivity; if WX is selected, launchWebUIX is used (with a TODO note to deprecate WX since devtools are unstable). The toast message was updated to "Unsupported engine". Also add a TODO comment in FileSystemInterface noting it's not yet implemented and requires a filesystem rework.
Introduce a new WebUIConfig property autoAddInsets (default false) and, when enabled, inject a small script in WebrootPathHandler that shifts the document by the top inset and adjusts the document height to account for top+bottom insets. This enables automatic layout adjustment for system/status bar insets in the web UI. Imports were slightly reorganized.
Refactors Md3Prompt and MXPrompt to improve keyboard handling and option parsing: make prompt composables internal, wire through imeAction and keyboardType, simplify confirm/close logic, and use rememberInputState with a custom layout for MXPrompt. Adds helper converters ImeAction.fromString and KeyboardType.fromString and updates ApplicationInterface to safely read option fields (defaultValue, supportingText, keyboardType, imeAction) via getAs/getByPathOrDefault. Also cleans up unused imports and adjusts dialog behavior. Bumps mmrlx version in gradle/libs.versions.toml.
Implement a FileSystem JavaScript interface for the WebUI: expose POSIX open flags, and add readFile/readFileSync/writeFile using SuFile/SuFileOutputStream with charset handling and PermissionParser for mode parsing. Register the interface in WebUIActivity and add a prefs-driven useConsoleInterceptor flag; DevTools now only show when enableDevTools is enabled. Add a Developer-screen switch, strings, ViewModel and datastore plumbing to persist disableConsoleInterceptor. Remove old SuFileReadWrite utilities and bump mmrlx/mmrl versions in libs.versions.toml. Includes helper PermissionParser utility and robust NIO text writing helpers.
Introduce a KernelSU JavaScript interface for the WebUI (KernelSUInterface) to provide exec/spawn/toast/fullscreen/moduleInfo and root-shell integration for web modules. Add a new WorkingMode enum in datastore with helpers (isRoot/isNonRoot/isSetup) and mapping to Platform. Wire the new working-mode APIs through the app: update imports to use com.dergoogler.mmrl.wx.datastore.model.WorkingMode, expose isRootMode to WebUI settings, register the KernelSUInterface in WebUIActivity, and pass the working-mode flag into the web module config. Also minor cleanups (unused imports, TODO comment in FileSystemInterface) and bump mmrlx dependency version.
Add a stableId property to RenderEntry and include an index for text nodes so each rendered item has a stable, unique key. buildRenderList now tracks text occurrences with a counter map to assign deterministic indices; LazyColumn items use stableId as the key to avoid UI reordering/jank. Also refactor JS runJs invocations and dialog/layout code for clearer string escaping and formatting, and remove some comment separators/whitespace for consistency.
Replace Material Icons usage with project drawable resources (ConsoleTab and NetworkTab) and remove now-unused imports. Add a temporary native BackHandler in WebUIActivity to consume webview back navigation (goBack or finish activity) and comment out the previous JS back-handler injection in WebrootPathHandler. Bump mmrlx version to 1.0.75 in libs.versions.toml. Minor import cleanup.
Add vector drawables (git_branch, git_commit) to app res and git_branch to webui res. Enhance ModuleItem: show module version with author, display size and last-updated timestamp using FormatText with inline icons, adjust paddings and divider usage, and clean up imports. Minor UI tweaks: reorder contentPadding call in ListItems.LinkButton and switch FormatText placeholders from %c to %y in DeveloperScreen and LicenseScreen. These changes improve module list readability and add visual git indicators.
DeveloperScreen: import and add BottomNavigation as the scaffold bottomBar, reorder scaffoldPadding to apply after scrolling/fill, and change FormatText placeholder from "%c" to "%y" for the beta badge. MainScreen: remove unused UI imports and the scaffoldHazeSource modifier usage to clean up the composable. Bump mmrlx dependency to 1.0.82 in libs.versions.toml to pick up upstream UI changes.
Register mmrlx webui Lua plugin and SU-backed file/stream factories, and update related APIs: - Add mmrlx.webui.lua dependency and bump mmrlx version; add libs alias mmrlx-webui-lua. - Register Input/OutputStream and File factories (SuFileInputStream, SuFileOutputStream, SuFile) so WebUI can access root-mode files. - Register a Lua plugin pointing to the module's webroot index.lua and wire additional path/JS interfaces. - Replace jsonObject extras with a typed extra map and use settings.extra<T>() accessors in ExtraOptions for safer typing. - Replace usages of context with kontext in path handlers, interfaces, and error page rendering. These changes enable loading Lua-based WebUI plugins and provide SU file I/O integration for root-mode operation.
Remove parcelize/serialization from Module and WebrootConfig; switch WebrootConfig internals to Compose's mutableStateMapOf and remove the manual publish/flow snapshot logic. Use SuFile readText/writeText helpers, tighten resolvePath traversal (use a snapshot JsonObject), add error logging on load/save failures, and simplify many property accessors to single-line getters. Minor cleanup in dexFiles parsing. Also update dependency mmrlx from 1.0.94 to 1.0.96.
Introduce centralized WebUI back/exit handling and related config changes. - Add WebUIExit.kt: implements backHandlers(WebUI) and exit logic, including native back behavior, JS handling modes, exit confirmation dialog, and optional force-kill process exit. - Add WebUISettings.forceKillWebUIProcess defaulting to true. - Make WebrootConfig.backInterceptor a String (was Any?) and update usages to remove unnecessary casts. - Update WebUIActivity to read and reuse ColorScheme from prefs and apply backHandlers(colorScheme). - Update UI strings for back-control options and add localized exit strings. - Bump mmrlx dependency to 1.0.98. These changes unify back-navigation handling, provide a safe native-exit flow, and expose a setting to control process termination behavior.
Add a new "testing" flavor dimension and register internal, alpha, beta and rc product flavors. Update flavorDimensions to include both "distribution" and "testing". Each new flavor uses the base package name, sets a distinct resValue app_name prefix (symbols for easy identification) and sets IS_SPOOFED_BUILD to false. Existing spoofed distribution flavor is unchanged.
Replace Material3-based FileExplorer UI with mmrlx UI primitives and theming, and wire module navigation/state by id. Key changes: - FileExplorerScreen: now accepts moduleId and uses Module.rememberCreate to load ModuleUIState; splits into FileExplorerContent + ContentWrapper for loading/error/ready states. - UI migration: swap Material3 widgets for dev.mmrlx equivalents (Scaffold, Toolbar, List, dialog, inputs, FABs, icons, theming, ripples), update styles to use MMRLXTheme, and adjust paddings/contentInsets accordingly. - Dialogs: CreateDialog converted to new rememberDialog/DialogScope API and uses rememberInputState/OutlinedInput with TextFieldLineLimits. - List items & breadcrumbs: migrated to dev.mmrlx list components (RawItem), updated colors, typography and selection background handling. - File explorer behavior: ModuleItem navigation now passes module.id; FileEditor navigation commented out pending migration. - ViewModel: FileExplorerViewModel imports switched to dev.mmrlx.nio.SuFile APIs and uses SuFile.async for creating files/folders. - LicenseScreen: use scaffold contentPadding instead of custom PaddingValues. - Bump mmrlx version to 1.0.99 in gradle/libs.versions.toml. These changes migrate the explorer to the shared mmrlx UI toolkit, centralize module loading by id, and prepare components for consistent theming and async file APIs.
Add a ModuleScope composable with a LocalModule composition local and introduce Module.Empty and AdbPath.Empty. Refactor FileEditorScreen and FileExplorerScreen to use ModuleScope/LocalModule (split FileEditorContent) and update navigation to pass moduleId. Migrate code editor theming from MaterialTheme.colorScheme to MMRLXTheme.colors and adjust color mappings accordingly. Replace the old ConfirmDialog flow with the new rememberDialog-based dialog UI and perform related import/cleanup changes.
Call SuFile.AutoInit on startup and make module enumeration more robust: add logging, check for modules dir existence, guard against listFiles() returning null, skip modules missing module.prop, and catch/ log parsing failures. Also replace several SuFile.async usages with synchronous checks to simplify flow. Bump mmrlx version to 1.0.100 in libs.versions.toml.
Replace asOrDefault usages with null-safe parsing in Module: provide "N/A" defaults for missing strings, safe toInt/toBoolean helpers, and normalize metamodule values (accepts boolean or int). Update ModuleItem imports and code comments to prepare for local cover handling (use rememberSuFile/fadingEdge) and remove the LocalCover composable implementation. Remove addRootThread call from BaseActivity. Bump mmrlx library version to 1.0.101.
Introduce a SkeletonModuleItem composable and show skeleton rows while modules load. Replace the previous custom ModulesList call with a LazyColumn that displays placeholders, page empty-state, or filtered module items (web UI only). Add pull-to-refresh UI and state (rememberPullToRefreshState, Indicator) and wire refresh animation to a refreshDone channel. Refactor ModulesViewModel: remove legacy screenState/cache/local flows and isLoading flow; expose local, isLoaded, isRefreshing StateFlows and a refreshDone Flow (Channel). Simplify module loading/parsing, search/filter logic, and error handling. Misc: small cleanup of imports/whitespace and bump mmrlx dependency to 1.0.104.
Change Module properties to typed Map<String,Any> and add robust parsing/Accessors. Module.readProps now parses .properties lines into typed values (booleans, ints, longs, doubles, strings) and supports escaped separators. Added a generic Map.get(default, vararg aliases) accessor, relativeModuleDir helper, and parseValue; removed the old string-to-int/bool helpers. banner/icon fields now resolve to SuFile relative to the module directory. Added a new LocalCover composable (Cover.kt) that decodes an InputStream into a bitmap and renders it with aspect ratio and clipping. Updated ModuleItem to use LocalCover directly and simplified banner existence handling along with minor import cleanup.
Add getAdbPath(context) to UserPreferences to encapsulate logic that returns context.filesDir.path when workingMode == MODE_NON_ROOT, otherwise returns adbPath. Update ModulesViewModel to call prefs.getAdbPath(context) and remove the inline WorkingMode check/import, simplifying getLocalModules and centralizing adb path resolution.
Add support for TextMate-based syntax highlighting and load grammars/themes from an ADB-backed path. Introduce AdbPathFileResolver to resolve editor resources via SuFile/AdbPath and register it in a new TextMateManager. Refactor CodeEditorState to initialize TextMate language scopes, build and register a dynamic theme from app Colors, wire TextMateLanguage, and move/adjust save logic (disable save when no file). Update rememberCodeEditorState to pass adbPath and debug prefs, remove the old custom EditorColorScheme class, and delete the previously unused VisibleState helpers. Also adjust Gradle packaging block to use the nested packaging.resources DSL and add pickFirsts for tables/**.
Replace manual file-type icon mapping with dev.mmrlx's MaterialIconResolver in FileExplorerViewModel, falling back to dev.mmrlx.ui drawable resources when needed. Update FileExplorerScreen to display icons with Image(painterResource) and remove the previous icon tint/selection logic. Also bump the mmrlx dependency to 1.0.106. These changes centralize icon resolution and adopt the mmrlx icon set for more consistent file/folder icons.
Introduce a custom ADB path setting: add an InputDialogItem in BehaviorScreen to let users enter a custom ADB path (dialog and item strings added). Wire the setting through the stack by adding setAdbPath to SettingsViewModel, UserPreferencesRepository, and UserPreferencesDataSource (updates preferences on IO). Also migrate toolbar/list/scaffold usages in BehaviorScreen to the newer UI components and adjust padding/scroll behavior. Minor cleanup: remove an unused Supporting() call in SettingsScreen.
Move WebUI composable logic out of WebUIActivity into a new WebUIScreen composable and wrap it with ModuleScope. Prepopulate demo WebUI modules by extracting two zips from assets on App startup (no-op if already extracted) and add NonRootFileService to the manifest. Improve ModulesScreen layout (fillMaxSize and spacing) and tweak ModulesViewModel logging and SuFile handling (use SuFile for modulesDir, adjust Module.readProps call). Fix WebUI response handling by using inputStream(), folding injections into the stream, and remove the old forbidden-path check. Bump mmrlx dependency to 1.0.120.
Add Lua interoperability for modules and paths so WebUI Lua plugins can access module metadata and resolve paths. Implemented toLuaTable() on Module, AdbPath and ModulePath to convert Kotlin data into org.luaj.LuaTable objects and expose module as global "mod" in LuaPlugin. Added helper utilities in Extensions: LuaTable.set(Boolean), Varargs.map/mapNotLuaNil, and PathVarArgFunction to resolve path fragments against a base path from Lua. Small I/O helper (File.inputStream0) remains unchanged.
Wrap TextMate language initialization in runCatching and log failures instead of letting exceptions propagate. Adds android.util.Log import and switches from let to runCatching (using scopeName as receiver) to make setting the editor language more robust and avoid crashes when TextMateLanguage.create fails.
Replace direct platform check with a user-preference based flag in the module list UI. ModuleList.kt now imports LocalUserPreferences and reads LocalUserPreferences.current (prefs.isNonRoot) instead of platform.isNonRoot to decide whether to show the remove button. Added a computed property isNonRoot to UserPreferences (datastore/src/.../UserPreferences.kt) that returns true when workingMode == MODE_NON_ROOT, centralizing the non-root determination in the preferences model.
Import dev.mmrlx.nio.writeText in FileEditorScreen.kt to enable file write operations (complements existing readText usage).
Change UserPreferences default for webuiEngine (ProtoNumber 37) from WebUIEngine.PREFER_MODULE to WebUIEngine.WX. This makes WX the default WebUI backend for new installs or when preferences are reset; existing persisted preferences are unaffected.
There was a problem hiding this comment.
Pull request overview
This PR migrates the app/WebUI stack toward the new MMRLX ecosystem (theme + WebUI core), adds a new Compose-based WebUI screen with path handlers/devtools, and updates build tooling/dependencies to newer Android/Gradle/Kotlin baselines.
Changes:
- Introduces a new
wx.ui.webuiimplementation (screen/activity, path handlers, JS interfaces, devtools UI, responses/error pages). - Migrates UI components/screens to MMRLX Compose components/theme and updates module/file handling to
dev.mmrlx.nio. - Updates Gradle/AGP/Kotlin versions and build-logic conventions; expands flavors and repository resolution.
Reviewed changes
Copilot reviewed 108 out of 112 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| webui/src/main/res/drawable/git_branch.xml | Adds a vector drawable asset. |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/pathHandler/WebrootPathHandler.kt | Updates Webroot handler injections (statusbar script). |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/model/Config.kt | Adds autoAddInsets config flag; import reorder. |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/interfaces/WXinterface.kt | Adjusts activity lookup/logging and adds main-thread helper. |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/interfaces/FileInterface.kt | Adds readText/writeText imports for file operations. |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/interfaces/ApplicationInterface.kt | Adds status bar icon tint API; changes exit behavior and logging. |
| webui/src/main/kotlin/com/dergoogler/mmrl/webui/activity/WXActivity.kt | Removes/remarks keyboard/back handling logic in activity. |
| webui/src/main/kotlin/com/dergoogler/mmrl/ext/JSONCollectionExt.kt | Removes redundant opt* helpers. |
| webui/src/main/assets/ext/statusbar.js | Adds a JS helper for status bar icon tinting. |
| webui/build.gradle.kts | Switches hwui dependency exposure; removes kotlin android plugin usage. |
| settings.gradle.kts | Adds mavenLocal and conditional GitHub Packages repository. |
| modconf/build.gradle.kts | Removes kotlinOptions/jvmTarget block; plugin changes. |
| lua/build.gradle.kts | Removes kotlinOptions/jvmTarget block; plugin changes. |
| jna/build.gradle.kts | Removes kotlinOptions/jvmTarget block; plugin changes. |
| hwui/src/main/kotlin/com/dergoogler/mmrl/hybridwebui/store/WebConsoleStore.kt | Adds source-tagged console entries and extension helpers. |
| hwui/src/main/kotlin/com/dergoogler/mmrl/hybridwebui/ResultNode.kt | Adds PrimitiveKind.parse helper. |
| hwui/src/main/kotlin/com/dergoogler/mmrl/hybridwebui/interfaces/JavaScriptInterface.kt | Switches context to applicationContext. |
| hwui/src/main/kotlin/com/dergoogler/mmrl/hybridwebui/HybridWebUIStore.kt | Updates console store initialization with source. |
| hwui/src/main/kotlin/com/dergoogler/mmrl/hybridwebui/ConsoleEntry.kt | Adds convenience constructors for log levels. |
| hwui/build.gradle.kts | Removes kotlinOptions/jvmTarget block; plugin changes. |
| helper/build.gradle.kts | Bumps compileSdk to 36 and removes kotlinOptions/jvmTarget. |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper distribution URL. |
| gradle/libs.versions.toml | Updates versions; adds MMRLX coordinates and other deps. |
| gradle.properties | Adds android.disallowKotlinSourceSets=false. |
| datastore/src/main/kotlin/com/dergoogler/mmrl/wx/datastore/UserPreferencesRepository.kt | Adds setters for ADB path and console interceptor flag; import changes. |
| datastore/src/main/kotlin/com/dergoogler/mmrl/wx/datastore/UserPreferencesDataSource.kt | Persists new ADB path / console interceptor prefs; import changes. |
| datastore/src/main/kotlin/com/dergoogler/mmrl/wx/datastore/model/WorkingMode.kt | Introduces new WorkingMode enum in wx datastore module. |
| datastore/src/main/kotlin/com/dergoogler/mmrl/wx/datastore/model/WebUIEngine.kt | Adds new engine option MX. |
| datastore/src/main/kotlin/com/dergoogler/mmrl/wx/datastore/model/UserPreferences.kt | Adds adbPath/console interceptor prefs and getAdbPath helper; default engine changed. |
| datastore/build.gradle.kts | Renames namespace and bumps compileSdk to 36; plugin changes. |
| build-logic/src/main/kotlin/LibraryConventionPlugin.kt | Refactors convention plugin (toolchains/compileOptions). |
| build-logic/src/main/kotlin/HiltConventionPlugin.kt | Refactors Hilt convention plugin formatting/structure. |
| build-logic/src/main/kotlin/ComposeConventionPlugin.kt | Refactors compose convention plugin; switches to compilerOptions opt-ins. |
| build-logic/src/main/kotlin/ApplicationConventionPlugin.kt | Refactors application convention plugin; switches to compilerOptions opt-ins. |
| app/src/main/res/values/strings.xml | Adds new settings strings (engine MX, console interceptor toggle, ADB path, confirm/cancel/etc). |
| app/src/main/res/drawable/git_commit.xml | Adds a vector drawable asset. |
| app/src/main/res/drawable/git_branch.xml | Adds a vector drawable asset. |
| app/src/main/java/com/dergoogler/mmrl/wx/viewmodel/SettingsViewModel.kt | Adds setters for ADB path and console interceptor flag. |
| app/src/main/java/com/dergoogler/mmrl/wx/viewmodel/FileExplorerViewModel.kt | Migrates to dev.mmrlx.nio and new icon resolver usage. |
| app/src/main/java/com/dergoogler/mmrl/wx/util/PermissionParser.kt | Adds Unix permission parsing utilities. |
| app/src/main/java/com/dergoogler/mmrl/wx/util/Extensions.kt | Adds root-thread helpers, Lua helpers, and module model changes. |
| app/src/main/java/com/dergoogler/mmrl/wx/util/BaseActivity.kt | Wraps app theme with MMRLXTheme. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/WebUIScreen.kt | Adds new WebUI screen based on dev.mmrlx.webui. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/WebUIExit.kt | Adds centralized back handling + exit flow for WebUI. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/WebUIActivity.kt | Adds new activity hosting the new WebUI screen. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/util/Responses.kt | Adds response helpers, injection utilities, and gzip handling. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/util/producePlatformState.kt | Adds Compose helpers that react to platform alive state. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/util/LuaPlugin.kt | Adds conditional Lua plugin registration for WebUI. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/util/ErrorPage.kt | Adds HTML error response generation with internal styles. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/pathHandlers/WebrootPathHandler.kt | Adds new Webroot path handler for the new WebUI engine. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/pathHandlers/SuPathHandler.kt | Adds SU-backed path handler. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/pathHandlers/InternalPathHandler.kt | Adds internal handler for colors/insets/assets. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/pathHandlers/AssetsPathHandler.kt | Adds asset-serving handler for WebUI internal assets. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/interfaces/KernelSUInterface.kt | Adds new KernelSU JS interface for the new WebUI engine. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/interfaces/ApplicationInterface.kt | Adds new app interface with MD3/MMRLX confirm/prompt overlays. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/ExtraOptions.kt | Adds typed accessors for WebUI settings extra values. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/ViewTab.kt | Adds DevTools tab header UI. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/TabRow.kt | Adds custom tab row implementation. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/Tab.kt | Adds tab composable. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/Style.kt | Adds tonal surface helper. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/DevToolsContainer.kt | Adds DevTools bottom sheet container. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/devtools/DevTools.kt | Adds DevTools pager container. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/alerts/Prompt.kt | Adds MD3/MMRLX prompt implementations and parsing helpers. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/webui/alerts/Confirm.kt | Adds MD3/MMRLX confirm implementations. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/settings/LicenseScreen.kt | Migrates licenses screen to MMRLX scaffolding/list components. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/settings/BehaviorScreen.kt | Migrates behavior settings UI and adds custom ADB path dialog item. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/modules/screens/editor/AdbPathFileResolver.kt | Adds resolver for TextMate registry based on adb path. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/modules/ModulesScreen.kt | Migrates modules screen to MMRLX UI and updates refresh/search behavior. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/modules/ModulesMenu.kt | Migrates modules filter/sort sheet to MMRLX components. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/modules/ModuleList.kt | Migrates module item actions/removal dialog and navigation. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/screens/MainScreen.kt | Migrates scaffold usage; removes old bottom nav in favor of shared component. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/toolbar/SearchToolbar.kt | Leaves deprecated search toolbar as commented-out file. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/NavigateUpToolbar.kt | Adds new NavigateUpToolbar built on MMRLX toolbar. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/ModuleScope.kt | Adds module-scoped composition local + wrapper scaffold. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/LoadingContent.kt | Adds standardized loading content. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/ListItems.kt | Migrates list item helpers to MMRLX list components. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/ErrorContent.kt | Adds standardized error content composable. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/devtools/ViewTab.kt | Tweaks devtools view tab (status bar padding + close icon). |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/devtools/NetworkTab.kt | Updates icons/resources in network inspector. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/devtools/DOMTab.kt | Improves stable keys for DOM render list entries. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/devtools/DevToolsContainer.kt | Simplifies devtools container sizing logic. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/devtools/ConsoleTab.kt | Updates toolbar icons/imports in console tab. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/Cover.kt | Adds composable to render cover images from InputStream. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/component/BottomNavigation.kt | Adds shared bottom navigation using MMRLX navigation bar. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/activity/webui/interfaces/KernelSUInterface.kt | Adjusts fullscreen logic to use findActivity + main thread helper. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/activity/SetupScreen.kt | Updates WorkingMode import source. |
| app/src/main/java/com/dergoogler/mmrl/wx/ui/activity/MainActivity.kt | Updates WorkingMode import source; minor import reorder. |
| app/src/main/java/com/dergoogler/mmrl/wx/model/module/WebrootConfig.kt | Adds new dynamic WebrootConfig backed by JSON + accessors. |
| app/src/main/java/com/dergoogler/mmrl/wx/model/module/ModuleUIState.kt | Adds module UI state model for async loading/errors. |
| app/src/main/java/com/dergoogler/mmrl/wx/model/module/ModuleState.kt | Adds module state enum (separate from platform State). |
| app/src/main/java/com/dergoogler/mmrl/wx/model/module/ModulePaths.kt | Adds adb/module path modeling and Lua table exports. |
| app/src/main/java/com/dergoogler/mmrl/wx/model/module/Module.kt | Adds new module model, property parsing, size calc, Lua export, Compose loader. |
| app/src/main/java/com/dergoogler/mmrl/wx/model/FeaturedManager.kt | Migrates to MMRLX radio dialog option type. |
| app/src/main/java/com/dergoogler/mmrl/wx/App.kt | Switches to LifecycleApplication, initializes SuFile and unzips demo modules. |
| app/src/main/assets/error-page.css | Adds CSS for new WebUI error pages. |
| app/src/main/AndroidManifest.xml | Adjusts activity intent-filters and adds NonRootFileService; adds additional WebUIActivity entry. |
| app/build.gradle.kts | Updates flavors/packaging/output naming; adds parcelize + MMRLX deps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+145
to
+149
| fun SuFile.handleSvgzStream( | ||
| stream: InputStream, | ||
| ): InputStream { | ||
| return if (extension === "svgz") GZIPInputStream(stream) else stream | ||
| } |
Comment on lines
73
to
82
| <activity | ||
| android:name="${__packageName__}.ui.activity.CrashHandlerActivity" | ||
| android:exported="true" | ||
| android:launchMode="singleTask" | ||
| android:windowSoftInputMode="adjustResize"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| </intent-filter> | ||
| </activity> |
Comment on lines
121
to
126
|
|
||
| if (options.config.autoStatusBarsStyle) { | ||
| addInjection { | ||
| appendLine("<script data-internal-configurable type=\"module\">") | ||
| appendLine("$${options.modId.sanitizedId}.setLightStatusBars(!$${options.modId.sanitizedId}.isDarkMode())") | ||
| appendLine("</script>") | ||
| appendLine("<script src=\"https://mui.kernelsu.org/internal/assets/ext/statusbar.js\"></script>") | ||
| } | ||
| } |
Comment on lines
+134
to
+140
| } | ||
|
|
||
| if (config.autoStatusBarsStyle) { | ||
| addInjection { | ||
| appendLine("<script src=\"https://mui.kernelsu.org/internal/assets/ext/statusbar.js\"></script>") | ||
| } | ||
| } |
Comment on lines
+9
to
+13
| const topElement = document.elementFromPoint(5, 5); | ||
| const bgColor = window.getComputedStyle(topElement).backgroundColor; | ||
|
|
||
| const rgb = bgColor.match(/\d+/g).map(Number); | ||
|
|
Comment on lines
+1
to
+20
| //package com.dergoogler.mmrl.wx.ui.component.toolbar | ||
| // | ||
| //import androidx.compose.foundation.layout.RowScope | ||
| //import androidx.compose.foundation.layout.WindowInsets | ||
| //import androidx.compose.foundation.shape.RoundedCornerShape | ||
| //import androidx.compose.foundation.text.KeyboardActions | ||
| //import androidx.compose.foundation.text.KeyboardOptions | ||
| //import androidx.compose.material3.Icon | ||
| //import androidx.compose.material3.IconButton | ||
| //import androidx.compose.material3.MaterialTheme | ||
| //import androidx.compose.material3.OutlinedTextField | ||
| //import androidx.compose.material3.OutlinedTextFieldDefaults | ||
| //import androidx.compose.material3.Text | ||
| //import androidx.compose.material3.TopAppBarColors | ||
| //import androidx.compose.material3.TopAppBarDefaults | ||
| //import androidx.compose.material3.TopAppBarScrollBehavior | ||
| //import androidx.compose.runtime.Composable | ||
| //import androidx.compose.runtime.LaunchedEffect | ||
| //import androidx.compose.runtime.remember | ||
| //import androidx.compose.ui.Modifier |
Comment on lines
+249
to
+256
| val basePath: String? = prefs.getAdbPath(context) | ||
|
|
||
| if (basePath == null) { | ||
| value = ModuleUIState.Error.MissingAdbPath() | ||
| return@produceState | ||
| } | ||
|
|
||
| val adbPath = AdbPath(basePath) |
Comment on lines
+29
to
+33
| private const val DefaultContentSecurityPolicy: String = | ||
| "default-src 'self' data: blob: {domain}; " + | ||
| "script-src 'self' 'unsafe-inline' 'unsafe-eval' {domain}; " + | ||
| "style-src 'self' 'unsafe-inline' {domain}; connect-src *" | ||
|
|
Comment on lines
+80
to
+88
| a { | ||
| text-decoration: none; | ||
| color: var(--primary); | ||
| font-weight: 500; | ||
|
|
||
| :hover { | ||
| text-decoration: underline; | ||
| } | ||
| } |
Comment on lines
+152
to
+159
| .error-icon { | ||
| font-size: 4rem; | ||
|
|
||
| svg { | ||
| width: 5rem; | ||
| height: 5rem; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.