Skip to content

feat: migrate to Nucleus 2.0, Compose 1.11, Jewel 0.37#443

Open
kdroidFilter wants to merge 15 commits into
masterfrom
feat/nucleus-2-compose-1.11-upgrade
Open

feat: migrate to Nucleus 2.0, Compose 1.11, Jewel 0.37#443
kdroidFilter wants to merge 15 commits into
masterfrom
feat/nucleus-2-compose-1.11-upgrade

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

Summary

  • Migrate all Nucleus dependencies from io.github.kdroidfilterdev.nucleusframework (v1.14.2 → 2.0.0-alpha)
  • Replace application {} + manual SingleInstanceManager + AotRuntime with nucleusApplication { aotTraining(duration) }; deep-link single-instance bridge replaced with onDeepLink {}
  • Split nucleus-decorated-window into three artifacts: core, tao, jewel
  • Bump Compose 1.10.3 → 1.11.0, Jewel 0.35 → 0.37, IntelliJ Platform Icons 253 → 262
  • Add LocalTextContextMenu capture workaround for Jewel 0.37 / Compose 1.11 NoSuchMethodError on TextManager.getCut()
  • Move window minimumSize from LaunchedEffect to JewelDecoratedWindow declarative param
  • Fix Key.HomeKey.MoveHome for Alt+Home navigation shortcut
  • Host SettingsWindow inside JewelDecoratedWindow scope to satisfy Nucleus 2.0 NucleusApplicationScope receiver

Test plan

  • App launches and reaches main window (no crash on startup)
  • Single-instance enforcement: opening a second instance focuses existing window and relays deep link
  • AOT training mode exits after ~45 s
  • Settings dialog opens and closes correctly
  • Alt+Home (Windows) / Cmd+Shift+H (macOS) navigates to Home tab
  • Window cannot be resized below 600×300
  • Dark/light theme switch works (darkmode-detector still functional)
  • Native menu bar (macOS), jump list (Windows), quicklist (Linux) still render

- Rename all nucleus deps from io.github.kdroidfilter → dev.nucleusframework
- Replace application{} + SingleInstanceManager + AotRuntime with nucleusApplication { aotTraining() }
- Replace manual deep-link single-instance bridge with onDeepLink {}
- Split nucleus-decorated-window into core + tao + jewel artifacts
- Add LocalTextContextMenu workaround for Jewel 0.37 / Compose 1.11 NoSuchMethodError
- Move window minimumSize from LaunchedEffect to JewelDecoratedWindow param
- Fix Key.Home → Key.MoveHome for Alt+Home shortcut
- Bump Compose 1.10.3 → 1.11.0, Jewel 0.35 → 0.37, IntelliJ icons 253 → 262
Remove sortedBy calls in source panels that were overriding SQL ORDER BY ranking.
Ensure sources appear in declared-base priority order: Tanakh → Mishnah → Bavli →
Yerushalmi. Dedup source lines in TOC heading selections. Update to SeforimLibrary
with improved source ranking and density-based link chaining.
Replace large pre-computed maps in cataloggen with hybrid approach:
- Slim down generated CatalogPresets.kt from 41 KB to 6 KB (IDs and dropdown specs only)
- Introduce CatalogAccess for lazy-loaded catalog access with display transformations
- Apply Talmud prefixing for Bavli/Yerushalmi, book filtering, and ancestor label stripping
- Embed TocQuickLink data directly in TocQuickLinksSpec instead of separate maps
- Reduce memory footprint and eliminate drift risk from stable DB IDs

Benefits: JAR -35 KB, -1-3 MB RAM, centralized display logic, fully testable transformations.
Performance: ~30-80ms one-shot build on first catalog access.
- Revert Compose 1.11.0 → 1.10.3 (restores compatibility with Jewel 0.35 API)
- Remove LocalTextContextMenu workaround added for Jewel 0.37/Compose 1.11 NoSuchMethodError
- Restore Key.Home for Alt+Home shortcut (reverts Key.MoveHome change)
- Revert ContextMenuItem constructor to pre-1.11 signature (label, action)
- Ship systemTheme.svg locally since IntelliJ icons 262 dropped it; use PathIconKey
- Keep Nucleus 2.0, Jewel 0.37, minimumSize on JewelDecoratedWindow (Nucleus API)
The java.awt.Cursor was a temporary constraint during the Compose 1.11
migration attempt. Revert to skiko.Cursor which is the proper import.
The scroll position saving logic used Flow.sample(200) to periodically
persist position during active scrolling. However, fixedPeriodTicker (used
internally by sample) ticks continuously even when the flow doesn't emit,
causing 5 Hz wakeups of the FlushCoroutineDispatcher on every tab's
BookContentView composable. Each wakeup triggered a frame redraw, leading
to 10-15 redraws/sec at idle (confirmed by JFR profiling).

Gate the sample ticker behind isScrollInProgress so the ticker only exists
during active scroll, terminating with emptyFlow when idle. This eliminates
the continuous frame invalidation.

Also:
- Add .catch {} to all flow.collect chains to prevent unhandled exceptions
  from killing LaunchedEffect scopes
- Auto-format via ktlint
- Pass 1: explicit corpus anchors (על התלמוד, על התנ״ך) have top priority
- Pass 2: hard-coded families (חברותא, מילונים, מחברי זמננו)
- Pass 3: מפרשים detection with upstream ראשונים resolution to corpus
- Pass 4: bare ראשונים/אחרונים with corpus ancestor lookup and ה-prefixing
- Add integration test verifying cross-corpus commentators excluded from Talmud
- Fix: rif/rosh sub-commentaries now correctly roll up to ראשונים על התלמוד
- Fix: ensure proper corpus labels (התלמוד, התנ״ך) instead of bare corpus names
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.

1 participant