Update base code - #391
Merged
D4vidDf merged 18 commits intoSep 25, 2026
Merged
Update base code#391D4vidDf merged 18 commits into
D4vidDf merged 18 commits into
Conversation
…Screen Adds `DiagnosticsScreenReconnectServicePreview` to allow previewing `DiagnosticsContent` when notification access is granted but the service is disconnected (`serviceConnected = false`).
…time, not a flat 30 s (#335) (#337) * fix: permanent island yields to a native island for its declared lifetime, not a flat 30 s (#335) HyperOS 3 draws two islands side by side, the second one as an app-icon bubble. Re-posting the permanent island 30 s after a native island appears (#304) therefore shows a HyperBridge bubble next to any long-running native island such as the Clock stopwatch. Read the native island's own lifetime instead: Xiaomi's protocol declares param_v2.param_island.islandTimeout in seconds with a documented default of one hour. NativeIslandYieldPolicy turns a focus param into a yield window (declared timeout, 1 h default, 0 without param_island, 30 s for MediaStyle players and unreadable payloads), NativeIslandTracker keeps that window per sighting, and the re-assert timer now follows the remaining windows when a native island is forgotten. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix: permanent island also yields to bridged islands on HyperOS 3 (#335) #243 kept the permanent island posted underneath bridged islands so it was revealed the instant they collapsed. HyperOS 3 draws two islands at once, the older one as a mini island with only the app icon, so the posted pill becomes a HyperBridge bubble next to every WhatsApp island. Route PermanentIslandManager.desiredActive() through the existing PermanentIslandVisibilityPolicy, which already requires no active bridged island, widget island or VPN island. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix: time-limit the yield only for media players, other islands hide the pill while posted (#335) Review feedback on #337: HyperOS turns every notification that carries a MediaSession into an island player, so those are the only islands whose notification outlives the island (a paused player, #255) and the only ones that keep the short 30 s window. Any other native island now hides the permanent island for as long as its notification is posted; the only bound is the island lifetime it declares to HyperOS (param_island.islandTimeout, default 1 h), after which HyperOS has already dropped the island. - NativeIslandYieldPolicy: media wins over a focus param; an unreadable focus param means "hide until removed" instead of the old flat window. - NotificationReaderService: a media player is a MediaStyle template, a notification with a MediaSession token, or one carrying miui.focus.param.media. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: noelpatata2 <[email protected]>
Update `versionCode` to 38 and `versionName` to "0.6.0-dev5" in `app/build.gradle.kts`.
…#365) * feat: add system update island integration and customization settings Add support for the system updater package with a dedicated translator, timeout policy, and customization screen for configuring layout design, icon sources, and auto-hide timeouts. * feat: support system updates without progress and refine timeout policy * Add `hasProgress` check to SystemUpdateTimeoutPolicy to apply system update timeouts when progress is absent. * Handle non-progress system updates in SystemUpdateTranslator with customized layout configurations. * Refactor system update routing in NotificationReaderService and add unit tests.
…exists (#358) (#368) The app group from #334 needs a real summary notification, and HyperOS shows that summary as an ordinary "Hyper Bridge / Active Islands" row in the shade while it hides the Focus children. So on any HyperOS 3 phone below Android 16 the row sits in the shade for as long as one island (the permanent one included) exists, and users read it as a second island. Force grouping at 2 (config_autoGroupAtCount) only exists from Android 16, so the group and its summary are now a no-op below SDK 36. Android 16+ keeps the #334 behaviour unchanged. Co-authored-by: noelpatata2 <[email protected]>
…tor, Dynamic Engine, Theme Bundling & SAF Sharing (#271) (#353) * feat(translator): add custom translator model, database persistence, and room migration (#344) * feat(translator): define serializable CustomTranslator model and configuration schemas * feat(db): create TranslatorEntity and TranslatorDao with database migration from v1 to v2 * test(translator): add unit tests for serialization roundtrip and entity conversion * feat(translators): introduce dynamic custom translator framework (#345) * feat(translators): add DynamicTranslator and TranslatorRegistry for declarative notification parsing * feat(service): integrate custom translator evaluation and overrides into NotificationReaderService * feat(theme): add synchronous theme lookup by ID in ThemeRepository * fix(service): refine notification listener status check and watchdog binding on permission grant * test(translators): add tests for registry priority, scope/condition matching, and regex extraction * feat(ui): Design Hub Translators Section, App Config Screen Integration, Multi-Filtering & Visual Editor (#346) * feat(translators): custom translators manager, visual editor, and app integration * feat(translators): add visual translator editor with live island preview * feat(translators): add translator manager screen with search and filtering * feat(design): add translators carousel to design dashboard * feat(settings): integrate app-specific custom translator controls in app config * feat(service): expose NotificationReaderService instance for channel querying * feat(translator): presentation modes, theme binding, and progress editor enhancements * feat(translator): theme binding and installed themes support in editor and live preview * feat(translator): presentation mode, template, widget, and icon slot selection sheets * feat(translator): text template fields with dismissable variable chips and quick insertion * feat(translator): progress slot type selector, regex presets, and progress guide sheet * feat(i18n): string resources for presentation modes, themes, and progress configurations * feat(translator): inline reply action source and dynamic button configuration UI * feat(translator): add inline reply action source and broadcast handling * feat(ui): redesign translator action slot editor into action buttons with reordering and visibility toggling * feat(ui): add bottomsheet option pickers for action sources, smart types, display modes, and action guide * feat(i18n): update translator string resources and spanish translations for action buttons * feat(translator): overhaul behavior settings UI with engine mode selection and guide sheet * feat(translator): add engine selection and behavior guide bottom sheets * feat(translator): redesign behavior screen with sectioned cards and timeout sliders * feat(i18n): add English and Spanish strings for behavior guide and engine settings * feat(translator): compact pill customization, symmetrical island preview, and dynamic presentation * feat(translator): add compact pill config models and dynamic presentation logic * feat(ui): add pill customization editor, symmetrical preview layout, and selection sheets * feat(i18n): add English and Spanish string resources for compact pill settings * feat(translator): add HyperOS 3 island preview components and enhanced action handling * feat(ui): add HyperOS 3 expanded island and compact pill Compose components with previews * feat(ui): integrate interactive island preview switcher (expanded/compact pill) into translator editor * feat(translator): add progress bar, timer, theme highlight override, and themed action icon handling in `DynamicTranslator` * feat(translator): expand presentation template presets and update string resources * feat(translator): custom icon selection and execution priority editor sheets * feat(translator): add `iconName` property to translator metadata model * feat(translator): add icon selection and execution priority bottomsheets with presets and guide * feat(translator): render custom translator icons in editor and manager lists * refactor(translator): remove preview shell from conditions content * feat(translators): add advanced filter sheet, dynamic scope icon badges, and state sync * feat(translators): introduce multi-criteria filter bottom sheet for filtering by scope, notification types, apps, authors, and icons * feat(ui): update translator items and previews across screens with scope-colored icon badges and metadata chips * fix(translators): sync enabled status and priority updates back into translator JSON content * feat(translator): implement specialized dynamic templates, diagnostics integration, and allowlist bypass * feat(translator): add dynamic layout templates for media, calls, timers, progress, and standard notifications in `DynamicTranslator` * feat(translator): support avatar, sender, and large icon extraction for custom left slot graphics * feat(service): evaluate custom translators before type enablement checks and bypass app allowlist for targeted packages * feat(ui): integrate custom translator configurations and latest applied status into bug reports and diagnostics screens * feat(translator): update translator registry to evaluate notification types alongside categories for accurate scope matching * feat(translator): introduce system apps target scope and library allowance evaluation * feat(translator): add `SYSTEM_APPS` target scope and `isLibraryAllowed` matching logic in translator registry * feat(translator): split user launcher apps and system apps loading with dedicated selection bottom sheets in editor * feat(service): update notification reader to process custom translators for explicitly targeted system apps * feat(ui): add system apps scope color mappings, filter options, and metadata chips across manager and design screens * feat(i18n): add English and Spanish string resources for system apps scope and filters * Merge branch 'dev/0_6_0' into feature/271-custom-translators-framework (#347) * `test(ui)`: add preview for disconnected service state in DiagnosticsScreen Adds `DiagnosticsScreenReconnectServicePreview` to allow previewing `DiagnosticsContent` when notification access is granted but the service is disconnected (`serviceConnected = false`). * fix: permanent island yields to a native island for its declared lifetime, not a flat 30 s (#335) (#337) * fix: permanent island yields to a native island for its declared lifetime, not a flat 30 s (#335) HyperOS 3 draws two islands side by side, the second one as an app-icon bubble. Re-posting the permanent island 30 s after a native island appears (#304) therefore shows a HyperBridge bubble next to any long-running native island such as the Clock stopwatch. Read the native island's own lifetime instead: Xiaomi's protocol declares param_v2.param_island.islandTimeout in seconds with a documented default of one hour. NativeIslandYieldPolicy turns a focus param into a yield window (declared timeout, 1 h default, 0 without param_island, 30 s for MediaStyle players and unreadable payloads), NativeIslandTracker keeps that window per sighting, and the re-assert timer now follows the remaining windows when a native island is forgotten. * fix: permanent island also yields to bridged islands on HyperOS 3 (#335) #243 kept the permanent island posted underneath bridged islands so it was revealed the instant they collapsed. HyperOS 3 draws two islands at once, the older one as a mini island with only the app icon, so the posted pill becomes a HyperBridge bubble next to every WhatsApp island. Route PermanentIslandManager.desiredActive() through the existing PermanentIslandVisibilityPolicy, which already requires no active bridged island, widget island or VPN island. * fix: time-limit the yield only for media players, other islands hide the pill while posted (#335) Review feedback on #337: HyperOS turns every notification that carries a MediaSession into an island player, so those are the only islands whose notification outlives the island (a paused player, #255) and the only ones that keep the short 30 s window. Any other native island now hides the permanent island for as long as its notification is posted; the only bound is the island lifetime it declares to HyperOS (param_island.islandTimeout, default 1 h), after which HyperOS has already dropped the island. - NativeIslandYieldPolicy: media wins over a focus param; an unreadable focus param means "hide until removed" instead of the old flat window. - NotificationReaderService: a media player is a MediaStyle template, a notification with a MediaSession token, or one carrying miui.focus.param.media. --------- Co-authored-by: noelpatata2 <[email protected]> --------- Co-authored-by: noelpatata2 <[email protected]> Co-authored-by: noelpatata2 <[email protected]> * feat(translator): import, export, and share functionality for custom translators (#350) * feat(translator): introduce `TranslatorRepository` for packaging, extracting, and sharing `.htrans` archives (JSON and icons) and raw JSON files * feat(ui): add SAF-based import/export launchers and intent-based sharing actions to the translator manager screen * feat(theme): automatically discover and import bundled custom translators when processing themes * feat(i18n): add string resources for import, export, and sharing feedback messages --------- Co-authored-by: noelpatata2 <[email protected]> Co-authored-by: noelpatata2 <[email protected]>
…tions (#369) Introduce `RAW_PARAM_V2` presentation mode to allow Custom Translators to provide direct JSON payload templates for HyperOS. - `CustomTranslator`: add configurations for custom variables (regex extraction, image sources, step mapping), custom actions (smart extraction, inline replies), and `RawParamV2Config`. - `DynamicTranslator`: process custom variable and action extraction logic, including fallback chain evaluation for templates (e.g., `{notif.title | notif.text ?: 'Default'}`). Add validation and normalization for raw JSON templates and bundle assets dynamically. - `HyperOsIslandPreview`: support parsing and previewing raw JSON templates to reflect dynamic values in the UI. - `TranslatorEditorScreen`: adapt UI for `RAW_PARAM_V2` by showing a banner and hiding standard presentation configuration tabs (Pill, Progress, Actions) since they are handled within the JSON template. - Add serialization, fallback chaining, and JSON validation tests.
For MESSAGE islands the tap is routed through our own broadcast so we can cancel the source notification afterwards. That makes HyperBridge, not the system, the *sender* of the app's content PendingIntent. Since API 34 a sender no longer lends its background-activity-launch privilege unless it opts in via ActivityOptions, and since API 35 the creator denies it by default. Google Messages targets 35+, so its launch was silently dropped while the cancel still ran: notification gone, app not opened, message still unread. WhatsApp only worked because it still targets an older SDK. Opt in with MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS (ALLOWED below API 36) when sending the original intent from the click receiver. Co-authored-by: noelpatata2 <[email protected]>
The "Hyper Bridge / Active Islands" summary is only released from onNotificationRemoved, and that callback only arrives while the listener is bound. Anything that takes the last island down outside that window -- a reboot, HyperOS killing the service, an app update, stop() cancelling the VPN island as the service dies -- leaves the summary behind with nothing under it, and the orphan sweep in syncNotifications skips summaries on purpose. On HyperOS the Focus children are hidden from the shade, so that orphaned summary is the only row left: it reads as an island that never goes away and cannot be dismissed without turning the whole group off. Make the summary a function of what is actually posted instead of a function of the events we happened to see: - BridgeIslandGroup.reconcile() releases the summary when no child is left and re-posts it when children outlive it (swiped-away summary, process death between the two posts). syncNotifications calls it, so it runs on listener connect and on every sync tick. - The VPN controller and the permanent island schedule the release right where they cancel, since both cancel while the service is going down. The release stays debounced, so a Shizuku cancel+repost of the only child is still not mistaken for an empty group. Co-authored-by: noelpatata2 <[email protected]>
Update `versionName` to "0.6.0-beta1" in `app/build.gradle.kts`.
…rt timer (#379) Since #337 a focus island can hold the permanent island for its declared lifetime (up to an hour), so NativeIslandTracker's wall clock matters: a timezone change, manual edit or NTP step inside the window stretched or cut it short, and the window never self-heals because note() keeps the first-seen time. It now defaults to elapsedRealtime. nativeYieldJob is rescheduled from listener callbacks and from the IO sync loop; the cancel/replace is now done under a lock so a timer can't be orphaned between them. Co-authored-by: noelpatata2 <[email protected]>
…#380) * Revert "fix: drop the island group summary once no island is left (#372) (#373)" This reverts commit 435b0bf. * Revert "fix: only group bridged islands on Android 16+, where force grouping exists (#358) (#368)" This reverts commit 7fe8c03. * Revert "fix: keep bridged islands in one app group so Android 16+ cannot force-group and silence them (#331) (#334)" This reverts commit 2c0d183. --------- Co-authored-by: noelpatata2 <[email protected]>
…follow-up) (#377) VpnIslandController.disconnect() sent the provider's disconnect PendingIntent from our receiver without the BAL opt-in #366 added for the message island tap. OpenVPN for Android's disconnect is an activity (DisconnectVPN), so on Android 15+ the launch was dropped silently, send() did not throw, and the island sat on "disconnecting" until the verify timeout. Both call sites now share PendingIntent.sendAllowingBackgroundLaunch(). Co-authored-by: noelpatata2 <[email protected]>
…aomi templates (#272, Phase 4) (#327) * feat(composer): add island template model, Room persistence, matcher and translator Phase 4 (#272) data layer: ComposerTemplate/IslandTemplateDefinition model covering the 10 Xiaomi templates and their slots (left graphic, text, progress, buttons, rule), a Room-backed repository with a hand-written 1->2 migration (avoids destructive fallback wiping settings), a pure ComposerTemplateMatcher cloned from RulesEngine, and a ComposerTemplateTranslator hooked into NotificationReaderService just before the built-in translator dispatch. A matched template now wins over native Live Updates and the built-in per-type translators for STANDARD/MESSAGE/PROGRESS/DOWNLOAD/MEDIA notifications. Co-Authored-By: Claude Fable 5.1 <[email protected]> * test(composer): add matcher and repository unit tests Covers package/title/text regex matching, priority ordering, disabled templates, invalid-regex safety, and JSON round-tripping every field of IslandTemplateDefinition through the Room repository (fake in-memory DAO, matching this repo's existing testing conventions). ComposerTemplateMatcher is kept free of android.util.Log so it stays plain-JUnit testable. Co-Authored-By: Claude Fable 5.1 <[email protected]> * feat(composer): add island template composer UI and DesignScreen entry point Phase 4 (#272) Compose layer: a shared IslandTemplatePreview live pill plus 10 default-definition catalog wrappers for the Xiaomi templates, slot editors (left graphic, text/badge, progress, action buttons, rule binder with an app picker + advanced regex toggle), IslandComposerScreen (type switcher + live preview + gated editors + save), and ComposerTemplateListScreen (list/enable/delete), wired into DesignScreen and HomeScreen's hand-rolled route enum alongside the existing Widgets/Themes flows. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(composer): make ComposerTemplateMatcher regex cache thread-safe NotificationReaderService dispatches each notification onto Dispatchers.Default (a real thread pool), so this singleton's regex cache can be hit concurrently by multiple notifications. Switch the plain mutableMapOf to a ConcurrentHashMap to avoid data races on the 24/7 service path. Co-Authored-By: Claude Fable 5.1 <[email protected]> * feat(design): island templates as translator presentations (#272, Phase 4) Rework of the Composer along the lines David asked for in #327: templates are not a feature of their own any more, they are presets for the Phase 3 translator pipeline, and every preview goes through the component added for TranslatorScreen. - IslandTemplateCatalog: the ten official Xiaomi templates as named PresentationConfig presets. Reuses the ids the editor's picker already offered (so tpl_call_kit / tpl_media_compact keep the meaning DynamicTranslator gives them) and adds the two that were missing, boarding pass and courier tracking. Picking one produces an ordinary CustomTranslator with presentation.mode = TEMPLATE, so templates inherit matching, priority, theming and .htrans import/export instead of a parallel store. - HyperOsIslandPreview gains an IslandPreviewSample (so each template previews with content that suits it), a showChrome flag for thumbnail use, and resolves TEMPLATE presets before rendering. The three copies of the token replacement chain collapse into one helper, which also fixes the compact pill showing a raw {notif.title}. - Design tab: a Designs section listing the active designs, and Add design -> from a template (gallery of the ten, each previewed) or a custom design, which stays disabled until the Widget Studio lands. After picking a template the only question asked is the notification type. - Translator editor: the template sheet is the same gallery, and picking a template now also opens the slot editors, so each element can be bound to notification data alongside the match conditions already there. - DynamicTranslator fills the slots from the preset for a translator that only carries a templateId, so an imported .htrans renders as its template. Tests: 12 new IslandTemplateCatalog cases; :app:testDebugUnitTest is 416 green and :app:assembleDebug builds. * fix(design): templates are materialized once, then rendered exactly as saved (#272) effectivePresentation() merged the preset slot by slot, comparing each whole slot to the class defaults, and refilled an empty action list from the preset. Two silent losses: editing one text field of a translator that still carried a bare templateId dropped the preset's other fields (the payment template's highlight / OTP text), and deleting a preset's only action brought it back on every render. A template is now either bare (only a templateId: rendered as the preset) or concrete (rendered as saved). The editor materializes it when a translator is loaded, when the mode is switched to TEMPLATE, and when a template is picked (applyTemplate), so every edit and deletion sticks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(design): payment template highlights the OTP the translator actually extracts (#272) The preset used {regex.1}, which nothing in DynamicTranslator's variable map ever fills, so the payment island's highlight / pill text rendered blank. It now uses {smart_action.OTP.code}, filled by the existing OTP extraction. A test pins every preset to variables the translator provides. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: noelpatata2 <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: noelpatata <[email protected]>
…el, and Guides section (#383) * feat: add dedicated Design Manager screen and update design dashboard layout - Add `DesignManagerScreen` to allow browsing, searching, previewing, importing, exporting, and managing island designs. - Replace `DesignsCarousel` on `DesignScreen` with a `DesignStatusCard` summary card that navigates to the new manager screen. - Track previous route in `HomeScreen` to return to either the Design Manager or Translator Manager after design editing. - Add vertical scrolling to notification type selection in `AddDesignFlow`. - Add localized strings for design management features. * feat: replace carousels with status cards on design screen - Replace theme, widget, and translator carousels on `DesignScreen` with summary status cards and action buttons. - Update notification type selection in `AddDesignFlow` to use a 2-column grid layout with type icons and suggested tags. - Add required string resources for status cards and suggested badges. * feat: update design screen layout to a bento grid Replace status cards for themes, widgets, designs, and translators in `DesignScreen` with a compact bento grid layout (`DesignVariantBento`), and add string resources for layout variants. * feat: add featured carousel and guides sections to design screen - Add `FeaturedSection` and `GuidesSection` to `DesignScreen` for showcasing featured content and documentation links. - Define documentation URL constants in `DocumentationUrls.kt`. - Add localized string resources for new sections in English and Spanish. * ui: refine template card layout and tag placement in AddDesignFlow - Set a minimum height of 142.dp on design template cards. - Restructure card layout with a fixed top slot for the "Suggested" tag to maintain consistent icon alignment. - Adjust vertical spacing and padding within the template card.
…feedback) (#385) Salvaged from #384 on top of #383: each official template gets a TemplateCardLayout (style, progress, hint button, Xiaomi accent) and the preview renders a TemplateFocusCard modelled on the HyperIsland ToolKit demo instead of the generic expanded island. Used by the template gallery, the translator editor and My Designs. Co-authored-by: noelpatata2 <[email protected]>
…nize DesignManager UI (#389) * feat: add per-app custom design management and package exclusion support - Add `excludedPackages` field to `CustomTranslator` model and enforce exclusions in `TranslatorRegistry`. - Add `getDesignsForApp` and `toggleDesignForApp` methods to `TranslatorViewModel` to toggle designs per package. - Replace custom design placeholder in `AppConfigScreen` with `AppDesignsSectionCard` for managing app designs. - Update `DesignPreviewCardItem` to support explicit checked state overrides. * fix(design): show notification type designs on app config screen and wire add design flow * feat(design): separate design items and add search & filter to app config design subscreen * feat(design): add preview visibility toggle button on app config design subscreen * feat(app-config): add filter bottom sheet for custom designs * feat(design-manager): show AddDesignFlow bottom sheet on add fab and empty state * feat(design): modernize add fab bottom sheet with m3 expressive design * feat(design-manager): move explanation to help bottom sheet invoked by top bar info icon * feat(app-config): add help info action to design subscreen top bar
D4vidDf
merged commit Sep 25, 2026
7832f19
into
feature/273-feature-kwgt-style-micro-widgets-studio-spatial-island-builder-phase-5
4 checks passed
📱 Debug APK Ready for TestingThe debug APK for commit
|
noelpatata
added a commit
to noelpatata/HyperBridge
that referenced
this pull request
Sep 25, 2026
Takes David's D4vidDf#390/D4vidDf#391 versions of the composer, Design hub and 0.6 service code, and re-applies only the Studio (D4vidDf#273) changes on top: - Design Manager opens WIDGET-mode designs in the Studio instead of the translator editor - dropped the leftover BridgeIslandGroup.scheduleRelease calls (the group was reverted in D4vidDf#380) - Room stays v2 upstream + our v3 (source tables) / v4 (composer test builds) migrations Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.