Compare commits

...
334 Commits
Author SHA1 Message Date
waozi 727eaa1f72 Release Inbe 2.0.2 2026-09-20 19:15:20 -03:00
waozi 0d1a7c12f8 Save habit editor polish, sync probe, and design captures 2026-09-20 18:24:58 -03:00
waozi e50f8d1e7b Make browser swipe smoke resilient to slow frames 2026-09-20 17:57:10 -03:00
waozi 0024cd84ef Reset navigation once for Lists layout update 2026-09-20 17:36:32 -03:00
waozi 2c673ada7f Stabilize carousel swipes in web smoke test 2026-09-20 17:28:42 -03:00
waozi 5efa30658b Keep Node available in web CI and site builds 2026-09-20 17:04:48 -03:00
waozi 35f7807d40 Align web loading and icons with meditation logo 2026-09-20 16:50:56 -03:00
waozi f03acd1d06 Pin CI sync server to device registration support 2026-09-20 16:27:17 -03:00
waozi ba0c1efa73 Clarify device theme and interface scale labels 2026-09-20 16:05:23 -03:00
waozi 060f7dbc9a Keep practice images neutral across themes 2026-09-20 15:58:44 -03:00
waozi b862f62ec3 Use Kryon navigation layout and simplify settings rows 2026-09-20 12:52:20 -03:00
waozi 9e9d0c49cc Fix canvas artifacts and center meditation circle labels 2026-09-20 11:40:08 -03:00
waozi 43ab976379 Keep canvas guide aligned at scaled viewports 2026-09-20 11:15:47 -03:00
waozi 7c1c87ec7a Keep Node executable available in web release jobs 2026-09-20 11:00:56 -03:00
waozi ae852f168e Bypass proxies in local sync recovery test 2026-09-20 10:36:06 -03:00
waozi b253620fb7 Check current Inbe embedded assets in CI 2026-09-20 10:24:56 -03:00
waozi dee24910bd Migrate legacy navigation once and fix clean CI builds 2026-09-20 10:12:56 -03:00
waozi d5fdb4ec28 Fetch Kryon for CI version checks 2026-09-20 10:03:56 -03:00
waozi bc29d46e53 Release Inbe 2.0.0 with reliable profile recovery 2026-09-20 10:02:47 -03:00
waozi 7ce52bd753 Redesign session results around the round chart 2026-09-19 21:06:01 -03:00
waozi dd62b60496 Smooth Customize preview and correct scrollbar thumb 2026-09-19 20:03:11 -03:00
waozi f47c5c1345 Fix Customize modal and scrollbar behavior 2026-09-19 19:25:43 -03:00
waozi 5c3b4945ee Fix Customize scroll interactions 2026-09-19 19:10:01 -03:00
waozi 7224e76310 Fix Customize scrolling on Android 2026-09-19 18:46:50 -03:00
waozi 2467615bb3 Fix WHM customize layout on phones 2026-09-19 17:57:28 -03:00
waozi 0350f52640 Fix Customize scrolling and action placement 2026-09-19 17:24:58 -03:00
waozi d793416c61 Prepare Inner Breeze 2.0.0 release 2026-09-19 17:14:05 -03:00
waozi f390f6f587 Polish Customize and About support screens 2026-09-19 17:04:21 -03:00
waozi d924f4125f Keep Settings layout consistent across breakpoints 2026-09-19 16:38:00 -03:00
waozi 6ec903d67e Resolve responsive navigation from the full viewport before laying out content 2026-09-19 16:15:19 -03:00
waozi 83b08d2d3b Anchor practice controls above navigation and preserve the image fade 2026-09-19 16:09:17 -03:00
waozi cba84c24b0 Add breathing room above list bottom navigation 2026-09-19 15:58:05 -03:00
waozi babf23e499 Unify settings navigation and preserve empty lists and account identity 2026-09-19 15:49:04 -03:00
waozi c45d5db712 Center list text and hide completed items behind a bottom toggle 2026-09-19 15:28:43 -03:00
waozi 336e4e95ee Use the shared Kryon scale slider with readable values and step controls 2026-09-19 15:09:24 -03:00
waozi 30a9a56b37 Enable Android material rendering cache to reduce UI lag 2026-09-19 14:13:11 -03:00
waozi c6592f670f Use a pale blue background for masked app icons 2026-09-19 13:13:27 -03:00
waozi 4380b0211b Update translated practice guidance and inherit arrow button styling 2026-09-19 13:13:14 -03:00
waozi 5b5572e822 Fix guide placement and keep glow specific to Lightfield 2026-09-19 13:12:26 -03:00
waozi f13ad7eae6 Prove sync retry policy with Bend and enforce build contracts 2026-09-19 12:18:05 -03:00
waozi 7a88e3df9e Move Inbe application logic to Kryon and refresh the app
Move product behavior, app types, storage, audio, and tray logic into .kry modules. Use shared Kryon widgets, layout policies, asset-backed images, and app KSS styling with a smaller native boundary.

Include the pending navigation, sync recovery, localization, launcher icon, design asset, and 2.0.0 release metadata updates. Add version consistency checks and improve browser persistence and interaction validation.
2026-09-19 11:58:09 -03:00
waozi ad2bb49238 Use Kryon with mandatory compiler laws 2026-09-19 11:51:52 -03:00
waozi 2cbad01e93 Update Kryon with shared flex alignment 2026-09-19 11:35:03 -03:00
waozi c284ce8274 Read the canonical version when checking site download links 2026-09-19 11:34:42 -03:00
waozi 79154be186 Preserve the released meditation audio URL in site builds 2026-09-19 11:34:26 -03:00
waozi b6fcfc21b7 Package meditation audio for website-only deployments 2026-09-19 11:31:13 -03:00
waozi 91a6e99df2 Allow website updates to reuse the published Inbe web app 2026-09-19 11:29:07 -03:00
waozi 2b44df84c9 Give Inner Breeze an illustrated editorial website 2026-09-19 11:21:19 -03:00
waozi c810e52642 Update Kryon renderer smoke fixes 2026-09-19 10:56:31 -03:00
waozi 6647f5fd8e Update Kryon generated style startup 2026-09-19 01:58:15 -03:00
waozi acb2fc9b3b Update Kryon release table emitter 2026-09-19 01:53:30 -03:00
waozi a965e5a6d4 Update Kryon release table gate 2026-09-19 01:45:15 -03:00
waozi fb3b1118e0 Update Kryon backend degradation reports 2026-09-19 01:39:37 -03:00
waozi 5784b9a7b9 Update Kryon native KSS source trace 2026-09-19 01:37:05 -03:00
waozi d5330f3973 Update Kryon Go style trace API 2026-09-19 01:33:53 -03:00
waozi 8773a00523 Update Kryon KSS host service ledger 2026-09-19 01:16:02 -03:00
waozi ed5d4875be Update Kryon KSS diagnostics coverage 2026-09-19 01:12:58 -03:00
waozi cd3cfe5f3f Update Kryon no-style render coverage 2026-09-19 01:06:54 -03:00
waozi 4c4bb6979d Update Kryon KSS diagnostics coverage 2026-09-19 01:03:42 -03:00
waozi 723fda6258 Update Kryon interaction policy coverage 2026-09-19 01:00:19 -03:00
waozi d13060afec Update Kryon typed style table checks 2026-09-19 00:54:42 -03:00
waozi d13eb27613 Update Kryon KSS formatter reflow 2026-09-19 00:49:15 -03:00
waozi f07bb2c3ac Update Kryon bridge ledger gate 2026-09-19 00:43:10 -03:00
waozi 58364d8efb Update Kryon style trace support 2026-09-19 00:40:06 -03:00
waozi af9b733f1d Update Kryon Go frame presence 2026-09-19 00:35:12 -03:00
waozi 1267cc9c92 Update Kryon active spec gates 2026-09-19 00:30:02 -03:00
waozi 1fd6be3618 Update Kryon Go prop shadowing 2026-09-19 00:22:21 -03:00
waozi 5cf75b5255 Update Kryon style law gates 2026-09-19 00:13:47 -03:00
waozi 4cd969e49c Quiet frame pacing timer logs 2026-09-19 00:03:13 -03:00
waozi 82aaa8e4b3 Use classic Kryon style pack 2026-09-19 00:02:13 -03:00
waozi 7dcaa9987e Update Kryon downstream scan 2026-09-18 23:53:20 -03:00
waozi f4fec780c2 Update Kryon downstream inventory 2026-09-18 23:50:43 -03:00
waozi b097ccc5df Smooth frame pacing activity grace 2026-09-18 23:49:28 -03:00
waozi 9e1df485bd Update Kryon ktrem recovery ledger 2026-09-18 23:48:46 -03:00
waozi b14f7cab65 Update Kryon matrix evidence ledger 2026-09-18 23:44:48 -03:00
waozi 01273e63b5 Update Kryon submodule 2026-09-18 23:43:25 -03:00
waozi de29b9ec3c Update Kryon style evidence ledger 2026-09-18 23:39:50 -03:00
waozi 0d6f18475e Update Kryon paused web evidence 2026-09-18 23:37:49 -03:00
waozi a6e15595ec Update Kryon tools package evidence 2026-09-18 23:35:21 -03:00
waozi c1f1462331 Update Kryon plan coverage ledger 2026-09-18 23:33:46 -03:00
waozi fe9600fe8b Update Kryon ownership ledger 2026-09-18 23:31:16 -03:00
waozi fa4be7a4b2 Update Kryon paused target docs 2026-09-18 23:27:15 -03:00
waozi 20ae8b4eca Update Kryon modal action layout 2026-09-18 23:18:19 -03:00
waozi 61c0d0ea2a Update Kryon paused web target 2026-09-18 23:09:17 -03:00
waozi b13fa53bd9 Update Kryon popup early exit parity 2026-09-18 23:00:07 -03:00
waozi ab21a5ee5d Update Kryon popup shortcut parity 2026-09-18 22:58:42 -03:00
waozi 46180bdcdd Update Kryon popup drag parity 2026-09-18 22:52:55 -03:00
waozi 45413e3bff Update Kryon context popup parity 2026-09-18 22:50:20 -03:00
waozi e9a4c56fe3 Update Kryon modal capture parity 2026-09-18 22:48:19 -03:00
waozi 4fbfa6f30f Update Kryon tree keyboard parity 2026-09-18 22:46:18 -03:00
waozi aaaf626ab5 Update Kryon rotated table resize parity 2026-09-18 22:42:06 -03:00
waozi 064fae5af0 Update Kryon dropdown edge parity 2026-09-18 22:40:04 -03:00
waozi ca8b1677f6 Update Kryon dropdown keyboard parity 2026-09-18 22:32:23 -03:00
waozi 9c8c06d1ee Update Kryon rotated table parity 2026-09-18 22:25:18 -03:00
waozi 47b529a894 Update Kryon table cell parity 2026-09-18 22:21:49 -03:00
waozi 48550f0e1c Update Kryon dropdown overlay parity 2026-09-18 22:14:45 -03:00
waozi 33cd6e3157 Update Kryon scroll offsets 2026-09-18 22:11:24 -03:00
waozi a7fef0f52b Update Kryon scroll parity 2026-09-18 22:08:50 -03:00
waozi 901805b7d3 Update Kryon composed popup parity 2026-09-18 22:00:03 -03:00
waozi 91c0cdf370 Update Kryon menu parity 2026-09-18 21:53:48 -03:00
waozi 98bb53259f Update Kryon drag drop parity 2026-09-18 21:41:39 -03:00
waozi 9466051b66 Update Kryon web input driver 2026-09-18 21:37:58 -03:00
waozi f4c9eda118 Update Kryon parity baseline 2026-09-18 21:33:39 -03:00
waozi 4051049fd7 Update Kryon runtime 2026-09-18 21:29:13 -03:00
waozi 8dacb6789a Fix desktop close-window Xvfb harness 2026-09-18 21:17:22 -03:00
waozi 99105c8655 Update vendored Kryon 2026-09-18 20:28:35 -03:00
waozi 111e0a56db Update vendored Kryon 2026-09-18 20:13:08 -03:00
waozi 6f12159e1a Update vendored Kryon 2026-09-18 20:00:49 -03:00
waozi deffd1cdba Update vendored Kryon 2026-09-18 18:56:14 -03:00
waozi 7e76bc8a14 Restore meditation circle and close prompt text 2026-09-18 18:06:36 -03:00
waozi 5417759974 Update Kryon for standalone generated array indexing 2026-09-15 18:24:56 -03:00
waozi 5cc65ceb82 Remove superseded C profile picture picker 2026-09-15 18:21:48 -03:00
waozi 258e60265f Use scrollable Kry picker with cat turtle and moon avatars 2026-09-15 18:21:36 -03:00
waozi 4ebb3b2dab Center Settings row labels and chevrons with their icons 2026-09-15 16:04:07 -03:00
waozi c8a5d216bb Update Kryon to fix transparent guide and modal panels 2026-09-15 15:52:14 -03:00
waozi 6be736192f Follow Kryon master after styling cleanup 2026-09-15 12:22:16 -03:00
waozi 781b1536ca Remove Vanilla from Appearance and default to Material 2026-09-15 12:21:01 -03:00
waozi 3d7445c0ca Update Kryon for current text input and focus fixes 2026-09-15 12:13:13 -03:00
waozi 482ca0cd46 Open the Settings overview from primary navigation 2026-09-15 10:12:10 -03:00
waozi 82ea299405 Update Kryon style rollout status 2026-09-15 10:03:36 -03:00
waozi cb09108156 Fix navigation and add themed style choices in Appearance 2026-09-15 10:03:10 -03:00
waozi 6e7b9884f6 Update Kryon keyboard policy and canonical runtime checks 2026-09-14 17:44:24 -03:00
waozi e79b6b9596 Update Kryon and finish the canonical widget migration
Bump vendor/kryon to master (651a82cda) and complete the move to the canonical Kryon widget surface with no legacy compatibility:

- Drop removed per-widget visual props (font/color/style); typography and colors resolve from the active Material style pack (new src/app/app_style.kry).

- Replace removed helpers with app-owned metrics in app.h (AppFontSize, AppTextWidth, AppParagraphHeight, AppTitleBarHeight, AppFitFontSize...).

- Convert imperative scroll scaffolds to declarative Scroll blocks; modals keep an app-owned clamped scroll.

- Icons resolve from embedded sheets via icon_type instead of app-loaded textures.

- Own the composed chrome widgets in src/app/app_widgets.c (modal frame, guide overlay, icon slider popup, bottom icon row, profile picture picker, reorder affordances) on public widgets only.

- Remove the theme_style setting and its persistence key; swipe/image enum names use canonical CamelCase.

- Test stubs updated to the current API; bottom-nav expectations track the Material nav height.
2026-09-14 15:58:21 -03:00
waozi 460ddbf847 Update Kryon icon size names 2026-09-12 00:22:38 -03:00
waozi 1a589b4ff9 Update Kryon swipe names 2026-09-12 00:21:44 -03:00
waozi 547fcd754f Update Kryon icon helpers 2026-09-12 00:19:12 -03:00
waozi c9aec322ae Update Kryon icon names 2026-09-12 00:17:02 -03:00
waozi a1db6006ac Update Kryon transition names 2026-09-12 00:13:22 -03:00
waozi 53393b482f Update Kryon semantic names 2026-09-12 00:10:23 -03:00
waozi de34680ee2 Document canonical Kryon image usage 2026-09-12 00:06:48 -03:00
waozi e10e3e716e Update Kryon checkbox rendering 2026-09-11 13:15:09 -03:00
waozi 0eea38fdd0 Update Kryon compact navigation bar 2026-09-11 00:53:01 -03:00
waozi 0238933e51 Update Kryon navigation bar API 2026-09-11 00:41:41 -03:00
waozi 7f719c7631 Update Kryon navigation runtime 2026-09-11 00:22:20 -03:00
waozi 3bf4288f64 Update Kryon toggle runtime 2026-09-11 00:17:02 -03:00
waozi a033748d87 Update Kryon toggle focus 2026-09-11 00:06:42 -03:00
waozi ed9ca9ec46 Use declarative social icons 2026-09-11 00:03:40 -03:00
waozi 8436b66d6b Use declarative Card blocks 2026-09-10 22:18:37 -03:00
waozi 9ed8b5e1f5 Adopt declarative Kryon Card API 2026-09-10 21:51:48 -03:00
waozi f9dd0209c4 Update Kryon vendor pointer 2026-09-10 14:39:38 -03:00
waozi d45d224f91 Keep frame pacing active for text input 2026-09-10 14:34:32 -03:00
waozi 08517097e7 Reset habit child routes on navigation 2026-09-10 14:19:20 -03:00
waozi c171836e86 Make habit expansion explicit 2026-09-10 14:12:32 -03:00
waozi 14dc8f46f2 Use Kryon Grid for habit cards 2026-09-10 13:54:38 -03:00
waozi 124223901e Fix habit day clicks and update Kryon APIs 2026-09-10 13:24:14 -03:00
waozi 1ee1e6223c Stop per-frame update and tray work 2026-09-10 12:54:53 -03:00
waozi a8bfce26a9 Refine navigation and habit card controls 2026-09-10 12:48:27 -03:00
waozi 78df44e946 Build Inbe native artifacts under the Inbe name 2026-09-10 11:38:33 -03:00
waozi 1b0f0f301a Use Kryon's consolidated modern dropdown 2026-09-10 11:30:15 -03:00
waozi 5f8492f8f7 Support navigation placement and collapsed rails with fitted guide images 2026-09-10 00:53:12 -03:00
waozi ef56c59207 Give desktop navigation room and use standard carousel buttons 2026-09-10 00:04:13 -03:00
waozi 8c7aaa4183 Remove the secondary task input from Lists 2026-09-09 23:18:21 -03:00
waozi 54b0144903 Inline thin button and toggle forwarding helpers 2026-09-09 23:11:33 -03:00
waozi ee3cf84e8d Use standard Kryon buttons throughout Inbe and show lists as tabs 2026-09-09 22:04:05 -03:00
waozi 6d67c320d4 Restore button interactions and keep desktop practices running unfocused 2026-09-09 21:16:56 -03:00
waozi 15715808b2 Update Kryon and build shared widget policies from canonical sources 2026-09-09 19:44:05 -03:00
waozi dbde235112 Port Android build to kryon master control styling
Bump vendor/kryon to k2kir 737ac56 and adapt inbe to the API it
brings: kryon's runtime button policy now ships as Kry modules that
the Android CMake build transpiles and links, ButtonStyle gave way to
ButtonTone/ButtonEmphasis, UIStyleTokens became ThemeMetrics, and
UIButtonRowItem became ButtonRowItem. StyledButton survives as an
inbe-side shim (src/app/styled_button.c) over the new Button API so
the 80 existing call sites keep one visual mapping. Kry constants
migrate off the removed '#define' syntax.

Also fix stale Android package references that crashed startup:
JNI registration looked for xyz.waozi.breathing.MainActivity, share
calls targeted the old ShareHelper name, the files directory pointed
at the pre-rename package, and the Makefile launch target used the
old app id.
2026-09-09 01:28:54 -03:00
waozi ea9280964d Fix habits tutorial targets 2026-09-08 15:17:29 -03:00
waozi 97a37e6cc8 Point practice guide at carousel controls 2026-09-08 15:13:13 -03:00
waozi 2887335be1 Fix selected navigation contrast 2026-09-08 15:08:02 -03:00
waozi 5c49391d3a Update Kryon tutorial guide rendering 2026-09-08 15:01:41 -03:00
waozi 9f7bb76455 Move shared app chrome to Kry 2026-09-08 13:50:27 -03:00
waozi 9e718e8e4b Move modal state management to Kry 2026-09-08 13:34:50 -03:00
waozi 52688313d4 Move deferred persistence to Kry 2026-09-08 13:32:06 -03:00
waozi f5e843de98 Move app host lifecycle to Kry 2026-09-08 13:26:52 -03:00
waozi 3696afcffb Move frame pacing policy to Kry 2026-09-08 13:24:43 -03:00
waozi 73a54f56c3 Move frame profiling to Kry 2026-09-08 13:23:04 -03:00
waozi 0ded03a8e3 Move donation reminder policy to Kry 2026-09-08 13:16:05 -03:00
waozi 55a60dc61d Move donation links to Kry 2026-09-08 12:35:23 -03:00
waozi 8d1c989312 Move URL routing to Kry 2026-09-08 12:32:08 -03:00
waozi 20382dd89d Move route state transitions to Kry 2026-09-08 12:15:00 -03:00
waozi ae4e110259 Use Kryon activity abstraction directly 2026-09-08 12:06:33 -03:00
waozi 58a0a2eb88 Adopt unprefixed Kryon platform APIs 2026-09-08 12:04:25 -03:00
waozi ff2b4e5b14 Rewrite EList storage in Kry 2026-09-08 11:46:51 -03:00
waozi 87d4f6a5c1 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	vendor/kryon
2026-09-08 11:26:12 -03:00
waozi 95e370b634 Move EList interfaces into Kry modules 2026-09-08 11:25:19 -03:00
waozi 26af3768f0 Sanitize default EList navigation 2026-09-08 10:34:44 -03:00
waozi 7f4935fe58 Rename app plumbing and remove bundled miniz 2026-09-08 10:34:16 -03:00
waozi 253f04ee46 Use Kryon frame pacing on Android 2026-09-08 09:18:55 -03:00
waozi 3c541b087f Reduce Android idle battery usage 2026-09-08 09:07:34 -03:00
waozi 9cc67b287c Separate habit reminders from practice notifications 2026-09-08 00:50:48 -03:00
waozi c59af4dc1a Remove old navigation and theme names 2026-09-08 00:26:37 -03:00
waozi 9ffc7e1490 Cache statistics mood aggregates 2026-09-08 00:07:29 -03:00
waozi 2097f8cb90 Cache linked habit session summaries 2026-09-08 00:05:04 -03:00
waozi 1c26a83989 Update Kryon reconcile performance fix 2026-09-07 23:58:04 -03:00
waozi ae93e11df3 Use clean habit expand chevrons 2026-09-07 23:44:45 -03:00
waozi 9634744036 Clean up settings toggle rows 2026-09-07 23:34:27 -03:00
waozi e339f1c616 Remove legacy stack nav menu 2026-09-07 23:29:02 -03:00
waozi 7c1dca9c6b Update Kryon text rendering fix 2026-09-07 23:23:31 -03:00
waozi 7502cb455c Polish desktop rail profile layout 2026-09-07 19:49:27 -03:00
waozi ffeb534ced Refine navigation profile behavior 2026-09-07 19:42:22 -03:00
waozi 6d3e76b160 Implement mobile settings hub 2026-09-07 19:10:28 -03:00
waozi eb7db35f0e Replace desktop settings drawer 2026-09-07 18:53:00 -03:00
waozi 45c89d2b8f Redesign desktop settings layout 2026-09-07 16:34:19 -03:00
waozi 71f976fa69 Fix desktop rail layout 2026-09-07 16:09:53 -03:00
waozi cb8efebcfd Update Kryon text alpha fix 2026-09-07 15:46:52 -03:00
waozi dbd68442cf Update Kryon profile picture atlas 2026-09-07 15:39:23 -03:00
waozi 3b33b9d3b6 Update Kryon drag click handling 2026-09-07 15:08:21 -03:00
waozi 70a623b11c Apply modern Kryon navigation defaults 2026-09-07 14:47:34 -03:00
waozi bd0dcef286 Move active practice title bar to Kry 2026-09-07 13:31:07 -03:00
waozi e9343dad76 Clean up stale app title declarations 2026-09-07 13:30:47 -03:00
waozi 80c754c053 Move Inbe entry point to Kry 2026-09-07 13:30:24 -03:00
waozi eab60dd4ac Match WHM guide spacing to Option B 2026-09-06 21:20:24 -03:00
waozi 2bf0d4920b Redesign practice guides with canonical Kryon UI 2026-09-06 19:48:08 -03:00
waozi 284b955e81 vendor: fix clean native package builds 2026-09-05 10:01:23 -03:00
waozi a3a27341f8 vendor: update Kryon CI-stable runtime 2026-09-05 08:39:36 -03:00
waozi 9790b7a9f2 vendor: stabilize Kryon web asset startup 2026-09-05 00:50:01 -03:00
waozi 2fa5f95253 vendor: update Kryon slider API and theme build 2026-09-04 21:06:12 -03:00
waozi 9b8da214ea release: prepare 1.9.19 2026-09-04 20:59:16 -03:00
waozi dbaa13d399 vendor: update Kryon held-key repeat 2026-09-04 20:58:21 -03:00
waozi dd63d00afe vendor: update Kryon to v0.1.48 2026-09-04 20:53:27 -03:00
waozi 1e8a1b15fa vendor: update Kryon to v0.1.47 2026-09-04 20:50:28 -03:00
waozi 5dc0d8a019 ui: update to latest Kryon icon runtime 2026-09-04 20:39:19 -03:00
waozi 6713feffd5 vendor: update Kryon to v0.1.45 2026-09-04 20:29:15 -03:00
waozi 285c7b1d6b vendor: keep indicator menus open during updates 2026-09-04 19:28:46 -03:00
waozi d3ff335f13 vendor: enable tear-free Kryon presentation 2026-09-04 19:24:59 -03:00
waozi c57c5ff5b3 vendor: smooth large Kryon circles 2026-09-04 19:20:07 -03:00
waozi 194d6d88ae Update Kryon for Windows close handling 2026-09-04 19:17:30 -03:00
waozi d0e011b9aa Document Windows close handling fix 2026-09-04 19:15:21 -03:00
waozi 359b0de16f vendor: enable Kryon anti-aliasing 2026-09-04 19:05:06 -03:00
waozi 8acc832404 ci: fix Windows and FreeBSD release builds 2026-09-04 18:48:41 -03:00
waozi 83ac5dfba1 release: prepare 1.9.18 2026-09-04 18:33:50 -03:00
waozi 9618237931 practice: add guides for every activity 2026-09-04 18:21:05 -03:00
waozi 370fea5bd3 ui: redesign Wim Hof how-to flow 2026-09-04 17:46:01 -03:00
waozi 30d86a2db4 Add swipe navigation to practice guides 2026-09-04 16:38:42 -03:00
waozi a81b741976 Use Kryon outlined buttons for Practice actions 2026-09-04 16:13:44 -03:00
waozi e24af8038a Refine Practice screen hierarchy 2026-09-04 16:03:21 -03:00
waozi b1aceaccf6 Fix Android build with shared Kryon image decoding 2026-09-04 15:36:48 -03:00
waozi d43384147c Update Kryon to latest master 2026-09-04 15:28:28 -03:00
waozi 0f28310634 Bring the legacy converter into the Inbe theme 2026-09-02 16:13:18 -03:00
waozi 2d261e369b Add a creative color system to the Inbe site 2026-09-02 15:30:39 -03:00
waozi c40e444a4f Expose direct Inbe platform downloads 2026-09-02 15:20:06 -03:00
waozi 4ad1792021 Expand Inbe downloads and modernize web icons 2026-09-02 15:14:43 -03:00
waozi d0d97fc3b8 Link Inbe production downloads 2026-09-02 14:58:42 -03:00
waozi 01fded007e Redesign the Inner Breeze website in blue 2026-09-02 14:51:30 -03:00
waozi fe878997f6 Fix GPlay bundle resource splits 2026-09-01 22:10:40 -03:00
waozi 6ee6e5b5ad Stabilize web smoke async hooks 2026-09-01 21:29:33 -03:00
waozi cc8e8a41bd Stabilize web smoke guide hooks 2026-09-01 20:45:25 -03:00
waozi 18daef3d69 Bump Kryon for KRB mount test fix 2026-09-01 20:13:56 -03:00
waozi 4fc9f7db00 Bump Kryon for app storage CI fix 2026-09-01 20:05:14 -03:00
waozi 61c372330c Support LAN Daochi sync in debug builds 2026-09-01 19:31:19 -03:00
waozi 93d0e881fc Guard miniz with a real include guard
The header used #pragma once, which the native Plan 9 toolchain does
not honor; a second inclusion in one translation unit redeclared every
enum value. The plan9 build no longer needs the wrapper header that
masked this.
2026-08-31 18:21:01 -03:00
waozi c41011ff4b Keep the source includes ahead of the generated ones 2026-08-31 18:10:41 -03:00
waozi 7631dfae28 Carry the generated src include for the project file 2026-08-31 18:01:04 -03:00
waozi 1f8e16e491 Build with the shared plan9 rules and resolve the data root from Kryon
The mkfile now includes kryon's mk/plan9-app.mk instead of carrying
its own copy of the recipe, and the data root falls back to
KryAppDataRoot so the per-platform path policy lives in the runtime.
2026-08-31 17:50:50 -03:00
waozi d262e9babb Bump the vendored Kryon for the nested literal plan9 fixes 2026-08-31 17:21:07 -03:00
waozi 4728ba8bec Type the member and struct copy locals for the plan9 pass 2026-08-31 17:08:54 -03:00
waozi 89343e0607 Type the generated habit name as text 2026-08-31 16:54:41 -03:00
waozi 4bcc744c8d Move site deployment to Cloudflare Pages 2026-08-31 16:48:31 -03:00
waozi 618a77f3a2 Type the mouse delta locals 2026-08-31 16:45:34 -03:00
waozi 272aea7bd4 Type the leaderboard metric selection 2026-08-31 16:36:42 -03:00
waozi 3a40c10336 Type the nav scrim as Color 2026-08-31 16:25:09 -03:00
waozi 843c908e0a Declare the viewport extents in app.h
The generated sources reference view_width and view_height; the
declarations lived in narrower headers, and the Plan 9 include order
no longer reaches them through the per-app shim the old rewriter
injected.
2026-08-31 16:00:59 -03:00
waozi 0a267df3f6 Generate the Plan 9 build with k2c --plan9
The vendored Kryon compiler now emits 8c-safe C directly, so the
per-project rewriter script is gone: kry-c-plan9 runs k2c with --plan9
across the kryon, sqlite, and generated include dirs, writes the
generated file list, and builds the embedded asset table. The handful
of declarations the pass cannot type (member pointers and ternaries
over locals) now carry explicit types in the Kry sources, which reads
better anyway and keeps every platform's generated code identical.
2026-08-31 15:50:41 -03:00
waozi 8aac9b7f53 Keep sqlite stubbed on Plan 9 and build the new storage sources
8c panics the kernel compiling the sqlite amalgamation even with
gigabytes of guest memory, so the stub stays and habit data is not
persisted on Plan 9 yet. The hand-written storage sources that moved
out of the Kry files (habits, materialization, sync, JSON builder) join
the build; the VFS and amalgamation rewrite stay in the tree for when
the compiler can handle them.
2026-08-31 13:56:44 -03:00
waozi 3cae1b8a57 Replace short compound literals for 8c
The native compiler rejects compound literals that initialize fewer
fields than the struct carries, so use zeroed locals for the empty
texture and rectangle arguments. Hosted behavior is unchanged.
2026-08-31 13:08:43 -03:00
waozi e36c1f0654 Flatten the sync progress bar initializer for 8c
Same nested designated compound literal problem as the donation modal;
build the props through a zeroed local struct.
2026-08-31 12:56:24 -03:00
waozi a0ca798cc9 Flatten the donation modal scroll area initializer for 8c
The native Plan 9 compiler cannot parse the nested designated compound
literal; assign the fields through a zeroed struct instead. Hosted
behavior is unchanged.
2026-08-31 12:44:50 -03:00
waozi 6911eb3f3e Exit cleanly from the mkfile host-preparation check
A plan9 rc if whose condition is false and that has no else branch
returns failure, so the check rule failed exactly when the preparation
was present. Finish with an explicit exit 0.
2026-08-31 12:18:56 -03:00
waozi d05f187772 Add a native Plan 9 mkfile and finish the port
- Build with a proper mkfile (mk install copies to /$objtype/bin) that
  compiles the host-prepared generated sources together with the real
  sqlite amalgamation and the Plan 9 VFS instead of the old sqlite test
  stub, and links the generated embedded-asset table instead of the
  empty placeholder, so the binary no longer reads assets, locales, and
  subset fonts from the source tree
- Drop the superseded plan9-build.rc, the empty asset stub, and the
  sqlite stub
- Resolve the data root from Plan 9's $home when HOME is unset, so the
  database and user files land in the user's home instead of the source
  directory
- Leave OGG sounds out of the Plan 9 embedded assets; the libdraw audio
  backend decodes WAV only and meditation music is stubbed
2026-08-31 11:57:17 -03:00
waozi 55abf4518f Move Inbe Waozi return link 2026-08-31 11:57:05 -03:00
waozi 4f53c58e1f Bump Kryon warning cleanup 2026-08-31 11:42:02 -03:00
waozi 55ac631cb8 Clean up app build warnings 2026-08-31 11:16:29 -03:00
waozi e142907078 Clean up settings import and nav startup 2026-08-31 10:49:18 -03:00
waozi 349e2e11d7 Update Inbe social preview assets 2026-08-31 10:48:43 -03:00
waozi a3e505228b Collapse input frame guard 2026-08-31 10:18:31 -03:00
waozi 0062f8daa9 Bump Kryon overlay capture tests 2026-08-31 10:06:28 -03:00
waozi 02c9086fc2 Use Kryon dismissible overlay for Stack 2026-08-31 10:00:42 -03:00
waozi 89c5b6775a Consume Stack sidebar close clicks 2026-08-31 09:53:19 -03:00
waozi 3e93770831 Bump Kryon Android DPI default 2026-08-31 09:49:20 -03:00
waozi c02bda07c7 Use Kryon Android viewport defaults 2026-08-31 09:44:30 -03:00
waozi f6ef1ea93d Reduce Inbe package sizes 2026-08-30 19:46:13 -03:00
waozi 6267a226be Remove itch.io README badge [skip ci] 2026-08-30 13:54:43 -03:00
waozi b48d9db866 Fix Android Kryon codegen host build 2026-08-30 13:37:19 -03:00
waozi 18e6cbb8a7 Release 1.9.17 2026-08-30 13:19:27 -03:00
waozi f935f547cb Smooth web habit toggles 2026-08-30 12:17:04 -03:00
waozi 09f97b5275 Update Kryon submodule 2026-08-30 10:34:49 -03:00
waozi 8795455af8 Remove bottom nav titlebar stub 2026-08-30 03:15:05 -03:00
waozi 64baee6962 Stub title bar in bottom nav test 2026-08-30 03:14:29 -03:00
waozi abe7d91db7 Fix bottom nav scaffold test link 2026-08-30 03:14:02 -03:00
waozi eb4bbb3987 Use Kryon screen scaffold helpers 2026-08-30 03:06:40 -03:00
waozi 59de2b7eea Limit Google services to Play Android build 2026-08-30 02:51:07 -03:00
waozi 13b7a95663 Make F-Droid Android release the default build 2026-08-30 02:39:58 -03:00
waozi b23e4fe58e Improve donation modal 2026-08-29 22:33:30 -03:00
waozi 665174edaa Release 1.9.16 2026-08-29 21:59:29 -03:00
waozi adea75fae4 Site: stop syncing the inbe icon from kryon (removed there); use the committed web-assets copy 2026-08-29 21:55:24 -03:00
waozi 654ef7d4f3 Site: lotus at dawn theme — dawn palette, rose accents, garamond + mono type
Same structure and behavior; only the theme changes:
- css/base.css: dawn neutrals (paper gradient, warm ink), fonts, teal links
- themes/inbe.css: rose accent family (#b46a5a) with warm per-platform hovers
- index.html: theme-color matches the dawn paper
2026-08-29 21:31:53 -03:00
waozi e1cb8dd110 Release 1.9.15 2026-08-29 14:48:09 -03:00
waozi e42b820db4 Release 1.9.14 2026-08-29 14:32:24 -03:00
waozi d5007ed418 Stabilize Firefox web smoke import check 2026-08-29 12:58:30 -03:00
waozi d6cc224c5a Update Kryon to v0.1.25 2026-08-29 12:48:02 -03:00
waozi 7cd4b40f3b Stabilize web release smoke test 2026-08-29 12:45:08 -03:00
waozi 941b1eaf36 Fix web release smoke test 2026-08-29 12:29:53 -03:00
waozi fb7d4be430 Use Kryon Android window insets 2026-08-29 12:28:56 -03:00
waozi c11dcf401a Release 1.9.13 2026-08-29 12:16:00 -03:00
waozi 7b01acf79b Use Kryon instance handling for desktop startup 2026-08-29 12:04:40 -03:00
waozi 748cea4772 Fix Android landscape insets 2026-08-29 11:59:43 -03:00
waozi 19ad6ab1a6 Add secure sync migration flow 2026-08-29 11:38:13 -03:00
waozi f98cc4a5a1 Release 1.9.12 2026-08-28 20:20:15 -03:00
waozi 624a7a83e1 Refactor habit storage and guide persistence 2026-08-28 17:51:53 -03:00
waozi cc03f1712a Release Inbe 1.9.11 2026-08-27 23:34:17 -03:00
waozi 8c8b74d9a2 Update Kryon app framework 2026-08-27 19:46:24 -03:00
waozi 0bc03b608d Update Kryon termi frame handling 2026-08-26 05:17:46 -03:00
waozi 74eaa050e0 Add termi screenshot regression test 2026-08-26 04:52:15 -03:00
waozi 2a549c25c8 Update Kryon termi thick lines 2026-08-26 04:39:59 -03:00
waozi cf9aada500 Advance WHM session by elapsed time 2026-08-26 04:27:59 -03:00
waozi 991d350721 Update Kryon termi sixel fallback 2026-08-26 04:22:32 -03:00
waozi 6708809da2 Update Kryon termi defaults 2026-08-26 03:48:29 -03:00
waozi cc615fbfd2 Update Kryon termi frame reset 2026-08-26 03:38:52 -03:00
waozi 31ccb43a81 Update Kryon termi viewport handling 2026-08-26 03:32:19 -03:00
waozi fafa84dc5d Update Kryon termi animation rendering 2026-08-26 03:21:30 -03:00
waozi 5893a652e3 Update Kryon termi frame pacing 2026-08-26 03:09:25 -03:00
waozi a2c901d178 Update Kryon termi shape rendering 2026-08-26 02:59:50 -03:00
waozi 2d89023775 Use shared circle click handling for WHM 2026-08-26 02:54:40 -03:00
waozi 52174dea04 Update Kryon termi click handling 2026-08-26 00:21:57 -03:00
waozi 5f91f75485 Update Kryon termi runtime speedups 2026-08-25 23:59:54 -03:00
waozi 007a77a171 Update Kryon termi button states 2026-08-25 23:42:35 -03:00
waozi ccafb682d9 Update Kryon termi sixel cache 2026-08-25 23:38:38 -03:00
waozi 465234ae66 Avoid relinking Inbe on termi launch 2026-08-25 23:35:52 -03:00
waozi 07f66a0155 Update Kryon termi click handling 2026-08-25 23:29:01 -03:00
waozi d27fd2d4ff Make Inbe terminal launch quiet 2026-08-25 23:23:48 -03:00
waozi 62af672f6a Add Inbe termi run target 2026-08-25 23:04:55 -03:00
waozi 9d42b70e46 Remove remaining Inbe TUI wiring 2026-08-25 22:43:47 -03:00
waozi 6eb502d09d Revert "Add Inbe TUI run target"
This reverts commit 4cad4f8599.
2026-08-25 22:42:52 -03:00
waozi 8136ea7c43 Revert "Bump Kryon TUI backend fix"
This reverts commit 674e2c39ff.
2026-08-25 22:42:52 -03:00
waozi 2f63bd0f2d Revert "Bump Kryon TUI scaling fix"
This reverts commit f3bda4ab45.
2026-08-25 22:42:52 -03:00
waozi f3bda4ab45 Bump Kryon TUI scaling fix 2026-08-25 22:38:57 -03:00
waozi 674e2c39ff Bump Kryon TUI backend fix 2026-08-25 22:34:43 -03:00
waozi 4cad4f8599 Add Inbe TUI run target 2026-08-25 22:30:47 -03:00
waozi 20ecd2954e Run Inbe with Kryon TUI backend 2026-08-25 22:28:12 -03:00
waozi 92e651fa24 Prepare X release posts from saved profile 2026-08-25 19:38:55 -03:00
waozi 0115ae1017 Add Inner Breeze social posting helper 2026-08-25 19:03:23 -03:00
waozi 687f5af9c0 Deploy Netlify site to production directly 2026-08-25 18:57:11 -03:00
waozi cf87438af5 Fix Netlify release deploy ordering 2026-08-25 18:53:51 -03:00
517 changed files with 42429 additions and 35705 deletions

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
scripts/check-secrets.py --staged
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
tmp=$(mktemp "${TMPDIR:-/tmp}/inbe-pre-push.XXXXXX")
trap 'rm -f "$tmp"' EXIT
cat > "$tmp"
if command -v git-lfs >/dev/null 2>&1; then
git lfs pre-push "$@" < "$tmp"
elif git lfs version >/dev/null 2>&1; then
git lfs pre-push "$@" < "$tmp"
else
printf '%s\n' "This repository uses Git LFS, but git-lfs is not available." >&2
exit 2
fi
scripts/check-secrets.py --pre-push "$@" < "$tmp"
+1
View File
@@ -1,2 +1,3 @@
build-essential
ripgrep
zlib1g-dev
+67 -13
View File
@@ -17,6 +17,27 @@ concurrency:
cancel-in-progress: true
jobs:
secret-scan:
name: Secret Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Check Version Consistency
run: |
python3 scripts/check-version.py
python3 tests/version_test.py
- name: Scan Tracked Files and History
run: |
set -euo pipefail
python3 scripts/check-secrets.py --working-tree
python3 scripts/check-secrets.py --history
guard-submodule-urls:
name: Submodule URLs are public HTTPS
runs-on: ubuntu-latest
@@ -41,7 +62,9 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
needs: guard-submodule-urls
needs:
- guard-submodule-urls
- secret-scan
timeout-minutes: 60
env:
APT_CACHE_DIR: /tmp/apt-cache
@@ -54,6 +77,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Test apt packages
uses: actions/cache@v4
with:
@@ -69,6 +97,25 @@ jobs:
- name: Run Tests
run: make test
- name: Check out sync test server
uses: actions/checkout@v4
with:
repository: kryonlabs/daochi
ref: 51902c57c537724cf4c083227f5da6c50e24ba39
path: .test-server
submodules: recursive
- name: Set up Go for sync test server
uses: actions/setup-go@v5
with:
go-version-file: .test-server/go.mod
cache-dependency-path: .test-server/go.sum
- name: Verify sync and recovery
run: |
make -C .test-server build
make sync-server-test DAOCHI_BIN="$GITHUB_WORKSPACE/.test-server/daochi"
build-chrome-extension:
name: Build Chrome Extension
runs-on: ubuntu-latest
@@ -85,6 +132,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Web apt packages
uses: actions/cache@v4
with:
@@ -97,11 +149,6 @@ jobs:
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Emscripten
run: |
set -euo pipefail
@@ -110,12 +157,14 @@ jobs:
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Chrome Extension ZIP
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make package-unpackaged-assets
make chrome-web-store
test -f build/dist/inbe-chrome-web-store.zip
@@ -123,11 +172,13 @@ jobs:
- name: Run Web Smoke Test
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
make web-smoke-test
- name: Run Canvas Web Smoke Test
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
make web-canvas
make web-canvas-smoke-test
@@ -147,6 +198,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Web apt packages
uses: actions/cache@v4
with:
@@ -159,11 +215,6 @@ jobs:
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Emscripten
run: |
set -euo pipefail
@@ -172,12 +223,14 @@ jobs:
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Firefox Add-on ZIP
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make package-unpackaged-assets
make firefox-addons
test -f build/dist/inbe-firefox-addons.zip
@@ -205,4 +258,5 @@ jobs:
LIBGL_ALWAYS_SOFTWARE: '1'
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
xvfb-run -a --server-args="-screen 0 1280x1024x24" make web-smoke-test-firefox
-134
View File
@@ -1,134 +0,0 @@
name: Netlify
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: netlify-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Site
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Install Packages
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set Up Emscripten
run: |
set -euo pipefail
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
"$HOME/emsdk/emsdk" install latest
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Site
run: |
set -euo pipefail
make site
test -f build/site/index.html
test -f build/site/build/web/index.html
test -f build/site/build/web/index.js
test -f build/site/build/web/index.wasm
make site-release-assets-check
env:
GH_TOKEN: ${{ github.token }}
- name: Upload Site Artifact
uses: actions/upload-artifact@v4
with:
name: inbe-site
path: build/site
if-no-files-found: error
deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Install Netlify CLI
run: npm install --global netlify-cli
- name: Deploy Preview To Netlify
run: |
set -euo pipefail
auth_token="$(printf '%s' "$NETLIFY_AUTH_TOKEN" | tr -d '\r\n')"
site_id="$(printf '%s' "$NETLIFY_SITE_ID" | tr -d '\r\n')"
netlify deploy \
--dir build/site \
--no-build \
--alias "pr-${{ github.event.pull_request.number }}" \
--message "Preview ${{ github.event.pull_request.number }}" \
--auth "$auth_token" \
--site "$site_id"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Package Site
run: |
set -euo pipefail
test -f build/site/index.html
cd build/site
python3 -m zipfile -c ../inbe-site.zip .
test -s ../inbe-site.zip
- name: Deploy Production To Netlify
run: |
set -euo pipefail
auth_token="$(printf '%s' "$NETLIFY_AUTH_TOKEN" | tr -d '\r\n')"
site_id="$(printf '%s' "$NETLIFY_SITE_ID" | tr -d '\r\n')"
test -n "$auth_token" || { echo "::error::NETLIFY_AUTH_TOKEN is empty or missing"; exit 1; }
test -n "$site_id" || { echo "::error::NETLIFY_SITE_ID is empty or missing"; exit 1; }
response="$(curl --fail-with-body --silent --show-error \
-X POST \
-H "Authorization: Bearer $auth_token" \
-H "Content-Type: application/zip" \
--data-binary "@build/inbe-site.zip" \
"https://api.netlify.com/api/v1/sites/$site_id/deploys")"
python3 -c 'import json, sys; deploy = json.loads(sys.argv[1]); state = deploy.get("state", ""); url = deploy.get("ssl_url") or deploy.get("url") or deploy.get("deploy_ssl_url") or deploy.get("deploy_url") or deploy.get("id"); print(f"Netlify deploy {state}: {url}"); raise SystemExit(1 if state in ("error", "failed") else 0)' "$response"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+148
View File
@@ -0,0 +1,148 @@
name: Cloudflare Pages
on:
workflow_run:
workflows:
- Release
types:
- completed
branches:
- master
pull_request:
workflow_dispatch:
inputs:
released_web:
description: Use the published web app for a website-only update
type: boolean
default: false
permissions:
contents: read
concurrency:
group: pages-${{ github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Site
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha || github.ref }}
submodules: recursive
lfs: true
- name: Set up Node.js for the web build
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Packages
if: ${{ !inputs.released_web }}
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set Up Emscripten
if: ${{ !inputs.released_web }}
run: |
set -euo pipefail
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
"$HOME/emsdk/emsdk" install latest
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Download Released Web App
if: ${{ inputs.released_web }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
version=$(sed -n 's/^#define APP_VERSION_STRING "\([^"]*\)"/\1/p' src/core/version.h)
test -n "$version"
mkdir -p build/released-web build/dist/web
gh release download "v$version" --pattern inbe-web.zip --dir build/released-web
unzip -q build/released-web/inbe-web.zip -d build/dist/web
test -s build/dist/web/index.wasm
- name: Build Site
run: |
set -euo pipefail
if [ "$RELEASED_WEB" = "true" ]; then
make package-unpackaged-assets
sh site/build.sh
else
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make site
fi
test -f build/site/index.html
test -f build/site/build/web/index.html
test -f build/site/build/web/index.js
test -f build/site/build/web/index.wasm
if [ "$GITHUB_EVENT_NAME" != "pull_request" ]; then
make site-release-assets-check
else
echo "Skipping release asset availability check for pull request build"
fi
env:
GH_TOKEN: ${{ github.token }}
RELEASED_WEB: ${{ inputs.released_web }}
- name: Upload Site Artifact
uses: actions/upload-artifact@v4
with:
name: inbe-site
path: build/site
if-no-files-found: error
deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Deploy Preview To Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build/site --project-name=inbe --branch=${{ github.head_ref || github.ref_name }}
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
needs: build
if: |
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'master') ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Deploy Production To Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build/site --project-name=inbe --branch=master
+6
View File
@@ -39,6 +39,12 @@ jobs:
fetch-depth: 0
lfs: true
- name: Scan Tracked Files and History
run: |
set -euo pipefail
python3 scripts/check-secrets.py --working-tree
python3 scripts/check-secrets.py --history
- name: Install build dependencies
run: |
sudo dpkg --add-architecture arm64
+143 -30
View File
@@ -14,9 +14,31 @@ concurrency:
cancel-in-progress: true
jobs:
secret-scan:
name: Secret Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Check Version Consistency
run: |
python3 scripts/check-version.py
python3 tests/version_test.py
- name: Scan Tracked Files and History
run: |
set -euo pipefail
python3 scripts/check-secrets.py --working-tree
python3 scripts/check-secrets.py --history
test:
name: Test
runs-on: ubuntu-latest
needs: secret-scan
timeout-minutes: 60
env:
APT_CACHE_DIR: /tmp/apt-cache
@@ -29,6 +51,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Test apt packages
uses: actions/cache@v4
with:
@@ -60,6 +87,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Web apt packages
uses: actions/cache@v4
with:
@@ -72,11 +104,6 @@ jobs:
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Emscripten
run: |
set -euo pipefail
@@ -85,12 +112,14 @@ jobs:
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Web ZIP
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make package-unpackaged-assets
make web
mkdir -p build/release/web
@@ -119,6 +148,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Web apt packages
uses: actions/cache@v4
with:
@@ -139,12 +173,14 @@ jobs:
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Chrome Extension ZIP
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make package-unpackaged-assets
make chrome-web-store
mkdir -p build/release/chrome-web-store
@@ -173,6 +209,11 @@ jobs:
fetch-depth: 1
lfs: true
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Web apt packages
uses: actions/cache@v4
with:
@@ -185,11 +226,6 @@ jobs:
timeout-minutes: 15
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Emscripten
run: |
set -euo pipefail
@@ -198,12 +234,14 @@ jobs:
"$HOME/emsdk/emsdk" activate latest
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
echo "$HOME/emsdk" >> "$GITHUB_PATH"
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Firefox Add-on ZIP
run: |
set -euo pipefail
export PATH="$INBE_NODE_BIN:$PATH"
node --version
make package-unpackaged-assets
make firefox-addons
make firefox-addons-lint
@@ -242,6 +280,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Linux apt packages
uses: actions/cache@v4
with:
@@ -343,6 +386,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Linux apt packages
uses: actions/cache@v4
with:
@@ -396,6 +444,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Linux apt packages
uses: actions/cache@v4
with:
@@ -449,6 +502,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Linux apt packages
uses: actions/cache@v4
with:
@@ -499,6 +557,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Linux apt packages
uses: actions/cache@v4
with:
@@ -539,6 +602,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Build FreeBSD .pkg
uses: vmactions/freebsd-vm@v1
with:
@@ -546,7 +614,7 @@ jobs:
usesh: true
prepare: |
for attempt in 1 2 3; do
pkg install -y gmake cmake pkgconf sdl2 gtk3 curl sqlite3 mesa-libs libdrm hicolor-icon-theme desktop-file-utils && break
pkg install -y node22 python3 gmake cmake pkgconf sdl2 gtk3 curl sqlite3 mesa-libs libdrm hicolor-icon-theme desktop-file-utils && break
if [ "$attempt" -eq 3 ]; then
exit 1
fi
@@ -582,6 +650,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Windows apt packages
uses: actions/cache@v4
with:
@@ -640,6 +713,11 @@ jobs:
submodules: recursive
fetch-depth: 1
- name: Set up Node.js for Bend proofs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
@@ -687,6 +765,11 @@ jobs:
mkdir -p ~/.android
echo "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
- name: Prepare Firebase config
env:
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
run: ./scripts/write-google-services-json.sh
- name: Copy Android Assets
run: ./scripts/copy-android-assets.sh
@@ -697,12 +780,12 @@ jobs:
run: |
set -euo pipefail
chmod +x droid/gradlew
./droid/gradlew -p droid assembleRelease \
./droid/gradlew -p droid assembleRelease assembleGplay \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
./droid/gradlew -p droid bundleRelease \
./droid/gradlew -p droid bundleGplay \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
@@ -714,18 +797,19 @@ jobs:
run: |
set -euo pipefail
mkdir -p build/release/android
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
VERSION=$(python3 scripts/check-version.py --print-version)
if [ -z "$VERSION" ]; then
echo "Could not read INBE_VERSION_STRING"
echo "Could not read APP_VERSION_STRING"
exit 1
fi
cp "build/android/inbe-$VERSION.apk" build/release/android/
aab="$(find droid/app/build/outputs/bundle/release build/android -type f -name '*.aab' | head -n 1)"
if [ -z "$aab" ]; then
echo "No release AAB was produced"
exit 1
fi
cp "$aab" "build/release/android/inbe-$VERSION.aab"
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk"; do
if [ ! -f "$apk" ]; then
echo "Missing universal APK: $apk"
exit 1
fi
cp "$apk" build/release/android/
done
cp "build/android/inbe-$VERSION-gplay.aab" build/release/android/
- name: Upload Android Artifacts
uses: actions/upload-artifact@v4
@@ -779,9 +863,9 @@ jobs:
run: |
set -euo pipefail
test -n "$(find build/release -type f -print -quit)"
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
VERSION=$(python3 scripts/check-version.py --print-version)
if [ -z "$VERSION" ]; then
echo "Could not read INBE_VERSION_STRING"
echo "Could not read APP_VERSION_STRING"
exit 1
fi
missing=0
@@ -799,9 +883,9 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
VERSION=$(python3 scripts/check-version.py --print-version)
if [ -z "$VERSION" ]; then
echo "Could not read INBE_VERSION_STRING"
echo "Could not read APP_VERSION_STRING"
exit 1
fi
TAG="v$VERSION"
@@ -890,10 +974,34 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify-waozi-site:
name: Notify Waozi devlog
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.release_upload == 'true'
steps:
- name: Trigger Waozi site rebuild
env:
WAOZI_SITE_DISPATCH_TOKEN: ${{ secrets.WAOZI_SITE_DISPATCH_TOKEN }}
VERSION: ${{ needs.release.outputs.version }}
run: |
set -euo pipefail
if [ -z "${WAOZI_SITE_DISPATCH_TOKEN:-}" ]; then
echo "::warning::WAOZI_SITE_DISPATCH_TOKEN is not configured; skipping Waozi devlog dispatch"
exit 0
fi
curl -fsS -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $WAOZI_SITE_DISPATCH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/waozixyz/waozi/dispatches \
-d "{\"event_type\":\"devlog\",\"client_payload\":{\"project\":\"inbe\",\"version\":\"$VERSION\"}}"
publish-itch:
name: Publish itch.io
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
needs:
- build-web
- release
@@ -990,6 +1098,7 @@ jobs:
name: Publish Google Play Production
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
needs:
- build-android
- release
@@ -1017,7 +1126,7 @@ jobs:
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_JSON_KEY }}
packageName: xyz.waozi.inbe
releaseFiles: build/release/android/*.aab
releaseFiles: build/release/android/inbe-${{ needs.release.outputs.version }}-gplay.aab
track: production
status: completed
@@ -1025,6 +1134,7 @@ jobs:
name: Publish Amazon Appstore
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
needs:
- build-android
- release
@@ -1078,6 +1188,7 @@ jobs:
name: Publish Chrome Web Store
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
needs:
- build-chrome-extension
- release
@@ -1203,6 +1314,7 @@ jobs:
name: Publish Firefox Add-ons
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
needs:
- build-firefox-addons
- release
@@ -1265,6 +1377,7 @@ jobs:
name: Publish winget manifest
runs-on: ubuntu-latest
timeout-minutes: 15
continue-on-error: true
needs: release
if: needs.release.outputs.tag_pushed == 'true'
env:
+2
View File
@@ -26,6 +26,7 @@ node_modules
.env
.env.play
.secrets/
social-posts.local.json
/inbe.log
@@ -35,6 +36,7 @@ node_modules
/main
!droid/app/src/main
droid/app/src/main/assets
droid/app/src/gplay/google-services.json
droid/*.apk
droid/*.aab
+58 -6
View File
@@ -1,7 +1,59 @@
# Inbe Agent Instructions
# Inbe repository rules
- Never edit files under `vendor/` from this repository.
- Kryon changes must be made in the core Kryon repository, committed there, pushed there, and then brought into Inbe by updating the Kryon submodule pointer.
- Do not add tests, policy checks, wrappers, compatibility aliases, or generated changes inside `vendor/` from Inbe.
- If a task appears to require a vendor change, stop and switch to the upstream project workflow first.
- Run `make no-vendor-edits` or `make test` before handing work back when a task touches Kryon or other vendored code.
## Ownership and releases
- Never edit `vendor/`. Change Kryon in its upstream repository on `master`,
commit and push there, then update only Inbe's clean submodule pointer.
Run `make no-vendor-edits` after dependency changes.
- Add the numeric release to `CHANGELOG.md`, then run `./update_version.sh`.
The canonical macros are `APP_VERSION_STRING`, `APP_VERSION_MAJOR`,
`APP_VERSION_MINOR`, and `APP_VERSION_PATCH`; do not create aliases.
Only the GitHub Actions release workflow creates or pushes release tags.
- Translate changed strings in every affected locale; no English placeholders.
## Machine-checked contracts
- `make build-laws` is mandatory for native, web, and Windows artifacts;
Gradle and CMake enforce the same version and proof checks independently.
Never bypass a failed gate or hand-edit generated policy tables.
- Retry behavior lives in `laws/sync_retry/main.bend`. Implement changes there
and prove `LAWS.bend` in `PROOF.bend`; the app consumes the checked table.
Do not weaken laws to make an implementation pass. Contract changes require
explicit product intent and separate review from implementation changes.
- Run `make proof-test sync-recovery-test version-test` for these contracts.
Coverage, trust boundaries, and the next proof migrations are described in
[docs/build-laws-plan.md](docs/build-laws-plan.md).
## Public UI and sync boundaries
- Use `Text(TextProps)`, `Image(ImageProps)`, and `Button(ButtonProps)` directly.
Semantic images use the same `Image` surface. No positional Text, legacy
drawing calls, alternate widgets, or thin local forwarding wrappers.
Keep meaningful compositions and gestures; use standard Checkbox and Toggle.
Run `make clean-text-api-check button-api-check` for UI changes.
- If a required widget capability is missing, implement the reusable primitive
upstream first. Do not work around it in Inbe or generated code.
- Use sync protocol v6 and the clean Kryon API; no new `Ksync` names or wrappers.
Keep legacy wire strings only for migration. Migrations must be automatic,
resumable, and non-destructive, preserving tombstones and legacy projections
while supported older installations can return.
## Product behavior and readability
- Desktop focus loss must not pause practices, freeze animation, suppress
updates, or enter the mobile background-timer path. Preserve mobile/web
lifecycle handling and explicit user pause as separate behavior.
- Preserve hover, press, and focus transitions. Session audio controls have
44-unit targets (24-unit icons plus 10-unit padding), scaled and spaced.
- Lists starts with list tabs, without a separate title bar or dropdown.
- Use descriptive names, explicit control flow, and focused helpers. Never
compress multiple statements, branches, declarations, or checks onto one line.
Format changed source, inspect the final diff, and run `git diff --check`.
## Bend
When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible
+140 -2
View File
@@ -1,4 +1,142 @@
# Changelog
## [2.0.2] - 2026-09-20
### Fixed
- Habit editor section headings and reminder details now align with their rows.
## [2.0.1] - 2026-09-20
### Fixed
- Existing installations reset navigation once to show Lists, Habits, Practice, and Settings in that order. Changes made afterward are kept.
## [2.0.0] - 2026-09-19
### Changed
- Added cat, sea turtle, and crescent moon profile pictures in place of three similar tree choices.
- Added the new peaceful meditation logo and made it the default app icon, with app icon selection available from Appearance.
- Updated Kryon controls, navigation, styling, and text editing throughout the app.
- Material is now the default style. Choose Material, TK, or Lightfield in Appearance, with color themes available within each style.
- Navigation customization has cleaner spacing and smoother reorder handles.
- Desktop development runs keep their settings and sync account separate from the installed app.
- Completed list items now move behind a Show Completed toggle instead of staying mixed into the active list.
- Practice controls sit closer to the bottom navigation while preserving the image fade.
- Session results now show a clearer round chart and a compact summary for single-round practices.
- About now uses proper Discord, Telegram, and GitHub icons, and the support dialog has cleaner donation address previews.
- Removed the Vanilla style and the startup style-selection screen.
### Fixed
- Existing Android installations now move their private data to the consistent Inner Breeze location while preserving habits, sessions, settings, and sync details.
- Desktop, web, and Windows installations now use the same Inner Breeze data location, moving existing data there on first launch instead of leaving it behind.
- Backups exported by earlier releases import again, including archives named after the previous app identity.
- Restored profile pictures in Settings and Profile. The picture picker now displays its full grid and uses standard scrolling and selection.
- Settings row labels and icons now share the same vertical alignment.
- Settings now uses one consistent modern screen instead of switching between duplicate layouts.
- Sidebar switching is stable at responsive breakpoints instead of jittering between navigation modes.
- Guide and modal panels remain visible with Material styling instead of showing text over the underlying screen.
- Guide screens and practice previews are placed correctly across phone and desktop sizes.
- Guide cards now have a clear heading, and tapping outside a focused control dismisses its focus.
- Scrollable Settings pages leave comfortable space above the bottom navigation at larger text scales.
- An unnamed local profile now has a neutral label in the navigation card.
- Settings navigation opens the Settings overview, with improved bottom navigation and click handling.
- Older navigation layouts now place Lists before Habits, Practice, and Settings.
- Lightfield buttons and glow settings now update with the selected style, and glow is scoped to styles that support it.
- Material sliders keep labels and values readable instead of floating too high or drawing white text on pale slider fills.
- Android masked app icons use a gentle blue background instead of black.
- Web loading screens and browser icons now show the current meditation logo.
- Emptying a list no longer restores the initial sample data.
- Improved text selection, keyboard focus, and composition handling when editing text.
- Connecting to sync runs in the background so network requests do not block the interface.
- Sync retries temporary connection failures automatically without losing queued changes.
- Automatic friend-list retries stop when account details need attention, and retry delays recover safely from invalid saved counts.
- Profile shows actionable sync status instead of internal repair messages.
- Restoring an account key now starts synchronization and retrieves the account alias and existing friendships. Friend lists remain available when leaderboard loading fails.
- Restoring a profile now reliably recovers habit history and session data alongside the alias and friends, including on Android.
- Sync no longer asks you to upgrade just because the server supports a newer sync protocol.
- Sync connection and account errors now display readable, translated messages.
- Desktop update links now use the current Inner Breeze release location.
## [1.9.19] - 2026-09-04
### Added
- Replaced the legacy pixel UI icons with a cohesive MingCute-based icon set, packed into efficient embedded spritesheets with separate full-color assets for profiles, platforms, payments, languages, and logos.
### Changed
- Navigation and practice controls now use larger, clearer icons.
- Volume controls now show distinct muted, low, medium, and maximum-volume states.
- Updated the bundled Kryon runtime with smoother antialiasing, tear-free presentation, improved text editing, and more reliable desktop menus.
### Fixed
- Pressing Escape now closes stack/sidebar navigation before applying the normal screen-level Escape action.
- Fixed a Windows build collision between Kryon and the Win32 `DrawIcon` API.
## [1.9.18] - 2026-09-04
### Added
- Every practice now includes a guided How-to with clear steps, swipe navigation, and labeled controls.
### Changed
- The Wim Hof guide now uses four focused pages with a prominent safety warning, breathing previews, progress indicators, and direct access to practice settings.
- How-to controls now provide consistent hover, focus, keyboard, and touch feedback across supported devices.
### Fixed
- Exiting a practice started from How-to now returns to the normal Practice screen instead of reopening the guide.
- On Windows, the title-bar close button and Alt+F4 now honor the selected close behavior, including showing the Keep running or Quit prompt.
## [1.9.17] - 2026-08-30
### Changed
- Web habit check-ins now update more smoothly, reducing the visible flash when changing a habit.
### Fixed
- Web screen navigation now keeps stable browser routes, so opening or returning to a screen uses the expected address.
- Language selection and onboarding settings now persist reliably before returning to the main screen.
- Stack sidebar navigation no longer shows a stray black line or overflows at the bottom.
## [1.9.16] - 2026-08-29
### Changed
- Sync now speaks Ksync protocol v5 compatibility mode while keeping existing secure synced data usable.
### Fixed
- Fixed web sync key import stability in Firefox.
## [1.9.15] - 2026-08-29
### Fixed
- Fixed a web startup stability issue that could affect browser smoke checks after reload.
## [1.9.14] - 2026-08-29
### Changed
- Updated the bundled Kryon runtime to the latest release for improved web runtime compatibility.
## [1.9.13] - 2026-08-29
### Changed
- Sync now uses the protocol v4 secure data format when the account has been migrated, while keeping the transition path compatible with existing synced data.
### Fixed
- Secure data migration now appears only for connected accounts that still need migration, and shows progress while the update is running.
- Sync migration no longer leaves stale queued changes after all local data has been uploaded in the secure format.
- Profile and sync account text can be selected by double-clicking.
- Desktop startup no longer fails when the single-instance lock is unavailable.
- Android landscape layouts now respect system bars and display cutouts.
- Android releases now include the expected per-ABI APK downloads alongside the universal APK.
## [1.9.12] - 2026-08-28
### Changed
- Web builds now use the Canvas renderer directly, so browsers without WebGL no longer need a fallback path.
- Sync account IDs now display in a compact first-four/last-four format in profile and sync settings.
### Fixed
- Importing a sync key now connects the account automatically once the key is accepted.
- Background sync no longer blocks or interrupts starting a practice.
- Start Practice now remains responsive while sync is running in the background.
- Profile and sync account text can be selected reliably with double-click and drag selection.
- Web console output is quieter during normal startup and sync.
- Android UI scaling now uses the best detected device scale, fixing undersized menu text on tall phones.
## [1.9.11] - 2026-08-28
### Changed
- Practice screens now show only the practices that are currently available.
- Desktop tray status now shows the active practice and phase in the tooltip where supported, and in the tray menu as a reliable fallback.
### Fixed
- Sync now runs only after an account is connected to a saved sync server.
- Existing synced accounts keep their connected state after upgrading, while disconnected accounts no longer start background sync, social refreshes or websocket listeners.
- Profile Data now distinguishes disconnected sync accounts from missing accounts.
- Android practice notifications now keep showing the current phase and timer while a practice is running.
## [1.9.10] - 2026-08-25
### Added
- Completed practices now show a results screen with session details and a mood check-in before returning home.
@@ -113,7 +251,7 @@
### Changed
- Micro breaks open their window the moment they are due - the invisible toast-prompt phase is gone (rest/daily keep their prompts).
- Break exercises are removed for now: breaks are just the countdown and controls; the "Exercises" settings row and the tray entry are gone. Running a practice during a break is planned as the follow-up.
- Breaks are just the countdown, controls and practice launch actions; the old Exercises settings row and tray entry are gone.
- Idle memory: source fonts now rasterize once each at the DPI-scaled base size (plus one lazily built tier for large text) instead of caching up to eight per-size rasterizations, and a burst of new glyphs re-rasterizes at most once per frame per font; language-picker fallback fonts seed ASCII only and grow on demand (kryon `ui_text` change).
- The process no longer links GTK: the system theme reads the desktop's real palette from the theme's gtk.css (kryon `system_theme`), file dialogs shell out to zenity/kdialog/yad (kryon's default backend order), and the GTK tray backend resolves libgtk-3 through kryon's runtime loader only when the tray actually starts. `INBE_NO_TRAY=1` skips the tray entirely (idle RSS drops from ~132 MB to ~103 MB; with the tray it is ~126 MB).
- glibc malloc arenas are capped at four (the app runs ~19 threads; the default ceiling let per-thread arenas inflate idle RSS).
@@ -129,7 +267,7 @@
## [1.9.0] - 2026-08-15
### Added
- Break reminders, Workrave-style: micro, rest and daily break timers with break exercises, statistics, and a desktop timer HUD that lives as a real OS window next to the app (desktop only, off by default, with its own settings tab).
- Break reminders, Workrave-style: micro, rest and daily break timers with statistics and a desktop timer HUD that lives as a real OS window next to the app (desktop only, off by default, with its own settings tab).
- A dedicated Notifications settings tab. Push delivery uses UnifiedPush (no Google services): "Set up push" opens an in-app picker that lists installed distributor apps with their name and icon and registers with the one you pick; the status line reports the real registration state.
- Reminders are an editable list: add as many as you want, each with a practice dropdown (Wim Hof, Meditation, Sun Salutation), a [-] time [+] stepper, an on/off toggle and delete. Ships with one enabled Wim-Hof 08:00 reminder.
- A notification when new friend requests arrive over social sync (toggleable, on by default).
+449 -219
View File
File diff suppressed because it is too large. Load diff
+73 -172
View File
@@ -1,23 +1,91 @@
<p align="center">
<img src="assets/app/readme-banner.png" alt="Inner Breeze" width="100%">
</p>
<p align="center">
<a href="https://play.google.com/store/apps/details?id=xyz.waozi.inbe">
<img src="assets/app/badge-google-play.png" alt="Get it on Google Play" height="56">
</a>
<a href="https://f-droid.org/packages/xyz.waozi.inbe/">
<img src="assets/app/badge-f-droid.png" alt="Get it on F-Droid" height="56">
</a>
</p>
# Inner Breeze
Inner Breeze is a free, open-source app for breathing, meditation, and habit tracking.
Inner Breeze is a free, open-source practice app for breathing, meditation, and
habit tracking. It works offline, stores data locally in SQLite, and can
optionally sync user-owned data through a Daochi-compatible sync server.
## Features
- Guided practice sessions with visual and audio cues
- Mind, Yoga, and Fitness organization for different practice routines
- Customizable breathing sessions, meditation timers, and habit counters
- Habit tracking with session history and linked practice counts
- Local import and export support
- Theme customization with light and dark variants
- Repeat the last completed practice using its current settings
## Build
Build with the system toolchain and project Makefile:
The build host needs Node.js 22.18 or newer for mandatory Bend proof checking,
as well as Python 3 and the platform's native build dependencies. Node and Bend
are build tools; they are not installed with the app. See
[build contracts and proofs](docs/build-laws-plan.md) for the checked behavior.
Initialize the submodules once:
```bash
git submodule update --init --recursive
```
Build and run the desktop app:
```bash
make native
make run
```
On FreeBSD, use GNU Make:
Run the terminal backend:
```bash
gmake native
gmake run
make tui
```
Build Android artifacts:
```bash
make android-debug
PASSWORD=your-keystore-password make android-release
PASSWORD=your-keystore-password make android-bundle
```
Build the web app:
```bash
make web
make site
```
Run the test suite:
```bash
make test
```
To test sync and recovery against an isolated local server:
```bash
make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi
```
This uses disposable client databases and a loopback server; see
[web and sync test coverage](WEB_RENDERER_TESTS.md) for details.
Native binaries are written to `build/bin/<platform>/`. Release artifacts are
written under `build/dist/`.
To debug Inbe against the root Kryon checkout instead of the vendored
submodule, override `KRYON_DIR`:
@@ -25,172 +93,10 @@ submodule, override `KRYON_DIR`:
make run KRYON_DIR=../kryon
```
On FreeBSD:
```bash
gmake run KRYON_DIR=../kryon
```
Use this only for local debugging. Permanent Kryon fixes should be committed in
the root Kryon repository and then brought into Inbe by updating
`vendor/kryon`.
Native binaries are written to `build/bin/<platform>/`, for example
`build/bin/freebsd/inbe-freebsd-x86_64` on FreeBSD.
Install into the system prefix:
```bash
make install
```
By default this installs the binary, desktop entry, icon, and AppStream
metadata under `/usr/local`. Use `DESTDIR` for staged/package installs, or
`PREFIX` to choose another install root.
Install for only the current user:
```bash
make install-user
```
This installs under `~/.local`, including the desktop entry and icon.
## FreeBSD Package
Build a native FreeBSD package from inside the repo:
```bash
gmake package-freebsd
```
The package is written to `build/dist/freebsd/`, for example:
```bash
build/dist/freebsd/inbe-1.8.3-freebsd-x86_64.pkg
```
Install it with FreeBSD `pkg`:
```bash
sudo pkg install -y ./build/dist/freebsd/inbe-1.8.3-freebsd-x86_64.pkg
```
The package installs the `inbe` command plus desktop integration for menus such
as Xfce: `Inner Breeze` appears from the `.desktop` file, uses the bundled icon,
and includes AppStream metadata.
## Other Targets
General:
```bash
make test
make dist
make clean
```
Native desktop:
```bash
make native
make run
make install-user
make uninstall
```
FreeBSD:
```bash
gmake package-freebsd
```
Android:
```bash
make android-debug
make android-release
make android-bundle
```
Web:
```bash
make web
make site
make chrome-web-store
make firefox-addons
```
Firefox add-on source-review build:
```bash
sh scripts/build-firefox-addons-source.sh
```
The Firefox reviewer build script creates `build/dist/inbe-firefox-addons.zip`
and runs Mozilla `addons-linter`. Environment requirements and step-by-step
reviewer notes are documented in `packaging/firefox-addons/README.md`.
Firefox source upload zip:
```bash
make firefox-addons-source-zip
```
This creates `build/dist/inbe-firefox-addons-source.zip`.
Linux:
```bash
make appimage
```
Ubuntu Touch:
```bash
make click
```
Windows:
```bash
make windows
```
Common outputs:
- `make native` builds `build/bin/<platform>/inbe-<platform>-<arch>`.
- `make appimage` builds a Linux AppImage under `build/dist/linux/`.
- `make web` builds and smoke-tests the web app, then writes `build/dist/inbe-web.zip`.
- `make windows` builds 64-bit and 32-bit Windows binaries and writes a zip under `build/dist/windows/`.
- `make click` builds the Ubuntu Touch Click package under `build/dist/click/`.
- `make dist` builds release artifacts; Android release targets require `PASSWORD`.
## Android
Build a debug APK:
```bash
make android-debug
```
Create and launch an Android 17/API 37.1 AVD for Pixel storage testing:
```bash
ANDROID_API=37.1 bash scripts/create-avd.sh inbe-android-37-1
AVD_NAME=inbe-android-37-1 bash scripts/emulator.sh
```
Android 17 system images are listed by Google as `android-37.0`,
`android-37.1`, and `android-CinnamonBun`. The repo AVD script supports the
16 KB page-size image types such as `google_apis_playstore_ps16k`.
Native Android storage must use the app's private internal data directory from
`ANativeActivity->internalDataPath`, not the process working directory. Inbe's
SQLite database lives under that app-private root and is removed when the app is
uninstalled.
## Project Layout
- `src/` - app code
@@ -200,11 +106,6 @@ uninstalled.
- `site/` - website
- `vendor/kryon/` - Kryon UI/runtime submodule
## Notes
Inbe stores app data locally in SQLite. Optional sync can mirror user-owned
data through a Ksync-compatible sync server.
## Support
Monero:
+21 -15
View File
@@ -1,31 +1,37 @@
# Web Renderer Tests
Inbe has two web renderer paths:
Inbe ships the Kryon Canvas2D renderer. `web-canvas` is an alias for `web`.
| Target | Renderer | Purpose |
|---|---|---|
| `make web` | raylib/WebGL | Shipping web build with liboqs sync support. |
| `make web-canvas` | Kryon Canvas2D | No-WebGL fallback build using Kryon's Canvas backend. The app still uses Emscripten/WASM for C code and support libraries. |
| `make web-compare-test` | both | Builds both renderers and runs the browser smoke suite against each. |
| `make web-side-by-side-test` | both | Builds both renderers, runs both smoke tests, then serves a split-page manual comparison view. |
| `make web` | Kryon Canvas2D | Shipping Emscripten/WASM build with liboqs sync support; WebGL is not required. |
| `make web-canvas` | Kryon Canvas2D | Alias for the shipping web build. |
| `make web-compare-test` | Kryon Canvas2D | Builds the web target and runs its smoke suite. |
| `make web-side-by-side-test` | Kryon Canvas2D | Builds, tests, and serves a preview page. |
The shared smoke test is `scripts/web-smoke-test.mjs`. It is renderer-aware:
The shared smoke test is `scripts/web-smoke-test.mjs`:
- `WEB_SMOKE_RENDERER=raylib` requires a live WebGL context.
- `WEB_SMOKE_RENDERER=canvas` requires a live Canvas2D context and nonblank pixels.
- Both paths require the app runtime-ready hook, a cycling render loop, IDBFS idle/flush behavior, and app settings persistence.
- Both paths require sync-key import to work. Canvas links the same ksync/liboqs account crypto as raylib-web; only the renderer differs.
- It requires the app runtime-ready hook, a cycling render loop, IDBFS idle/flush behavior, and app settings persistence.
- It verifies sync-key import, practice startup, and habit navigation without reloading.
- The Chromium path also completes a one-minute meditation through pause and
background elapsed time, saves its mood, and verifies the saved check-in after reload.
Current known gap:
Server integration:
- The shared smoke test verifies account crypto/import parity, rendering, storage, and app settings persistence. It does not yet run a real local sync server transaction for either renderer.
- Run `make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi` with a built
Daochi server. The runner starts a disposable loopback server and two isolated
client databases, and retains test data and logs in a printed temporary directory.
- It checks offline recovery, a lost upload response, retry without duplicates,
conflicting mood edits, backup restoration, and synced deletion. It uses Inbe's
native storage and sync code; browser transport remains covered by the web smoke suite.
For manual visual comparison, run:
For a manual preview, run:
```bash
make web-side-by-side-test
```
The script prints a local URL with raylib/WebGL on the left and Canvas2D on the
right. Use `scripts/web-side-by-side-test.sh --no-serve` for CI-style
build-and-smoke validation without starting the comparison server.
The script prints a local preview URL. Use
`scripts/web-side-by-side-test.sh --no-serve` for build-and-smoke validation
without starting the preview server.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 995 B

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+1
View File
@@ -0,0 +1 @@
<svg fill="#5865F2" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Discord</title><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+1
View File
@@ -0,0 +1 @@
<svg fill="#181717" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+1
View File
@@ -0,0 +1 @@
<svg fill="#FFFFFF" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+1
View File
@@ -0,0 +1 @@
<svg fill="#26A5E4" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Telegram</title><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg>

After

Width:  |  Height:  |  Size: 757 B

+30
View File
@@ -0,0 +1,30 @@
Text.practice-heading {
foreground: text;
}
Text.muted {
foreground: muted;
}
Text.selected-navigation {
foreground: accent-ink;
}
Text.circle-ink {
foreground: #171022;
}
Button.practice-pager {
font-size: 42;
}
Image {
foreground: #ffffff;
background: #00000000;
border: #00000000;
radius: 0;
border-width: 0;
material: flat;
opacity: 1;
}
Image.pose-muted {
opacity: 0.62;
}
+10
View File
@@ -0,0 +1,10 @@
{
"targets": [
{
"name": "example",
"url": "https://example.com/compose",
"body_selector": "textarea[name='text']",
"submit_selector": "button[type='submit']"
}
]
}
+51
View File
@@ -0,0 +1,51 @@
# Private data path migration
The canonical root is `<app internalDataPath>/inbe` on Android,
`$XDG_DATA_HOME/inbe` (or `~/.local/share/inbe`) on Unix desktops,
`%LOCALAPPDATA%/inbe` on Windows, and `/home/inbe` in the web filesystem.
The database is `inbe.db` inside that directory. Android release and debug
packages each have their own private `internalDataPath`. Existing export
archive names remain compatible.
On startup, if the legacy `breathing` directory exists (or `BreathSession` on
Windows), the app moves the whole
directory before opening SQLite. This keeps the database, WAL, SHM, and any
other files together. An older `inbe` directory is archived under
`inbe.before-breathing-migration-N` first, without overwriting it. If either
directory move fails, the app continues using `breathing` and can retry next
startup.
When `breathing.db` exists, SQLite's backup API copies its committed main and
WAL content into a temporary database. The copy must pass `PRAGMA quick_check`
before it becomes `inbe.db`. A migration marker identifies the completed copy;
the old database remains as a recovery copy. If the copy fails, the app uses
`breathing.db`. If both database names exist without the marker, startup fails
closed rather than choosing one silently.
`laws/storage_layout/LAWS.bend` defines the finite directory choice policy:
- A fresh install uses the current directory.
- A successful legacy move uses the current directory.
- A failed move keeps using the legacy directory.
- If both exist at decision time, the legacy directory is used. The runtime
first archives the previous `inbe` directory; the policy then sees the
current directory as absent and applies the move rule.
The generated table from the proved Bend policy is consumed by `data_root()`.
The proof covers these decisions, not filesystem atomicity or SQLite contents.
Storage integration tests cover pending WAL data, repeat startup, and database
name conflicts. The Android test covers both-directory archival and compares
the user-data tables before and after migration.
# Desktop profiles
`make run` and `make run-termi` use the persistent debug profile at
`$XDG_DATA_HOME/inbe-debug` (or `~/.local/share/inbe-debug` when XDG_DATA_HOME
is unset). `make run-fresh` still uses a disposable temporary profile.
`make install` installs the production desktop app under `~/.local` by default.
Launching `inbe` or its desktop entry uses `$XDG_DATA_HOME/inbe` (or
`~/.local/share/inbe`). Sync keys, settings, sessions, habits, and downloaded
meditation audio stay inside their respective profile directories. `PREFIX` can
be set explicitly for a system installation; it does not change the production
data location. Debug and production windows have separate desktop identities and
single-instance locks, so both can stay open at once.
+37
View File
@@ -0,0 +1,37 @@
# Sync recovery
Sync enablement records the user’s intent, not whether the last request succeeded.
The 1.9.19 connection setting is migrated without enabling disconnected accounts.
Restoring a key explicitly requests synchronization with the configured server.
Restoring the same key preserves upload cursors, migration completion, and local data.
Connect and Retry schedule the existing background worker. Temporary challenge and
request failures retry after 5, 15, 30, then at most 60 seconds. The last result and
attempt count survive restart; authentication, configuration, signing, and payload
failures require action. Logout and server changes disable synchronization and
clear retry state. Queued records remain until the server response is applied.
Data and Sync show actionable status and queued changes. Repair flags and server
cursors stay internal. Secure-data migration runs through the normal background
sync path, without an automatic blocking prompt, and completion is only recorded
after successful response application.
Friendships are retrieved from the server under the restored account identity.
Successful synchronization schedules social refresh. Temporary social failures
retry; failed leaderboard requests do not discard a fetched friend list or replace
cached leaderboard data with empty results. Restoring a different account cannot
recover friendships belonging to the original identity.
Native clients share a SQLite connection between the UI and sync workers. Settings
text uses a buffer per thread so a UI read cannot replace the recovery key during
decryption. Transactions hold the connection mutex through commit or rollback,
and habit ID reconciliation reuses a schema-created mapping table instead of
dropping and recreating a temporary table while another thread is reading.
Validation: `make sync-recovery-test`, the sync account/review and locale tests,
and `DAOCHI_BIN=/path/to/daochi make sync-server-test`. The server test creates two
accounts with separate aliases, accepts a friendship, restores the first account's
exported key on fresh clients with and without pre-seeded default habits, and checks
that the alias, friend, custom habit, completed habit day, session, and check-in return.
It also drops an upload response to verify safe retry. Native screenshot scenes `sync_disconnected` and
`sync_retry` use disposable data and loopback configuration.
+116
View File
@@ -0,0 +1,116 @@
# Build contracts and Bend proofs
## Implemented
Inbe's release metadata uses the numeric changelog release and the permanent
`APP_VERSION_*` macros. `update_version.sh` synchronizes the release fields;
`check-version.py` rejects inconsistencies. The version check now runs in the
native, web, and Windows artifact graphs and in both Gradle and CMake, including
incremental builds. Version semantics remain a structural build check, not a
formal theorem.
The retry implementation is now **Bend 2 code that ships as evaluated data**:
1. `laws/sync_retry/main.bend` defines the actual pure retry policy.
2. `LAWS.bend` states 11 universally quantified contracts; `PROOF.bend` proves
them for the complete finite input types.
3. Kryon's `tools/bend-laws.mjs` uses pinned upstream Bend 2.0.16, commit
`15ae0c86f3193b8f645b4bedbc438655b648d0da`. It verifies the checker and Base
hashes before loading, checks termination and types, and rejects holes,
unproved declarations, `@unsafe`, foreign implementations, remote imports,
and imports outside the proof package.
4. The checked function is evaluated directly in Bend's kernel for all 45
combinations of result and retry state. `scripts/generate-sync-retry.mjs`
writes the C table consumed by `src/app/sync_retry.kry`. There is no separate
handwritten retry implementation or optimizing Bend code generator in this
path. No Bend runtime is installed on the phone.
5. Account-data and social retries both use that table. The small adapter
clamps persisted integers before indexing, avoiding increment overflow.
Unknown results stop automatic retries.
The proofs establish success resetting the retry state; temporary challenge
and request failures following 5/15/30/60 seconds with a saturated fourth
attempt; actionable failures stopping automatic retry; and the mapping of
saved retry states and delays. Each error classification has its own law.
They do not prove server availability, delivery, alias/friend restoration,
or arbitrary `.kry` behavior. Existing integration tests cover those effects.
The Android private-data directory choice is also a proved finite Bend policy
in `laws/storage_layout`. Its generated table is consumed by `data_root()` and
distinguishes fresh installs, successful moves, failed moves, and an existing
`inbe` directory that must be archived before migration. The proof does not
establish the effects of Android filesystem calls or SQLite backup; storage
integration tests and a device migration check cover those effects. See
`docs/DATA_PATH_MIGRATION.md`.
## Build behavior and verification
Install Node.js **22.18 or newer** on the build host and initialize recursive
submodules. The checker runs offline once those dependencies are present.
CI and package builders provide Node explicitly. The container setup script
uses pinned, checksummed official Node archives; ordinary compilation never
downloads a proof tool. Flatpak removes its Node build tool from the app.
- `make build-laws`: release consistency and proofs.
- `make proof-test`: deterministic generation, contract-breaking mutations,
enum mapping drift, and rejection with an old header already present.
- `make sync-recovery-test`: the actual generated C and coordinator, including
all known result codes, extreme persisted integers, and social retry state.
- `make version-test`: release synchronization and rejecting mismatches.
- Upstream `make bend-laws-test`: checker/evaluator acceptance and rejection,
including missing proofs, holes, unsafe definitions, and escaped imports.
Make's actual generated-header and app artifact prerequisites run the checks
on every invocation. Failed checking prevents compilation even if an old
header exists. Successful generation preserves the header's timestamp when
its contents are unchanged. Gradle `preBuild` always checks; direct CMake
builds independently regenerate their checked table. `make kry-c-plan9`
exports the checked table with the generated sources for native Plan 9,
which consumes the host-verified export.
Kryon's syntax law `image.surface.no_low_level_calls` remains mandatory in
all six compiler frontends, including default and `--no-strict` builds. Its
105 rejection cases are compiler regression tests, not behavioral proofs.
The text/button scanners, migration tests, and sync integration suite remain
separate checks with their own scope.
## Trust and use with smaller models
A model can change the implementation and provide proofs while the contracts
stay fixed. Its output is accepted only when the checker verifies those
contracts. This reduces dependence on model quality for **specified behavior**;
it does not establish that a smaller model is equally good at designing the
contracts or diagnosing missing requirements.
The trusted boundary is the pinned checker/Base, the finite-table generator,
the enum/integer adapter, build graph, and target compiler. Regression tests
exercise the integration boundary. An agent able to rewrite the laws or gates
can weaken the guarantee. Protected branches, required checks, and independent
review ownership should protect those files on the hosting service; repository
files alone cannot make themselves immutable. Hosting settings have not been
changed by this implementation.
`AGENTS.md` now states ownership, contract-change boundaries, and the remaining
product/review obligations instead of treating prose as a proof system.
## Next migrations, in order
1. Move practice lifecycle decisions into a pure finite policy: desktop focus
cannot pause a session, user pause remains explicit, and mobile background
transitions preserve the required timer behavior. Compile its proved table
through the same Kryon checker; retain platform integration tests.
2. Specify sync recovery transitions: restoring an account cannot discard
queued local changes, partial social refresh cannot erase known friends,
and an account switch cannot apply responses belonging to the old account.
Model effects explicitly; proofs of scheduling do not prove network delivery.
3. For unbounded algorithms such as collection merges, define a checked direct
compilation path and its semantics before expanding beyond finite tables.
Do not claim a proof of a model also proves a separately implemented C path.
4. Add typed widget contracts in Kryon's parsed compiler representation and
negative fixtures before removing the remaining API instructions. Turning on
today's whole-project strict mode produces thousands of unsupported-host
diagnostics and is not a substitute for those contracts.
[Bend's upstream guide](https://github.com/bendlang/bend/blob/main/guide/GUIDE.md)
describes its law/proof convention. Inbe uses the actual checker rather than
naming ordinary assertions or tests mathematical proofs.
+56
View File
@@ -0,0 +1,56 @@
# Inbe source ownership
Product behavior is maintained in `.kry`: application setup and rendering,
practice and habit rules, account/sync orchestration, database policy, audio
selection, desktop tray menus, screenshot scenes, and browser actions.
`app/app_types.kry` owns the application records and enums. C declarations are
emitted by k2c into the build directory.
The main application uses direct screen dispatch. Tray implementation lives in
`platform/tray.kry`, without a second set of forwarding functions. Native host
startup calls the same `.kry` application setup on each platform.
## UI composition
- Use `Text(TextProps)`, `Image(ImageProps)`, and `Button(ButtonProps)` directly.
- Supply text bounds, font, alignment, and wrapping in props. Bounded one-line
text uses the standard widget's clipping instead of app-owned UTF-8 chopping.
- Put product presentation rules in `assets/styles/inbe.kss`. It augments the
selected Kryon style pack and shares its color tokens.
- `app/widgets.kry` composes the product's panels and guide content from
standard controls. Kryon's shared Modal, Guide, and Reorder policies own
their geometry; Popup owns dismissal and capture for volume sliders.
- Session action rows use shared toolbar geometry and 44-unit buttons with gaps.
Route choices, guide steps, and practice animations remain Inbe behavior.
- Background art and Sun Salutation atlas frames use asset-backed Image props.
Kryon owns image loading, caching, cropping, and contain/cover fitting.
## Native boundary
The remaining C handles platform integration: window setup/frame submission,
Android JNI and insets, browser JavaScript interop, and Plan 9 system adapters.
`storage_json_builder.c` contains only the C varargs bridge; buffer growth,
escaping, failure state, and timestamp serialization live in `storage/json.kry`.
The checked JSON builder is retained because the current Kryon JSON emitter
does not expose the allocation-failure result required by Inbe's sync writer.
Database schemas, setting keys, sync protocol v6, tombstones, and recovery
policy are preserved. This migration does not introduce a data conversion.
## Building and checking
Run `make native test` with the platform's normal build configuration. On omega,
set `PKG_CONFIG_PATH=/home/wao/.local/sdl2/lib/pkgconfig`. The tests consume the
freshly generated app modules, including the font selector and UI metrics.
`make web` and the Android CMake build generate the same `.kry` sources for their
platforms. `make kry-c-plan9` produces Plan 9 C and its source list.
Kryon commit `c645a7016` removes the frontend's 16-constant-per-module limit.
The compiler regression covers a module with 80 constants; language tests cover
C, C++, and Go. Runtime/compiler changes belong upstream on Kryon master, then
come into Inbe through a clean submodule update.
Kryon commit `cde33e956` supplies the Canvas backend's
paint-layer transform capture and restore. Its rendering regression covers
rotation, zoom, and replay from a high-DPI window into a render texture. Web
builds enable Emscripten's zlib port for the shared archive implementation.
+55
View File
@@ -0,0 +1,55 @@
# Sync compatibility validation — 2026-09-14
## Production repair
The backend was restarting because it required `DAOCHI_TOKEN_SECRET_HEX`
while the deployed environment still used `KSYNC_TOKEN_SECRET_HEX`.
The configuration migration preserved the existing token secret and database
settings, retained the old settings for rollback, and made a private backup.
Daochi commit `ae40c7f` is deployed. Sync responses no longer advertise backend
protocol development as a client upgrade. `latest_protocol` echoes the client
protocol on typed sync responses; `server_latest_protocol` reports backend
capability separately. The opaque encrypted endpoint omits `latest_protocol`.
## Passed checks
- Daochi `make test`, including real ML-DSA authentication with the shipped
Inbe, Ksync, and Daochi signing contexts and headers; altered signatures
rejected; sync protocols v1–v5 accepted without upgrade warnings.
- Environment migration tests: credential/database preservation, idempotence,
and rejection of conflicting old/new settings.
- Inbe sync-account and sync-review tests, including persisted newer protocol
metadata that must not become an app-update notification.
- Inbe two-client integration test against a disposable Daochi server:
upload/download, offline recovery, interrupted upload, retry, conflicts,
mood data, backup restoration, and deletion.
- Official GitHub release APK 1.9.19 (versionCode 121), installed alongside
the existing debug app on the attached Moto E6 Play:
imported a disposable old-format `.key`, connected to production,
saved and uploaded one meditation session, reset only the fresh test app,
re-imported the same key, and restored the session from production.
The Data screen reported one session, queued zero, and Ready, without
the protocol-driven “Upgrade Inner Breeze” warning.
- All five newly added sync status/error messages are present exactly once
in all 12 locale files. Vendor trees remain clean; `git diff --check` passes.
## Remaining limits
- The phone validation uses the unchanged published APK. Its missing locale
messages still display identifiers; the translated fixes are in 1.10.0
source and are not published yet.
- Building the current Android working tree fails at the existing
`PickerDialog` / `PickerDialogProps` call in notification settings, whose
API is absent from the selected runtime. A new APK has not been validated.
- The full locale test also reports pre-existing missing profile translations
and unused profile/list keys outside the sync changes.
- A backup produced by the current development client was rejected by the
old APK as an invalid export. Key-based server restoration passed; do not
claim forward compatibility of development backup archives.
- Production `/healthz` succeeds. `/readyz` still reports a separately
configured direct-payment issuer key missing; database, token secret,
and signature-verifier checks pass. Deployment preserved that existing
readiness state rather than changing payment configuration.
- This validates the tested release and wire formats, not every historical
binary, platform, or possible account dataset.
+82 -9
View File
@@ -3,6 +3,19 @@ plugins {
id 'org.jetbrains.kotlin.android'
}
def hasGplayFirebaseConfig = file("src/gplay/google-services.json").exists()
if (hasGplayFirebaseConfig) {
apply plugin: 'com.google.gms.google-services'
tasks.configureEach { task ->
if (task.name == "processDebugGoogleServices" || task.name == "processReleaseGoogleServices") {
task.enabled = false
}
}
}
def appOnlyAbi = (project.findProperty('app.onlyAbi') ?: '').toString()
def buildingAndroidBundle = gradle.startParameter.taskNames.any { it.toLowerCase().contains("bundle") }
def kryonDirOverride = (project.findProperty('kryon.dir') ?: System.getenv("KRYON_DIR") ?: '').toString()
android {
namespace 'xyz.waozi.inbe'
compileSdk 36
@@ -37,12 +50,20 @@ android {
}
defaultConfig {
applicationId "xyz.waozi.inbe"
minSdk 21
targetSdk 36
versionCode 112
versionName "1.9.10"
versionCode 126
versionName "2.0.2"
manifestPlaceholders = [
inbeAppLabel: "Inner Breeze",
inbeUsesCleartextTraffic: "false"
]
externalNativeBuild {
cmake {
if (kryonDirOverride) {
arguments "-DKRYON_DIR=${kryonDirOverride}"
}
if (System.getProperty('os.name').toLowerCase().contains('freebsd')) {
arguments '-DANDROID_HOST_TAG=linux-x86_64',
'-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON'
@@ -50,15 +71,31 @@ android {
}
}
}
buildFeatures {
buildConfig true
}
buildTypes {
release {
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "GPLAY", "false"
}
gplay {
initWith release
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
matchingFallbacks = ['release']
buildConfigField "boolean", "GPLAY", "true"
}
debug {
applicationIdSuffix ".debug"
signingConfig signingConfigs.debug
buildConfigField "boolean", "GPLAY", "false"
manifestPlaceholders.inbeAppLabel = "Inner Breeze Debug"
manifestPlaceholders.inbeUsesCleartextTraffic = "true"
}
}
@@ -70,10 +107,15 @@ android {
splits {
abi {
enable true
enable !buildingAndroidBundle
reset()
include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
universalApk true
if (!buildingAndroidBundle && appOnlyAbi) {
include appOnlyAbi
universalApk false
} else if (!buildingAndroidBundle) {
include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
universalApk true
}
}
}
@@ -88,8 +130,37 @@ android {
}
}
androidComponents {
beforeVariants(selector().withBuildType("gplay")) { variantBuilder ->
variantBuilder.minSdk = 23
}
}
// Always run, including Java-only incremental builds. CMake independently
// checks its own generated header so direct native builds have the same gate.
tasks.register('checkBuildLaws') {
doLast {
exec {
workingDir rootProject.file('..')
commandLine 'python3', 'scripts/check-version.py'
}
exec {
workingDir rootProject.file('..')
commandLine 'node', 'scripts/generate-sync-retry.mjs'
}
exec {
workingDir rootProject.file('..')
commandLine 'node', 'scripts/generate-storage-layout.mjs'
}
}
}
tasks.named('preBuild').configure {
dependsOn 'checkBuildLaws'
}
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":app:assembleRelease")
def signedTasks = [":app:assembleRelease", ":app:bundleRelease", ":app:assembleGplay", ":app:bundleGplay"]
if (signedTasks.any { taskGraph.hasTask(it) }
&& !project.findProperty('keystore.password')
&& !project.hasProperty('fDroidBuild')) {
throw new GradleException("Use: make android-release PASSWORD=your-password")
@@ -98,6 +169,8 @@ gradle.taskGraph.whenReady { taskGraph ->
dependencies {
implementation 'androidx.core:core:1.12.0'
implementation 'org.unifiedpush.android:connector:3.3.3-rc1'
implementation 'androidx.health.connect:connect-client:1.1.0'
implementation 'org.unifiedpush.android:connector:3.3.3-rc1'
gplayImplementation platform('com.google.firebase:firebase-bom:34.18.0')
gplayImplementation 'com.google.firebase:firebase-messaging'
}
+15
View File
@@ -0,0 +1,15 @@
# Native code finds MainActivity by its package name and registers private
# native methods by their Java names.
-keep class xyz.waozi.inbe.MainActivity { *; }
# Native code looks these up by class or method name through JNI/reflection.
-keep class xyz.waozi.inbe.ShareHelper { *; }
-keep class xyz.waozi.inbe.GplayPushBridge { *; }
-keep class xyz.waozi.inbe.GplayPaymentBridge { *; }
# Manifest and platform callback entrypoints must keep their public shape.
-keep class xyz.waozi.inbe.FcmPushService { *; }
-keep class xyz.waozi.inbe.PushServiceImpl { *; }
-keep class xyz.waozi.inbe.SessionForegroundService { *; }
-keep class xyz.waozi.inbe.StartPracticeTile { *; }
-keep class xyz.waozi.inbe.StartPracticeWidget { *; }
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
<service
android:name="xyz.waozi.inbe.PushServiceImpl"
tools:node="remove" />
<service
android:name="xyz.waozi.inbe.FcmPushService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "YOUR_FIREBASE_PROJECT_NUMBER",
"project_id": "inner-breeze",
"storage_bucket": "inner-breeze.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "YOUR_FIREBASE_ANDROID_APP_ID",
"android_client_info": {
"package_name": "xyz.waozi.inbe"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "YOUR_FIREBASE_ANDROID_API_KEY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
@@ -0,0 +1,19 @@
package xyz.waozi.inbe;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
public class FcmPushService extends FirebaseMessagingService {
private static final String TAG = "FCM";
@Override
public void onNewToken(String token) {
Log.d(TAG, "new FCM token");
}
@Override
public void onMessageReceived(RemoteMessage message) {
Log.d(TAG, "FCM message received");
}
}
@@ -0,0 +1,21 @@
package xyz.waozi.inbe;
import android.widget.Toast;
final class GplayPaymentBridge {
private GplayPaymentBridge() {}
static String channel() {
return "disabled";
}
static void purchaseTokens(final MainActivity activity, final String productId,
final String accountId, final String authToken) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(activity, "Token purchases are not available in this build.", Toast.LENGTH_LONG).show();
}
});
}
}
@@ -0,0 +1,44 @@
package xyz.waozi.inbe;
import android.widget.Toast;
import com.google.firebase.messaging.FirebaseMessaging;
final class GplayPushBridge {
private static String lastToken;
private GplayPushBridge() {}
static boolean isRegistered(MainActivity activity) {
return lastToken != null && !lastToken.isEmpty();
}
static String[] getDistributors(MainActivity activity) {
return new String[] {"fcm"};
}
static String[] getDistributorLabels(MainActivity activity) {
return new String[] {"Google notifications"};
}
static String[] getDistributorIcons(MainActivity activity) {
return new String[] {""};
}
static void configureWith(MainActivity activity, String pkg) {
configure(activity);
}
static void configure(final MainActivity activity) {
try {
FirebaseMessaging.getInstance().getToken()
.addOnSuccessListener(token -> {
lastToken = token;
Toast.makeText(activity, "Google notifications enabled", Toast.LENGTH_SHORT).show();
})
.addOnFailureListener(error ->
Toast.makeText(activity, "Google notifications unavailable", Toast.LENGTH_LONG).show());
} catch (IllegalStateException e) {
Toast.makeText(activity, "Google notifications unavailable", Toast.LENGTH_LONG).show();
}
}
}
+35 -7
View File
@@ -21,8 +21,9 @@
<application
android:hasCode="true"
android:icon="@mipmap/ic_launcher"
android:label="Inner Breeze"
android:roundIcon="@mipmap/ic_launcher_round">
android:label="${inbeAppLabel}"
android:roundIcon="@mipmap/ic_launcher_round"
android:usesCleartextTraffic="${inbeUsesCleartextTraffic}">
<activity
android:name="xyz.waozi.inbe.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|uiMode"
@@ -37,16 +38,42 @@
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Health Connect: app info can deep-link to the permissions page. -->
<intent-filter>
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
</intent-filter>
</activity>
<activity-alias
android:name="xyz.waozi.inbe.SkyCradleLauncher"
android:enabled="true"
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="${inbeAppLabel}"
android:targetActivity="xyz.waozi.inbe.MainActivity">
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name="xyz.waozi.inbe.InkAndAirLauncher"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_launcher_air"
android:roundIcon="@mipmap/ic_launcher_air_round"
android:label="${inbeAppLabel}"
android:targetActivity="xyz.waozi.inbe.MainActivity">
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<!-- Health Connect on API 34+ routes the rationale through this alias. -->
<activity-alias
android:name="ViewPermissionActivity"
@@ -60,7 +87,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="xyz.waozi.inbe.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
@@ -95,6 +122,7 @@
android:name="xyz.waozi.inbe.SessionForegroundService"
android:exported="false"
android:foregroundServiceType="mediaPlayback" />
<service
android:name="xyz.waozi.inbe.PushServiceImpl"
android:exported="false">
+161 -63
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.22)
project(Inbe C)
project(App C)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM AND EXISTS "${CCACHE_PROGRAM}")
@@ -11,13 +11,23 @@ endif()
set(REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
set(SRC_DIR "${REPO_ROOT}/src")
set(KRYON_DIR "${REPO_ROOT}/vendor/kryon")
if(NOT DEFINED KRYON_DIR)
set(KRYON_DIR "${REPO_ROOT}/vendor/kryon")
endif()
get_filename_component(KRYON_DIR "${KRYON_DIR}" ABSOLUTE BASE_DIR "${REPO_ROOT}")
set(RAYLIB_DIR "${KRYON_DIR}/vendor/raylib/src")
set(KRYON_RAYLIB_GENERATED_DIR "${CMAKE_BINARY_DIR}/kryon/raylib_generated")
set(KRYON_COMPAT_GENERATED_HEADER "${KRYON_RAYLIB_GENERATED_DIR}/kryon_compat.generated.h")
set(KRYON_RAYLIB_BACKEND_RENAME_HEADER "${KRYON_RAYLIB_GENERATED_DIR}/raylib_backend_rename.h")
set(KRYON_RAYLIB_WRAPPERS_C "${KRYON_RAYLIB_GENERATED_DIR}/kryon_raylib_wrappers.c")
set(KRYON_NULL_BACKEND_C "${KRYON_RAYLIB_GENERATED_DIR}/kryon_null_backend.c")
# Icon outputs must live outside kryon/generated: the k2c regeneration step
# wipes that whole directory, which would delete these mid-build.
set(KRYON_ICON_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/kryon/generated-icons/include")
set(KRYON_ICON_GENERATED_SRC_DIR "${CMAKE_BINARY_DIR}/kryon/generated-icons/src")
set(KRYON_ICON_ASSETS_C "${KRYON_ICON_GENERATED_SRC_DIR}/ui/ui_icon_assets.c")
set(KRYON_ICON_NAMES_C "${KRYON_ICON_GENERATED_SRC_DIR}/ui/ui_icon_names.c")
set(KRYON_ICON_TYPES_H "${KRYON_ICON_GENERATED_INCLUDE_DIR}/ui_icon_types.h")
set(SQLITE_DIR "${REPO_ROOT}/vendor/sqlite")
set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
@@ -35,10 +45,12 @@ foreach(oqs_x86_feature
endforeach()
add_subdirectory("${KRYON_DIR}/vendor/liboqs" "${CMAKE_BINARY_DIR}/liboqs")
if(NOT TARGET oqs)
message(FATAL_ERROR "Inbe Android builds require liboqs for sync account crypto")
message(FATAL_ERROR "Android builds require liboqs for sync account crypto")
endif()
file(GLOB_RECURSE KRYON_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/src/*.c")
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/file_dialog/file_dialog.c")
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/ui/ui_icon_assets.c")
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/ui/ui_icon_names.c")
# The src/backend/ canvas/software renderers implement raylib-named functions
# for no-raylib hosts; Android links real raylib, so compiling those is a
# duplicate-symbol link error. Keep Kryon's shared front-end backend glue.
@@ -46,12 +58,16 @@ list(FILTER KRYON_SOURCES EXCLUDE REGEX "${KRYON_DIR}/src/backend/.*")
list(FILTER KRYON_SOURCES EXCLUDE REGEX "${KRYON_DIR}/src/platform/plan9/.*")
list(APPEND KRYON_SOURCES
"${KRYON_DIR}/src/backend/kry_event_wait.c"
"${KRYON_DIR}/src/backend/kry_image.c"
"${KRYON_DIR}/src/backend/kry_image_decode.c"
"${KRYON_DIR}/src/backend/kry_input.c"
"${KRYON_DIR}/src/backend/kry_instance.c"
"${KRYON_DIR}/src/backend/kry_screenshot.c"
"${KRYON_DIR}/src/backend/kry_sw_png.c"
"${KRYON_DIR}/src/backend/kry_surface_math.c")
# inbe is a UI-only app: drop the 2D physics subsystem (Box2D). Mirror the
"${KRYON_DIR}/src/backend/kry_surface_math.c"
"${KRYON_ICON_ASSETS_C}"
"${KRYON_ICON_NAMES_C}")
# this app is UI-only: drop the 2D physics subsystem (Box2D). Mirror the
# KRYON_PHYSICS_SRCS filter the desktop Makefile applies via vendor.mk.
list(REMOVE_ITEM KRYON_SOURCES
"${KRYON_DIR}/src/scene/physics_world.c"
@@ -59,40 +75,58 @@ list(REMOVE_ITEM KRYON_SOURCES
"${KRYON_DIR}/src/scene/node_area2d.c"
"${KRYON_DIR}/src/scene/node_collision_shape2d.c")
file(GLOB KRYON_K2C_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/cmd/k2c/*.c")
list(APPEND KRYON_K2C_SOURCES
"${KRYON_DIR}/cmd/kir/kir.c"
"${KRYON_DIR}/cmd/kir/kir_parse.c")
file(GLOB KRYON_KIR_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/cmd/kir/*.c")
file(GLOB KRYON_K2C_HEADERS CONFIGURE_DEPENDS
"${KRYON_DIR}/cmd/k2c/*.h" "${KRYON_DIR}/cmd/kir/*.h")
list(APPEND KRYON_K2C_SOURCES ${KRYON_KIR_SOURCES}
"${KRYON_DIR}/src/kry_std/kry_json.c")
list(SORT KRYON_K2C_SOURCES)
find_program(HOST_CC NAMES cc clang gcc REQUIRED)
find_program(HOST_PYTHON NAMES python3 REQUIRED)
find_program(HOST_NODE NAMES node REQUIRED)
set(APP_PROOF_DIR "${CMAKE_BINARY_DIR}/proofs")
add_custom_target(app_build_laws
COMMAND "${HOST_PYTHON}" "${REPO_ROOT}/scripts/check-version.py"
COMMAND "${HOST_NODE}" "${REPO_ROOT}/scripts/generate-sync-retry.mjs"
"${APP_PROOF_DIR}/sync_retry_table.h"
COMMAND "${HOST_NODE}" "${REPO_ROOT}/scripts/generate-storage-layout.mjs"
"${APP_PROOF_DIR}/storage_layout.h"
BYPRODUCTS "${APP_PROOF_DIR}/sync_retry_table.h"
"${APP_PROOF_DIR}/storage_layout.h"
WORKING_DIRECTORY "${REPO_ROOT}"
COMMENT "Checking release consistency and proving app laws"
VERBATIM
)
set(KRYON_K2C "${CMAKE_BINARY_DIR}/host-tools/k2c")
# needs the kir headers on the include path
set(INBE_KRY_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated")
file(GLOB_RECURSE INBE_KRY_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/*.kry")
list(SORT INBE_KRY_SOURCES)
set(APP_KRY_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated")
file(GLOB_RECURSE APP_KRY_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/*.kry")
list(SORT APP_KRY_SOURCES)
# App-layer sources are cross-platform modules that belong in every build.
# Glob them so adding an app .c file needs no edit here -- this list had
# drifted out of sync with the Makefile APP_SRCS more than once.
file(GLOB APP_C_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/app/*.c")
list(SORT APP_C_SOURCES)
set(INBE_KRY_GENERATED_SOURCES)
set(INBE_KRY_GENERATED_HEADERS)
set(INBE_KRY_COMMAND_SOURCES)
foreach(kry_source ${INBE_KRY_SOURCES})
set(APP_KRY_GENERATED_SOURCES)
set(APP_KRY_GENERATED_HEADERS)
set(APP_KRY_COMMAND_SOURCES)
foreach(kry_source ${APP_KRY_SOURCES})
file(RELATIVE_PATH kry_rel "${REPO_ROOT}" "${kry_source}")
list(APPEND INBE_KRY_COMMAND_SOURCES "${kry_rel}")
list(APPEND APP_KRY_COMMAND_SOURCES "${kry_rel}")
get_filename_component(kry_rel_dir "${kry_rel}" DIRECTORY)
get_filename_component(kry_name "${kry_rel}" NAME_WE)
set(kry_output_c "${INBE_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.c")
set(kry_output_h "${INBE_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.h")
list(APPEND INBE_KRY_GENERATED_SOURCES "${kry_output_c}")
list(APPEND INBE_KRY_GENERATED_HEADERS "${kry_output_h}")
set(kry_output_c "${APP_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.c")
set(kry_output_h "${APP_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.h")
list(APPEND APP_KRY_GENERATED_SOURCES "${kry_output_c}")
list(APPEND APP_KRY_GENERATED_HEADERS "${kry_output_h}")
endforeach()
set(INBE_KRY_PROJECT_HEADER "${INBE_KRY_GEN_DIR}/kryon_project.h")
set(APP_KRY_PROJECT_HEADER "${APP_KRY_GEN_DIR}/kryon_project.h")
add_custom_command(
OUTPUT ${INBE_KRY_GENERATED_SOURCES} ${INBE_KRY_GENERATED_HEADERS} "${INBE_KRY_PROJECT_HEADER}"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INBE_KRY_GEN_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${INBE_KRY_GEN_DIR}"
COMMAND "${KRYON_K2C}" --root "${REPO_ROOT}" -o "${INBE_KRY_GEN_DIR}" ${INBE_KRY_COMMAND_SOURCES}
DEPENDS ${INBE_KRY_SOURCES} "${KRYON_K2C}"
OUTPUT ${APP_KRY_GENERATED_SOURCES} ${APP_KRY_GENERATED_HEADERS} "${APP_KRY_PROJECT_HEADER}"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${APP_KRY_GEN_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${APP_KRY_GEN_DIR}"
COMMAND "${KRYON_K2C}" --root "${REPO_ROOT}" -o "${APP_KRY_GEN_DIR}" ${APP_KRY_COMMAND_SOURCES}
DEPENDS ${APP_KRY_SOURCES} "${KRYON_K2C}"
WORKING_DIRECTORY "${REPO_ROOT}"
VERBATIM
)
@@ -100,15 +134,52 @@ add_custom_command(
OUTPUT "${KRYON_K2C}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/host-tools"
# VERBATIM escapes embedded quotes, so unquoted -I paths (no spaces here)
COMMAND "${HOST_CC}" -Wall -Wextra -O2 -I${KRYON_DIR}/cmd/kir -I${KRYON_DIR}/cmd/k2c -o "${KRYON_K2C}" ${KRYON_K2C_SOURCES}
DEPENDS ${KRYON_K2C_SOURCES}
COMMAND "${HOST_CC}" -Wall -Wextra -O2 -I${KRYON_DIR}/include -I${KRYON_DIR}/cmd/kir -I${KRYON_DIR}/cmd/k2c -o "${KRYON_K2C}" ${KRYON_K2C_SOURCES}
DEPENDS ${KRYON_K2C_SOURCES} ${KRYON_K2C_HEADERS}
VERBATIM
)
add_custom_target(inbe_kry_generated DEPENDS
${INBE_KRY_GENERATED_SOURCES}
${INBE_KRY_GENERATED_HEADERS}
"${INBE_KRY_PROJECT_HEADER}"
# Kryon ships part of its runtime as Kry modules transpiled at build time
# (runtime/*.kry -> generated/src/runtime/*.c). Downstream C builds compile
# the generated sources and put their directory on the include path so
# kryon's own C files can #include "runtime/*.h".
set(KRYON_RUNTIME_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated-runtime")
file(GLOB KRYON_RUNTIME_MODULE_FILES CONFIGURE_DEPENDS
"${KRYON_DIR}/runtime/*.kry")
set(KRYON_RUNTIME_KRY_MODULES)
foreach(kryon_module_file ${KRYON_RUNTIME_MODULE_FILES})
file(RELATIVE_PATH kryon_module "${KRYON_DIR}" "${kryon_module_file}")
list(APPEND KRYON_RUNTIME_KRY_MODULES "${kryon_module}")
endforeach()
set(KRYON_RUNTIME_KRY_FILES)
set(KRYON_RUNTIME_GENERATED_C)
foreach(kryon_module ${KRYON_RUNTIME_KRY_MODULES})
list(APPEND KRYON_RUNTIME_KRY_FILES "${KRYON_DIR}/${kryon_module}")
string(REGEX REPLACE "\\.kry$" ".c" kryon_module_c "${kryon_module}")
list(APPEND KRYON_RUNTIME_GENERATED_C "${KRYON_RUNTIME_GEN_DIR}/${kryon_module_c}")
endforeach()
add_custom_command(
OUTPUT ${KRYON_RUNTIME_GENERATED_C}
COMMAND "${KRYON_K2C}" --strict --no-main --root "${KRYON_DIR}" -o "${KRYON_RUNTIME_GEN_DIR}" ${KRYON_RUNTIME_KRY_MODULES}
DEPENDS "${KRYON_K2C}" ${KRYON_RUNTIME_KRY_FILES}
WORKING_DIRECTORY "${KRYON_DIR}"
VERBATIM
)
add_custom_target(kryon_runtime_generated DEPENDS ${KRYON_RUNTIME_GENERATED_C})
list(APPEND KRYON_SOURCES ${KRYON_RUNTIME_GENERATED_C})
add_custom_target(app_kry_generated DEPENDS
${APP_KRY_GENERATED_SOURCES}
${APP_KRY_GENERATED_HEADERS}
"${APP_KRY_PROJECT_HEADER}"
)
add_custom_target(app_clean_runtime_api
COMMAND "${HOST_PYTHON}"
"${KRYON_DIR}/scripts/check-clean-text-api.py"
"${SRC_DIR}"
WORKING_DIRECTORY "${REPO_ROOT}"
COMMENT "Rejecting stale or duplicate Kryon runtime API usage"
VERBATIM
)
add_dependencies(app_kry_generated app_clean_runtime_api app_build_laws)
add_custom_command(
OUTPUT
@@ -133,37 +204,42 @@ add_custom_target(kryon_raylib_generated DEPENDS
"${KRYON_RAYLIB_WRAPPERS_C}"
"${KRYON_NULL_BACKEND_C}"
)
file(GLOB INBE_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
file(GLOB INBE_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
file(GLOB INBE_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/practices/*/banner.png")
set(INBE_EMBEDDED_INPUTS
${INBE_LOCALE_ASSETS}
file(GLOB APP_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
file(GLOB APP_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
file(GLOB APP_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/practices/*/banner*.png")
file(GLOB APP_STYLE_ASSETS RELATIVE "${REPO_ROOT}"
"${KRYON_DIR}/styles/kryon/*.kss" "${REPO_ROOT}/assets/styles/*.kss")
set(APP_EMBEDDED_INPUTS
${APP_STYLE_ASSETS}
${APP_LOCALE_ASSETS}
assets/app/icon-sky-cradle.png
assets/app/icon-ink-and-air.png
assets/easteregg/art.png
assets/easteregg/waozi.png
assets/practices/whm/1.png
assets/practices/whm/2.png
assets/practices/meditation/1.png
assets/pet/egg1.png
${INBE_PRACTICE_BANNER_ASSETS}
${APP_PRACTICE_BANNER_ASSETS}
assets/practices/sunsalutation/poses_man_sheet.png
assets/practices/sunsalutation/poses_woman_sheet.png
assets/fonts/subset/NotoSans-Inbe-Regular.ttf
assets/fonts/subset/NotoSansSC-Inbe-Regular.otf
assets/fonts/subset/NotoSansJP-Inbe-Regular.otf
assets/fonts/subset/NotoSansKR-Inbe-Regular.otf
assets/fonts/subset/NotoSansTC-Inbe-Regular.otf
${INBE_SOUND_ASSETS}
assets/fonts/subset/NotoSans-App-Regular.ttf
assets/fonts/subset/NotoSansSC-App-Regular.otf
assets/fonts/subset/NotoSansJP-App-Regular.otf
assets/fonts/subset/NotoSansKR-App-Regular.otf
assets/fonts/subset/NotoSansTC-App-Regular.otf
${APP_SOUND_ASSETS}
)
set(INBE_EMBEDDED_DEPS)
foreach(asset ${INBE_EMBEDDED_INPUTS})
list(APPEND INBE_EMBEDDED_DEPS "${REPO_ROOT}/${asset}")
set(APP_EMBEDDED_DEPS)
foreach(asset ${APP_EMBEDDED_INPUTS})
list(APPEND APP_EMBEDDED_DEPS "${REPO_ROOT}/${asset}")
endforeach()
set(INBE_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/inbe_embedded_assets.c")
set(APP_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/app_embedded_assets.c")
add_custom_command(
OUTPUT "${INBE_EMBEDDED_ASSETS_C}"
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${INBE_EMBEDDED_ASSETS_C}" ${INBE_EMBEDDED_INPUTS}
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" ${INBE_EMBEDDED_DEPS}
OUTPUT "${APP_EMBEDDED_ASSETS_C}"
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${APP_EMBEDDED_ASSETS_C}" ${APP_EMBEDDED_INPUTS}
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" ${APP_EMBEDDED_DEPS}
WORKING_DIRECTORY "${REPO_ROOT}"
VERBATIM
)
@@ -206,7 +282,7 @@ target_compile_definitions(raylib PRIVATE
target_compile_options(raylib PRIVATE
-include "${KRYON_RAYLIB_BACKEND_RENAME_HEADER}"
-Os
-Oz
-ffunction-sections
-fdata-sections
)
@@ -217,26 +293,43 @@ target_include_directories(raylib PUBLIC
)
add_library(main SHARED
"${SRC_DIR}/main.c"
"${SRC_DIR}/platform/main_host.c"
${APP_C_SOURCES}
"${SRC_DIR}/storage/storage.c"
"${SRC_DIR}/storage/sync_client.c"
"${SRC_DIR}/third_party/miniz.c"
"${SRC_DIR}/storage/storage_json_builder.c"
"${SQLITE_AMALGAMATION_C}"
"${SRC_DIR}/platform/android/android_device.c"
"${SRC_DIR}/platform/android/android_share.c"
"${INBE_EMBEDDED_ASSETS_C}"
${INBE_KRY_GENERATED_SOURCES}
"${APP_EMBEDDED_ASSETS_C}"
${APP_KRY_GENERATED_SOURCES}
${KRYON_SOURCES}
"${KRYON_RAYLIB_WRAPPERS_C}"
"${SRC_DIR}/platform/android/android_insets.c"
"${NATIVE_APP_GLUE_DIR}/android_native_app_glue.c"
)
add_dependencies(main inbe_kry_generated kryon_raylib_generated)
add_dependencies(main app_kry_generated kryon_raylib_generated
kryon_runtime_generated app_build_laws)
file(GLOB_RECURSE KRYON_ICON_FILES CONFIGURE_DEPENDS "${KRYON_DIR}/icons/*.png" "${KRYON_DIR}/icons/*.json")
add_custom_command(
OUTPUT "${KRYON_ICON_ASSETS_C}" "${KRYON_ICON_NAMES_C}" "${KRYON_ICON_TYPES_H}"
COMMAND "${HOST_PYTHON}" "${KRYON_DIR}/scripts/embed-icon-sheets.py"
icons
"${KRYON_ICON_ASSETS_C}"
--types-output "${KRYON_ICON_TYPES_H}"
--names-output "${KRYON_ICON_NAMES_C}"
DEPENDS "${KRYON_DIR}/scripts/embed-icon-sheets.py" "${KRYON_DIR}/include/ui_icons.h" ${KRYON_ICON_FILES}
WORKING_DIRECTORY "${KRYON_DIR}"
VERBATIM)
add_custom_target(kryon_icon_assets_generated DEPENDS "${KRYON_ICON_ASSETS_C}" "${KRYON_ICON_NAMES_C}" "${KRYON_ICON_TYPES_H}")
add_dependencies(main kryon_icon_assets_generated)
target_include_directories(main PRIVATE
"${APP_PROOF_DIR}"
"${KRYON_ICON_GENERATED_INCLUDE_DIR}"
"${KRYON_DIR}/include"
"${KRYON_DIR}/src"
"${KRYON_DIR}/vendor/monocypher/src"
"${KRYON_DIR}/vendor/monocypher/src/optional"
"${SRC_DIR}"
"${SRC_DIR}/app"
"${SRC_DIR}/core"
@@ -249,8 +342,9 @@ target_include_directories(main PRIVATE
"${SRC_DIR}/storage"
"${SRC_DIR}/platform/android"
"${SRC_DIR}/third_party"
"${INBE_KRY_GEN_DIR}"
"${INBE_KRY_GEN_DIR}/src"
"${APP_KRY_GEN_DIR}"
"${APP_KRY_GEN_DIR}/src"
"${KRYON_RUNTIME_GEN_DIR}"
"${NATIVE_APP_GLUE_DIR}"
"${SQLITE_BUILD_DIR}"
)
@@ -269,11 +363,12 @@ target_compile_definitions(main PRIVATE
SUPPORT_FILEFORMAT_OGG=1
UI_EMBEDDED_ONLY=1
HAS_LIBOQS=1
KRYON_WITH_SYNC=1
KRYON_WITH_PHYSICS=0
)
target_compile_options(main PRIVATE
-Os
-Oz
-ffunction-sections
-fdata-sections
-fvisibility=hidden
@@ -281,11 +376,13 @@ target_compile_options(main PRIVATE
target_link_options(main PRIVATE
-Wl,--gc-sections
-Wl,--strip-all
-Wl,-z,max-page-size=16384
-Wl,-z,common-page-size=16384
-Wl,--wrap=fopen
)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_options(main PRIVATE -Wl,--strip-all)
endif()
target_link_libraries(main
raylib
@@ -295,5 +392,6 @@ target_link_libraries(main
OpenSLES
EGL
GLESv2
z
m
)
@@ -23,7 +23,7 @@ import kotlin.coroutines.EmptyCoroutineContext
import kotlin.coroutines.startCoroutine
/**
* One-way push of finished inbe sessions into Health Connect: meditation
* One-way push of finished sessions into Health Connect: meditation
* and the breathwork practices become mindfulness sessions (meditation /
* breathing types), sun salutation becomes a yoga exercise session. The
* native side writes the session list (start,end,activity per CSV line);
@@ -0,0 +1,68 @@
package xyz.waozi.inbe;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
import android.util.Log;
/** The component state is device-local and survives process restarts and upgrades. */
final class LauncherIcons {
static final int SKY_CRADLE = 0;
static final int INK_AND_AIR = 1;
private static final String[] ALIASES = {
"xyz.waozi.inbe.SkyCradleLauncher",
"xyz.waozi.inbe.InkAndAirLauncher"
};
private LauncherIcons() {
}
private static ComponentName component(Context context, int icon) {
// The application ID has a .debug suffix in debug builds; alias names don't.
return new ComponentName(context.getPackageName(), ALIASES[icon]);
}
private static boolean enabled(Context context, int icon) {
int state = context.getPackageManager().getComponentEnabledSetting(component(context, icon));
return state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|| (state == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT && icon == SKY_CRADLE);
}
static synchronized int selected(Context context) {
return enabled(context, INK_AND_AIR) ? INK_AND_AIR : SKY_CRADLE;
}
static synchronized boolean select(Context context, int icon) {
if (icon != SKY_CRADLE && icon != INK_AND_AIR) {
return false;
}
PackageManager manager = context.getPackageManager();
int previous = selected(context);
int other = icon == SKY_CRADLE ? INK_AND_AIR : SKY_CRADLE;
if (enabled(context, icon) && !enabled(context, other)) {
return true;
}
try {
// Always leave a launchable entry, including on Android 21–32 where
// component changes cannot be applied atomically. Never disable MainActivity.
manager.setComponentEnabledSetting(component(context, icon),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
manager.setComponentEnabledSetting(component(context, other),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
Log.i("LauncherIcons", "Selected " + ALIASES[icon]);
return true;
} catch (RuntimeException error) {
Log.e("LauncherIcons", "Could not change launcher icon", error);
try {
manager.setComponentEnabledSetting(component(context, previous),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
int unused = previous == SKY_CRADLE ? INK_AND_AIR : SKY_CRADLE;
manager.setComponentEnabledSetting(component(context, unused),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
} catch (RuntimeException restoreError) {
Log.e("LauncherIcons", "Could not restore launcher icon", restoreError);
}
return false;
}
}
}
@@ -12,18 +12,12 @@ import android.content.pm.PackageManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.graphics.Insets;
import android.graphics.Rect;
import android.net.Uri;
import android.widget.Toast;
import android.app.AlertDialog;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
import org.unifiedpush.android.connector.UnifiedPush;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -40,8 +34,6 @@ import android.view.WindowInsetsController;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import androidx.core.view.WindowCompat;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
@@ -52,7 +44,7 @@ import java.net.URL;
import java.util.Arrays;
public class MainActivity extends NativeActivity {
private static final String TAG = "InbeMainActivity";
private static final String TAG = "MainActivity";
private static final int REQUEST_IMPORT_ZIP = 1001;
private static final int REQUEST_POST_NOTIFICATIONS = 1002;
private static final int REQUEST_HEALTH_CONNECT = HealthConnectExport.REQUEST_CODE;
@@ -71,8 +63,8 @@ public class MainActivity extends NativeActivity {
System.loadLibrary("main");
}
// [status_bar, nav_bar, cutouts] mirrored in native.
private final int[] cachedInsets = new int[6];
// [system bars, IME, cutouts] mirrored in native.
private final int[] cachedInsets = new int[9];
private boolean activityPaused = false;
private boolean windowFocused = true;
private boolean backgroundExecutionActive = false;
@@ -87,7 +79,7 @@ public class MainActivity extends NativeActivity {
private int pendingDebugDonationReminderRetries = 0;
private final Handler mainHandler = new Handler(Looper.getMainLooper());
private native void nativeSetInsets(int status, int nav,
private native void nativeSetInsets(int left, int top, int right, int bottom, int imeBottom,
int cutoutLeft, int cutoutTop, int cutoutRight, int cutoutBottom);
private native void nativeSetDeviceDensity(float density);
private native void nativeSetSystemDark(int dark);
@@ -334,7 +326,7 @@ public class MainActivity extends NativeActivity {
}
}
}
}, "inbe-runtime-asset-download").start();
}, "runtime-asset-download").start();
}
public String syncHttpRequest(String method, String urlText, String body, String[] headers) {
@@ -617,7 +609,7 @@ public class MainActivity extends NativeActivity {
importName = hasExt ? displayName : displayName + "."
+ (extension != null && !extension.isEmpty() ? extension : "bin");
} else {
importName = "inbe-import-" + pendingImportKind
importName = "import-" + pendingImportKind
+ (extension != null && !extension.isEmpty() ? "." + extension : "");
}
File importFile = new File(importDir, importName);
@@ -656,96 +648,38 @@ public class MainActivity extends NativeActivity {
}
}
/**
* Called from native settings: set up UnifiedPush. With no distributor
* installed, offer Sunup on F-Droid; with several, let the user pick.
*/
public boolean isUnifiedPushRegistered() {
return PushServiceImpl.getEndpoint(this) != null;
return PushBridge.isRegistered(this);
}
public String[] getUnifiedPushDistributors() {
final List<String> distributors = UnifiedPush.getDistributors(this);
return distributors.toArray(new String[0]);
return PushBridge.getDistributors(this);
}
public String[] getUnifiedPushDistributorLabels() {
PackageManager pm = getPackageManager();
List<String> labels = new ArrayList<>();
for (String pkg : UnifiedPush.getDistributors(this)) {
try {
labels.add(pm.getApplicationLabel(
pm.getApplicationInfo(pkg, 0)).toString());
} catch (PackageManager.NameNotFoundException e) {
labels.add(pkg);
}
}
return labels.toArray(new String[0]);
return PushBridge.getDistributorLabels(this);
}
public String[] getUnifiedPushDistributorIcons() {
PackageManager pm = getPackageManager();
File dir = new File(getCacheDir(), "push-icons");
if (!dir.exists()) {
dir.mkdirs();
}
List<String> paths = new ArrayList<>();
List<String> distributors = UnifiedPush.getDistributors(this);
for (int i = 0; i < distributors.size(); i++) {
File out = new File(dir, "icon_" + i + ".png");
try {
Drawable drawable = pm.getApplicationIcon(distributors.get(i));
Bitmap bmp = Bitmap.createBitmap(96, 96, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmp);
drawable.setBounds(0, 0, 96, 96);
drawable.draw(canvas);
FileOutputStream fos = new FileOutputStream(out);
bmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.close();
paths.add(out.getAbsolutePath());
} catch (Exception e) {
Log.w(TAG, "icon export failed for " + distributors.get(i), e);
paths.add("");
}
}
return paths.toArray(new String[0]);
return PushBridge.getDistributorIcons(this);
}
public void configureUnifiedPushWith(final String pkg) {
runOnUiThread(new Runnable() {
@Override
public void run() {
requestNotificationPermissionIfNeeded();
UnifiedPush.saveDistributor(MainActivity.this, pkg);
UnifiedPush.register(MainActivity.this, "inbe", "Inner Breeze", null);
Toast.makeText(MainActivity.this,
"Push: registering with " + pkg,
Toast.LENGTH_SHORT).show();
}
});
requestNotificationPermissionIfNeeded();
PushBridge.configureWith(this, pkg);
}
public void configureUnifiedPush() {
// Called via JNI from the native render thread; toasts, dialogs and
// permission requests need the UI thread's Looper. Only reached when
// no distributor is installed at all.
runOnUiThread(new Runnable() {
@Override
public void run() {
if (!UnifiedPush.getDistributors(MainActivity.this).isEmpty()) {
return;
}
Toast.makeText(MainActivity.this,
"Install a UnifiedPush distributor (e.g. Sunup)",
Toast.LENGTH_LONG).show();
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(
"https://f-droid.org/en/packages/org.unifiedpush.distributor.sunup/")));
} catch (Exception e) {
Log.w(TAG, "no activity to open F-Droid");
}
}
});
requestNotificationPermissionIfNeeded();
PushBridge.configure(this);
}
public String paymentChannel() {
return PaymentBridge.channel();
}
public void purchaseTokens(final String productId, final String accountId, final String authToken) {
PaymentBridge.purchaseTokens(this, productId, accountId, authToken);
}
public void acquireWakeLock() {
@@ -808,6 +742,14 @@ public class MainActivity extends NativeActivity {
});
}
public int getAppIcon() {
return LauncherIcons.selected(this);
}
public boolean setAppIcon(int icon) {
return LauncherIcons.select(this, icon);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
configureSystemBars();
@@ -815,7 +757,7 @@ public class MainActivity extends NativeActivity {
configureSystemBars();
synchronized (cachedInsets) {
for (int i = 0; i < 6; i++) {
for (int i = 0; i < cachedInsets.length; i++) {
cachedInsets[i] = 0;
}
}
@@ -958,19 +900,29 @@ public class MainActivity extends NativeActivity {
if (insets == null) return;
try {
int statusBar = 0;
int navBar = 0;
int systemLeft = 0;
int systemTop = 0;
int systemRight = 0;
int systemBottom = 0;
int imeBottom = 0;
int cLeft = 0, cTop = 0, cRight = 0, cBottom = 0;
// Inbe owns a single edge-to-edge native surface. Java reports the
// This app owns a single edge-to-edge native surface. Java reports the
// system bar insets; native applies them once against the real GL surface.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Insets systemBars = insets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars());
statusBar = systemBars.top;
navBar = systemBars.bottom;
Insets ime = insets.getInsets(WindowInsets.Type.ime());
systemLeft = systemBars.left;
systemTop = systemBars.top;
systemRight = systemBars.right;
systemBottom = systemBars.bottom;
imeBottom = ime.bottom;
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
statusBar = insets.getSystemWindowInsetTop();
navBar = insets.getSystemWindowInsetBottom();
systemLeft = insets.getSystemWindowInsetLeft();
systemTop = insets.getSystemWindowInsetTop();
systemRight = insets.getSystemWindowInsetRight();
systemBottom = insets.getSystemWindowInsetBottom();
imeBottom = inferImeBottom(systemBottom);
}
// Display cutout calculations
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
@@ -984,15 +936,19 @@ public class MainActivity extends NativeActivity {
}
synchronized (cachedInsets) {
cachedInsets[0] = statusBar;
cachedInsets[1] = navBar;
cachedInsets[2] = cLeft;
cachedInsets[3] = cTop;
cachedInsets[4] = cRight;
cachedInsets[5] = cBottom;
cachedInsets[0] = systemLeft;
cachedInsets[1] = systemTop;
cachedInsets[2] = systemRight;
cachedInsets[3] = systemBottom;
cachedInsets[4] = imeBottom;
cachedInsets[5] = cLeft;
cachedInsets[6] = cTop;
cachedInsets[7] = cRight;
cachedInsets[8] = cBottom;
}
nativeSetInsets(statusBar, navBar, cLeft, cTop, cRight, cBottom);
nativeSetInsets(systemLeft, systemTop, systemRight, systemBottom, imeBottom,
cLeft, cTop, cRight, cBottom);
// Set device density for proper DPI scaling
DisplayMetrics metrics = new DisplayMetrics();
@@ -1006,16 +962,27 @@ public class MainActivity extends NativeActivity {
/**
* Called from native code via JNI to pull array memory safely.
* * @return Array copy containing [status, nav, left, top, right, bottom]
* * @return Array copy containing [left, top, right, bottom, ime bottom, cutout left, top, right, bottom]
*/
public int[] getInsetsNative() {
int[] result = new int[6];
int[] result = new int[9];
synchronized (cachedInsets) {
System.arraycopy(cachedInsets, 0, result, 0, 6);
System.arraycopy(cachedInsets, 0, result, 0, cachedInsets.length);
}
return result;
}
private int inferImeBottom(int navBar) {
View decorView = getWindow().getDecorView();
Rect visible = new Rect();
decorView.getWindowVisibleDisplayFrame(visible);
int rootHeight = decorView.getRootView().getHeight();
int hiddenBottom = rootHeight - visible.bottom;
if (hiddenBottom <= navBar) return 0;
return hiddenBottom;
}
private void syncLifecycleState(String reason) {
int playInBackground = nativeGetPlayInBackground();
boolean shouldRunInBackground = playInBackground != 0 && activityPaused;
@@ -0,0 +1,127 @@
package xyz.waozi.inbe;
import android.widget.Toast;
import java.lang.reflect.Method;
import org.json.JSONObject;
final class PaymentBridge {
private static final String DAOCHI_BASE_URL = "https://api.waozi.xyz";
private PaymentBridge() {}
static String channel() {
String gplayChannel = gplayChannel();
if (gplayChannel != null) {
return gplayChannel;
}
return "monero";
}
static void purchaseTokens(final MainActivity activity, final String productId,
final String accountId, final String authToken) {
if (purchaseGplayTokens(activity, productId, accountId, authToken)) {
return;
}
new Thread(new Runnable() {
@Override
public void run() {
try {
String body = "{\"app_id\":\"inbe\",\"product_id\":\"" + jsonEscape(productId) + "\"}";
String response = SyncNetwork.httpRequest("PAYMENTS", "POST",
DAOCHI_BASE_URL + "/api/v1/tokens/purchases/monero/invoices",
body, authHeaders(authToken));
final Invoice invoice = parseInvoice(response);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (invoice.ok) {
Toast.makeText(activity,
"Send " + invoice.atomicAmount + " atomic XMR to " + invoice.address,
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(activity, invoice.message, Toast.LENGTH_LONG).show();
}
}
});
} catch (Exception e) {
showToast(activity, "Monero invoice failed");
}
}
}, "monero-token-invoice").start();
}
private static String gplayChannel() {
try {
Method method = Class.forName("xyz.waozi.inbe.GplayPaymentBridge").getDeclaredMethod("channel");
method.setAccessible(true);
return (String) method.invoke(null);
} catch (ClassNotFoundException e) {
return null;
} catch (Exception e) {
return "disabled";
}
}
private static boolean purchaseGplayTokens(MainActivity activity, String productId,
String accountId, String authToken) {
try {
Method method = Class.forName("xyz.waozi.inbe.GplayPaymentBridge").getDeclaredMethod(
"purchaseTokens", MainActivity.class, String.class, String.class, String.class);
method.setAccessible(true);
method.invoke(null, activity, productId, accountId, authToken);
return true;
} catch (ClassNotFoundException e) {
return false;
} catch (Exception e) {
showToast(activity, "Token purchases are not available in this build.");
return true;
}
}
private static String[] authHeaders(String authToken) {
return new String[] {
"Content-Type: application/json",
"Authorization: Bearer " + (authToken != null ? authToken : "")
};
}
private static Invoice parseInvoice(String response) throws Exception {
int newline = response.indexOf('\n');
int status = newline > 0 ? Integer.parseInt(response.substring(0, newline).trim()) : 0;
String body = newline >= 0 ? response.substring(newline + 1) : "";
if (status < 200 || status >= 300) {
return new Invoice(false, "Monero invoice unavailable", "", 0);
}
JSONObject json = new JSONObject(body);
return new Invoice(true, "", json.optString("address", ""),
json.optLong("atomic_amount", 0));
}
private static void showToast(final MainActivity activity, final String message) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(activity, message, Toast.LENGTH_LONG).show();
}
});
}
private static String jsonEscape(String value) {
if (value == null) return "";
return value.replace("\\", "\\\\").replace("\"", "\\\"");
}
private static final class Invoice {
final boolean ok;
final String message;
final String address;
final long atomicAmount;
Invoice(boolean ok, String message, String address, long atomicAmount) {
this.ok = ok;
this.message = message;
this.address = address;
this.atomicAmount = atomicAmount;
}
}
}
@@ -0,0 +1,141 @@
package xyz.waozi.inbe;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.widget.Toast;
import java.io.File;
import java.io.FileOutputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.unifiedpush.android.connector.UnifiedPush;
final class PushBridge {
private PushBridge() {}
static boolean isRegistered(MainActivity activity) {
if (BuildConfig.GPLAY) {
Object value = callGplay("isRegistered", new Class<?>[] {MainActivity.class}, activity);
if (value instanceof Boolean) {
return (Boolean) value;
}
}
return PushServiceImpl.getEndpoint(activity) != null;
}
static String[] getDistributors(MainActivity activity) {
if (BuildConfig.GPLAY) {
Object value = callGplay("getDistributors", new Class<?>[] {MainActivity.class}, activity);
if (value instanceof String[]) {
return (String[]) value;
}
}
List<String> distributors = UnifiedPush.getDistributors(activity);
return distributors.toArray(new String[0]);
}
static String[] getDistributorLabels(MainActivity activity) {
if (BuildConfig.GPLAY) {
Object value = callGplay("getDistributorLabels", new Class<?>[] {MainActivity.class}, activity);
if (value instanceof String[]) {
return (String[]) value;
}
}
PackageManager pm = activity.getPackageManager();
List<String> labels = new ArrayList<>();
for (String pkg : UnifiedPush.getDistributors(activity)) {
try {
labels.add(pm.getApplicationLabel(pm.getApplicationInfo(pkg, 0)).toString());
} catch (PackageManager.NameNotFoundException e) {
labels.add(pkg);
}
}
return labels.toArray(new String[0]);
}
static String[] getDistributorIcons(MainActivity activity) {
if (BuildConfig.GPLAY) {
Object value = callGplay("getDistributorIcons", new Class<?>[] {MainActivity.class}, activity);
if (value instanceof String[]) {
return (String[]) value;
}
}
PackageManager pm = activity.getPackageManager();
File dir = new File(activity.getCacheDir(), "push-icons");
if (!dir.exists()) {
dir.mkdirs();
}
List<String> paths = new ArrayList<>();
List<String> distributors = UnifiedPush.getDistributors(activity);
for (int i = 0; i < distributors.size(); i++) {
File out = new File(dir, "icon_" + i + ".png");
try {
Drawable drawable = pm.getApplicationIcon(distributors.get(i));
Bitmap bmp = Bitmap.createBitmap(96, 96, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmp);
drawable.setBounds(0, 0, 96, 96);
drawable.draw(canvas);
FileOutputStream fos = new FileOutputStream(out);
bmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.close();
paths.add(out.getAbsolutePath());
} catch (Exception e) {
paths.add("");
}
}
return paths.toArray(new String[0]);
}
static void configureWith(final MainActivity activity, final String pkg) {
if (BuildConfig.GPLAY && callGplay("configureWith",
new Class<?>[] {MainActivity.class, String.class}, activity, pkg) != null) {
return;
}
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
UnifiedPush.saveDistributor(activity, pkg);
UnifiedPush.register(activity, "inbe", "Inner Breeze", null);
Toast.makeText(activity, "Push: registering with " + pkg, Toast.LENGTH_SHORT).show();
}
});
}
static void configure(final MainActivity activity) {
if (BuildConfig.GPLAY && callGplay("configure",
new Class<?>[] {MainActivity.class}, activity) != null) {
return;
}
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (!UnifiedPush.getDistributors(activity).isEmpty()) {
return;
}
Toast.makeText(activity, "Install a UnifiedPush distributor (e.g. Sunup)", Toast.LENGTH_LONG).show();
try {
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(
"https://f-droid.org/en/packages/org.unifiedpush.distributor.sunup/")));
} catch (Exception ignored) {
}
}
});
}
private static Object callGplay(String name, Class<?>[] parameterTypes, Object... args) {
try {
Method method = Class.forName("xyz.waozi.inbe.GplayPushBridge").getDeclaredMethod(name, parameterTypes);
method.setAccessible(true);
Object value = method.invoke(null, args);
return value != null ? value : Boolean.TRUE;
} catch (ClassNotFoundException e) {
return null;
} catch (Exception e) {
return null;
}
}
}
@@ -5,32 +5,18 @@ import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.util.Log;
import org.unifiedpush.android.connector.FailedReason;
import org.unifiedpush.android.connector.PushService;
import org.unifiedpush.android.connector.data.PublicKeySet;
import org.unifiedpush.android.connector.data.PushEndpoint;
import org.unifiedpush.android.connector.data.PushMessage;
import org.unifiedpush.android.connector.data.PublicKeySet;
/**
* UnifiedPush message entry point (unifiedpush.org, spec AND_3.1.0).
*
* The user installs any distributor -- Sunup from F-Droid
* (org.unifiedpush.distributor.sunup), ntfy, NextPush, ... -- and this app
* receives pushes without Google services. The distributor starts this
* service directly, so it works while the native app is not running.
*
* Message protocol (v1): the pushed bytes are UTF-8 text; the first line is
* the notification title, the rest is the body. Cleartext only -- keep
* payloads under the ~3993-byte spec limit; encryption is a follow-up.
*/
public class PushServiceImpl extends PushService {
private static final String TAG = "INBE_PUSH";
private static final String PREFS = "inbe_push";
private static final String TAG = "PUSH";
private static final String PREFS = "push";
private static final String PREF_ENDPOINT = "endpoint";
private static final String PREF_AUTH = "auth";
private static final String PREF_P256DH = "p256dh";
@@ -53,15 +39,10 @@ public class PushServiceImpl extends PushService {
@Override
public void onNewEndpoint(PushEndpoint endpoint, String instance) {
Log.d(TAG, "new endpoint (temporary=" + endpoint.getTemporary() + ")");
SharedPreferences.Editor e = prefs().edit()
.putString(PREF_ENDPOINT, endpoint.getUrl());
// Encrypted distributors (Sunup/Mozilla) require RFC8291 aes128gcm
// payloads: the sender encrypts with these keys, and the connector
// decrypts on receipt. Stored so the sync server can use them.
SharedPreferences.Editor e = prefs().edit().putString(PREF_ENDPOINT, endpoint.getUrl());
PublicKeySet keys = endpoint.getPubKeySet();
if (keys != null) {
e.putString(PREF_AUTH, keys.getAuth())
.putString(PREF_P256DH, keys.getPubKey());
e.putString(PREF_AUTH, keys.getAuth()).putString(PREF_P256DH, keys.getPubKey());
} else {
e.remove(PREF_AUTH).remove(PREF_P256DH);
}
@@ -80,8 +61,7 @@ public class PushServiceImpl extends PushService {
}
public static String getEndpoint(Context context) {
return context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
.getString(PREF_ENDPOINT, null);
return context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getString(PREF_ENDPOINT, null);
}
private SharedPreferences prefs() {
@@ -90,12 +70,9 @@ public class PushServiceImpl extends PushService {
private void showNotification(String title, String body) {
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
if (nm == null)
return;
if (Build.VERSION.SDK_INT >= 26 &&
nm.getNotificationChannel(CHANNEL_ID) == null) {
nm.createNotificationChannel(new NotificationChannel(CHANNEL_ID,
"Push messages", NotificationManager.IMPORTANCE_DEFAULT));
if (nm == null) return;
if (Build.VERSION.SDK_INT >= 26 && nm.getNotificationChannel(CHANNEL_ID) == null) {
nm.createNotificationChannel(new NotificationChannel(CHANNEL_ID, "Push messages", NotificationManager.IMPORTANCE_DEFAULT));
}
PendingIntent pi = PendingIntent.getActivity(this, 0,
getPackageManager().getLaunchIntentForPackage(getPackageName()),
@@ -16,7 +16,7 @@ import android.util.Log;
public class SessionForegroundService extends Service {
public static final String ACTION_START = "xyz.waozi.inbe.action.START_SESSION_FOREGROUND";
public static final String ACTION_STOP = "xyz.waozi.inbe.action.STOP_SESSION_FOREGROUND";
private static final String TAG = "InbeSessionService";
private static final String TAG = "SessionService";
private static final String CHANNEL_ID = "active_session";
private static final int NOTIFICATION_ID = 3001;
private static String currentStatusText = "";
@@ -9,7 +9,8 @@ import java.io.File;
import java.io.FileOutputStream;
public class ShareHelper {
private static final String TAG = "InbeShare";
private static final String TAG = "Share";
private static final String FILE_PROVIDER_AUTHORITY = BuildConfig.APPLICATION_ID + ".fileprovider";
public static void shareFile(Activity activity, byte[] data, String filename, String mimeType, String chooserTitle) {
if (activity == null || data == null) return;
@@ -25,7 +26,7 @@ public class ShareHelper {
Uri contentUri = FileProvider.getUriForFile(
activity,
"xyz.waozi.inbe.fileprovider",
FILE_PROVIDER_AUTHORITY,
cacheFile
);
@@ -59,7 +60,7 @@ public class ShareHelper {
Uri contentUri = FileProvider.getUriForFile(
activity,
"xyz.waozi.inbe.fileprovider",
FILE_PROVIDER_AUTHORITY,
cacheFile
);
Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#87CEEB" />
<solid android:color="#E6F1FA" />
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 56 KiB

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_air_foreground" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_air_foreground" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Loaded 100 of 517 files, more files were not shown because too many files have changed in this diff. Show more