Compare commits

...
5 Commits
64 changed files with 238 additions and 44 deletions

No files matched your search

+8
View File
@@ -1,4 +1,12 @@
# 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.
+2 -2
View File
@@ -53,8 +53,8 @@ android {
applicationId "xyz.waozi.inbe"
minSdk 21
targetSdk 36
versionCode 124
versionName "2.0.0"
versionCode 126
versionName "2.0.2"
manifestPlaceholders = [
inbeAppLabel: "Inner Breeze",
inbeUsesCleartextTraffic: "false"
@@ -0,0 +1,3 @@
Fixed
---
- Existing installations reset navigation once to show Lists, Habits, Practice, and Settings in that order. Changes made afterward are kept.
@@ -0,0 +1,3 @@
Fixed
---
- Habit editor section headings and reminder details now align with their rows.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

@@ -0,0 +1,11 @@
Android debug build: armeabi-v7a, successful.
Device: Moto E6 Play, Android API 28.
Sky cradle (#5) is enabled by default.
Ink and air (#3) selected through the Appearance modal.
Exactly one launcher entry after each change.
Ink and air persisted across force-stop and relaunch.
Sky cradle restored through the modal.
Adaptive launcher background: #E6F1FA.
In-app previews: transparent RGBA.
Modal touch coordinates corrected for display scaling.
Locale, glyph coverage, button API, text API, vendor cleanliness, and diff whitespace checks passed.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

@@ -0,0 +1,31 @@
# Slider proposal
Status: visual proposals only, generated with the built-in image tool. No slider redesign has been implemented.
## Findings
- Inbe `draw_scale_row` shifts slider bounds right by the minus-button width and gap. This also shifts the label, whereas other settings labels use the full row's left edge.
- Kryon's `SliderLabelTextPaintFor` positions the label above the supplied bounds using font size plus a gap. The header therefore lacks space owned by the widget's layout.
- `SliderCellTextPaintFor` vertically centers the numeric value in the cell, placing it across the track. A foreground suitable for the background can have poor contrast against the filled track.
- Inbe passes the stored integer scale in tenths with `%d`, displaying `10`. It computes a separate effective DPI multiplier string but does not use it. The proposed user-facing value is the preference multiplier, `1.0×`, independent of device density.
## Recommendation
Use proposal 01 with the precise alignment shown in `recommended.png`: no additional card, label top-left at the settings margin, current value top-right, track and optional step buttons below. The image-generation outputs are illustrative; actual geometry and tick count must be deterministic in code.
## Core implementation plan
1. Extend the existing `Slider(SliderProps)` surface, not an Inbe-specific replacement. Core layout measures the entire header, interaction row, and optional supporting text inside its bounds.
2. Keep the header aligned to the outer widget bounds; inset only the track when optional decrement/increment controls are present. Default slider label inset should not silently inherit button padding.
3. Use measured text line height, wrap long labels, reserve value width, and grow the overall component height. Define behavior for narrow widths and right-to-left layout.
4. Give label, displayed value, value indicator, track, active track, thumb, and focus state independent semantic style roles. Use on-surface text for the header; pair an optional chip's background with its own contrasting foreground.
5. Format display/accessibility values separately from storage. Scale settings use 0.5×–2.5× in 0.1× increments while retaining integer-tenths storage. Do not change the applied scale during drag; preserve the current commit-on-release behavior.
6. Preserve keyboard adjustment, disabled state, touch capture, cancellation, and accessibility semantics. Proposed minimum interaction targets are 48 dp; visible track/thumb need not fill that area.
7. Keep layout decisions in shared Kryon runtime code and drawing in the relevant backend. Validate native/Go parity, all supported styles, dark/light palettes, narrow screens, large text, pointer endpoints, and long translations.
8. Implement and commit in canonical Kryon master first, then update Inbe's clean vendor pointer and simplify its row layout. Never edit the vendored runtime.
Optional proposal 03 adds a selected/dragging value indicator and discrete tick marks. Material's official slider documentation supports formatted value labels and discrete steps; the exact spacing in these mockups is a proposal, not a quoted specification.
Reference: https://github.com/material-components/material-components-android/blob/master/docs/components/Slider.md
Prompts: `prompt.md` and `detail-prompt.md`. Images: `comparison.png` and `recommended.png`.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

@@ -0,0 +1,13 @@
# Recommended Android detail
Mode: built-in image generation.
Use case: ui-mockup. Generate a precise high-fidelity Android settings design proposal, landscape comparison image with TWO enlarged flat screen crops side by side, DARK MODE and LIGHT MODE. Title "Recommended — aligned header". Inner Breeze Appearance settings, restrained classic Material 3 look, lavender accent. This is a proposed core Kryon Slider widget layout. Absolutely NO enclosing slider card, NO extra border/container around slider section, NO indent of slider label. All setting labels share exactly one vertical left alignment line.
Two panels show exactly same geometry and content, dark near-black #141218 on left, warm nearwhite #FFFBFE right, rounded dropdown outlines, classic round slider thumb. Each has centered topbar title "Appearance" with back arrow. Vertical form, NOT horizontal label/dropdown pairs:
"Style" at x=panelLeft+24, then full-width dropdown "Material" below it.
32dp below dropdown begins slider header: "Scale factor" at x=panelLeft+24, value "1.0×" at right edge x=panelRight-24. Text clear, readable on background. Label and value SAME BASELINE. Header is inside overall slider component bounds, never floating outside.
12dp space then 48dp high interaction row: circular minus button at left, horizontal track in middle, plus button at right. Thin rounded6dp track with circular20dp thumb exactly25% along track since range0.5×..2.5× and value1.0×. Dark mode lavender filled segment and thumb, muted dark-purple remaining track; light mode rich-purple filled segment and thumb, pale-purple remaining track. No digits or letters on track. No glows, no gradients, no shiny highlights. Small range endpoint labels "0.5×" and "2.5×" beneath track at its left/right ends.
32dp gap then "Navigation position" aligned x=panelLeft+24, full-width dropdown "Automatic" below.
32dp gap then "Mode" aligned same x, full-width dropdown "Follow device" below.
Bottom of image separate design annotation strip with four concise notes: "One left edge for every label"; "Value above, never on the track"; "48 dp interaction targets"; "Height grows with wrapped labels".
A faint dashed vertical annotation guide outside the labels in each panel visually verifies all labels including Scale factor share exact left edge. No enclosing slider rectangle. Crisp typography, faithful implementable flat UI. Do not show phone hardware, statusbar, app logo, unrelated controls, or navigationbar. Avoid extra decorations. The left and right panels are flat realistic screen crops with ample whitespace around board title.
@@ -0,0 +1,12 @@
# Slider comparison board
Mode: built-in image generation. One board comparing three proposals.
Use case: ui-mockup.
Create one detailed, polished design comparison board for Inner Breeze Android settings, proposing a reusable Kryon Material slider. Landscape high-resolution board, three equal columns, excellent precise typography, generous spacing. This is an implementable UI design proposal, not artwork, not a futuristic dashboard. Heading "Scale factor — three slider proposals". Small subtitle "Shared Kryon widget · Android". Background warm pale gray, dark near-black purple UI panels and matching light-mode panels. Lavender primary #CBAAFF in dark mode with dark ink #281442 on lavender chips; dark purple #6750A4 in light mode. No glows, glossy effects, 3D, shadows beyond subtle standard surfaces.
Each column has numbered title, large cropped Android Appearance settings preview with Style dropdown above and Navigation position below for alignment context, a matching small light-mode component preview, then a dragging/focus state component and concise annotation footer. Setting labels at same left margin throughout each preview. Slider label ALWAYS in its own header row, inside the component, above track, flush left with Style and Navigation position; value at far right of same header. Minus/plus controls in row below header, must never shift header to right. NO text printed on any track. Rounded horizontal track and round thumb, plausible classic Material 3 treatment. Common range 0.5× to 2.5×, default 1.0× means thumb exactly one-quarter across track; 1.5× means halfway. Readable values and spacious layout.
Column1 title "01 / Clear header" tag "Recommended". Header "Scale factor" left and plain lavender "1.0×" right. Below: neutral circular minus button, continuous thin lavender filled track with circular thumb at25%, muted unfilled track, neutral circular plus button. Tiny endpoint text below 0.5× left and 2.5× right aligned with track endpoints. Light version same geometry dark-purple accents. State sample label "Keyboard focus" showing thin focus ring around thumb, header1.0×. Footer annotations "Label aligned to settings edge", "Value stays above the track", "48 dp touch targets".
Column2 title "02 / Value chip". Same layout, but value1.0× in small softly lavender filled noneditable pill on header right, very dark purple text within; label remains left. Track slightly thicker rounded8dp, circular thumb at25%, minus/plus in neutral outlined circular controls. Matching light mode. State sample "Dragging" header chip1.5×, thumb halfway, modest state halo, no bubble. Footer annotations "Strong value contrast", "Stable header while dragging", "No value text on the fill".
Column3 title "03 / Discrete feedback". Same aligned header, plain1.0× right, thin track with subtle discrete ticks at equal steps, minus/plus below header aligned on row. Matching light mode. State sample "Dragging" header1.5× and tiny dark-ink-on-lavender value bubble1.5× above halfway thumb, reserved vertical space so bubble NEVER overlaps label/header. Footer annotations "0.1× steps", "Bubble only during interaction", "Header remains readable".
Bottom horizontal specification strip with title "Proposed core layout" and three clearly separated notes "Header → 12 dp gap → 48 dp interaction row", "Wrap long labels; grow height", "Theme label, value, track and thumb independently".
All listed dimensions are proposed design choices, not a claim of exact official Material specification. Prioritize clear realistic enlarged components over full phone mockups. Text must be sharp, exact, not tiny; every column must show visibly distinct but related slider designs. No logos needed.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+1 -1
View File
@@ -1,5 +1,5 @@
Package: inbe.waozi
Version: 2.0.0
Version: 2.0.2
Architecture: arm64
Maintainer: Waozi <[email protected]>
Click-Version: 0.4
+1 -1
View File
@@ -28,7 +28,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.0" date="2026-09-19"/>
<release version="2.0.2" date="2026-09-20"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "inbe",
"title": "Inner Breeze",
"version": "2.0.0",
"version": "2.0.2",
"architecture": "arm64",
"framework": "ubuntu-sdk-20.04",
"description": "Syncable breathing, meditation, and habit practice app.",
+1 -1
View File
@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Inner Breeze",
"short_name": "Inbe",
"version": "2.0.0",
"version": "2.0.2",
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
"permissions": [
"contextMenus"
+1 -1
View File
@@ -22,7 +22,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.0" date="2026-09-19"/>
<release version="2.0.2" date="2026-09-20"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -22,7 +22,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.0" date="2026-09-19"/>
<release version="2.0.2" date="2026-09-20"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -6,7 +6,7 @@ description: |
meditation, and habit tracking with visual and audio cues, meditation
timers, habit counters, session history, and optional sync.
version: '2.0.0'
version: '2.0.2'
license: BSD-3-Clause
base: core22
confinement: strict
+36 -9
View File
@@ -893,7 +893,7 @@ async function pageJson(client, expression, awaitPromise = false) {
}
async function waitAnimationFrames(client, frameCount = 3) {
await pageJson(client, `(async () => JSON.stringify(await new Promise(resolve => {
const result = await pageJson(client, `(async () => JSON.stringify(await new Promise(resolve => {
let frames = 0;
function tick() {
frames++;
@@ -903,6 +903,8 @@ async function waitAnimationFrames(client, frameCount = 3) {
requestAnimationFrame(tick);
setTimeout(() => resolve({ ok: false, reason: 'timeout', frames }), 5000);
})))()`, true);
if (!result?.ok)
throw new Error(`animation frames stalled: ${JSON.stringify(result)}`);
}
async function dispatchCanvasClick(client, x, y) {
@@ -1253,6 +1255,15 @@ async function verifyPracticeCarouselSwipe(client) {
const target = await practiceStartClickTarget(client);
const selected = () => pageJson(client, 'Module._app_web_test_practice_selected()');
const initial = await selected();
async function waitForSelectionChange(previous) {
const deadline = Date.now() + 500;
let current = await selected();
while (current === previous && Date.now() < deadline) {
await delay(50);
current = await selected();
}
return current;
}
const x = target.rect.left + target.rect.width / 2;
const y = target.rect.top + (target.y - target.rect.top) * 0.4;
const distance = target.rect.width * 0.4;
@@ -1263,9 +1274,9 @@ async function verifyPracticeCarouselSwipe(client) {
type: 'mousePressed', x: startX, y: startY, button: 'left', clickCount: 1
});
await waitAnimationFrames(client, 2);
for (let i = 1; i <= 6; i++) {
for (let step = 1; step <= 6; step++) {
await client.send('Input.dispatchMouseEvent', {
type: 'mouseMoved', x: startX + dx * i / 6, y: startY + dy * i / 6,
type: 'mouseMoved', x: startX + dx * step / 6, y: startY + dy * step / 6,
button: 'left', buttons: 1
});
await waitAnimationFrames(client, 1);
@@ -1275,17 +1286,33 @@ async function verifyPracticeCarouselSwipe(client) {
});
await waitAnimationFrames(client, 3);
}
await drag(-distance, 0);
if (await selected() === initial) throw new Error('left swipe did not change practice');
await drag(distance, 0);
if (await selected() !== initial) throw new Error('right swipe did not return to practice');
async function swipeToNext(dx, previous, label) {
for (let attempt = 1; attempt <= 3; attempt++) {
await drag(dx, 0);
const current = await waitForSelectionChange(previous);
if (current !== previous) return current;
}
throw new Error(`${label} did not change practice after three gestures (selected=${previous})`);
}
const first = await swipeToNext(-distance, initial, 'left swipe');
if (await swipeToNext(distance, first, 'right swipe') !== initial)
throw new Error('right swipe did not return to practice');
await drag(0, distance / 2);
if (await selected() !== initial) throw new Error('vertical drag changed practice');
await dispatchCanvasClick(client, x, y);
await waitAnimationFrames(client, 3);
if (await selected() !== initial) throw new Error('artwork tap changed practice');
for (let i = 0; i < 4; i++) await drag(-distance, 0);
if (await selected() !== initial) throw new Error('carousel did not wrap after four swipes');
const visited = new Set([initial]);
let previous = initial;
for (let i = 0; i < 4; i++) {
const current = await swipeToNext(-distance, previous, `carousel swipe ${i + 1}`);
if (i < 3 && visited.has(current))
throw new Error(`carousel repeated practice early on swipe ${i + 1}: ${current}`);
if (i === 3 && current !== initial)
throw new Error(`carousel did not wrap after four swipes (selected=${current}, initial=${initial})`);
visited.add(current);
previous = current;
}
}
async function verifyPracticeStartClick(client) {
+1
View File
@@ -28,6 +28,7 @@ int app_draw_customize_nav_page(InnerBreeze*app);
void app_open_customize_nav(InnerBreeze*app);
void app_apply_nav_route(InnerBreeze*app, int route);
void app_reset_bottom_nav_routes(InnerBreeze*app);
int app_reset_bottom_nav_routes_for_layout_version(InnerBreeze*app, int layout_version);
int app_migrate_legacy_bottom_nav_routes(InnerBreeze*app);
void app_sanitize_bottom_nav_routes(InnerBreeze*app);
+8
View File
@@ -236,6 +236,14 @@ app_reset_bottom_nav_routes :: (app: InnerBreeze*) {
app->bottom_nav_route_count = 4
}
app_reset_bottom_nav_routes_for_layout_version :: (app: InnerBreeze*, layout_version: int) -> int {
if app == NULL || layout_version >= 2 {
return 0
}
app_reset_bottom_nav_routes(app)
return 1
}
app_migrate_legacy_bottom_nav_routes :: (app: InnerBreeze*) -> int {
if app == NULL {
return 0
+9 -11
View File
@@ -147,17 +147,15 @@ load_bottom_nav_routes :: (app: InnerBreeze*, cache: const SettingsLoadCache*) #
settings_cache_get_int(cache, "bottom_nav_route_2", APP_NAV_ROUTE_PRACTICE)
app->bottom_nav_routes[3] =
settings_cache_get_int(cache, "bottom_nav_route_3", APP_NAV_ROUTE_SETTINGS)
if settings_cache_get_int(cache, "bottom_nav_layout_version", 0) < 1 {
migrated := app_migrate_legacy_bottom_nav_routes(app)
if app_reset_bottom_nav_routes_for_layout_version(app,
settings_cache_get_int(cache, "bottom_nav_layout_version", 0)) {
storage_settings_begin_write()
storage_set_setting_int("bottom_nav_layout_version", 1)
if migrated {
storage_set_setting_int("bottom_nav_route_count", app->bottom_nav_route_count)
storage_set_setting_int("bottom_nav_route_0", app->bottom_nav_routes[0])
storage_set_setting_int("bottom_nav_route_1", app->bottom_nav_routes[1])
storage_set_setting_int("bottom_nav_route_2", app->bottom_nav_routes[2])
storage_set_setting_int("bottom_nav_route_3", app->bottom_nav_routes[3])
}
storage_set_setting_int("bottom_nav_layout_version", 2)
storage_set_setting_int("bottom_nav_route_count", app->bottom_nav_route_count)
storage_set_setting_int("bottom_nav_route_0", app->bottom_nav_routes[0])
storage_set_setting_int("bottom_nav_route_1", app->bottom_nav_routes[1])
storage_set_setting_int("bottom_nav_route_2", app->bottom_nav_routes[2])
storage_set_setting_int("bottom_nav_route_3", app->bottom_nav_routes[3])
storage_settings_end_write()
}
app_sanitize_bottom_nav_routes(app)
@@ -243,7 +241,7 @@ save_settings :: (app: InnerBreeze*) {
save_setting_int("navigation_placement", app->navigation_placement)
save_setting_int("navigation_collapsed", app->nav_rail_collapsed)
save_setting_int("profile_picture_icon", app->profile_picture_icon)
save_setting_int("bottom_nav_layout_version", 1)
save_setting_int("bottom_nav_layout_version", 2)
save_setting_int("bottom_nav_route_count", app->bottom_nav_route_count)
save_setting_int("bottom_nav_route_0", app->bottom_nav_routes[0])
save_setting_int("bottom_nav_route_1", app->bottom_nav_routes[1])
+2 -2
View File
@@ -3,7 +3,7 @@
#define APP_VERSION_MAJOR 2
#define APP_VERSION_MINOR 0
#define APP_VERSION_PATCH 0
#define APP_VERSION_STRING "2.0.0"
#define APP_VERSION_PATCH 2
#define APP_VERSION_STRING "2.0.2"
#endif
+21 -9
View File
@@ -406,19 +406,27 @@ draw_form :: (app: InnerBreeze*) #private {
}
px := x + Scale(12)
inner := w - Scale(24)
title_y := section == 2 ? y + Scale(10) :
AppControlTextY(titles[section], y, header, font)
Text((TextProps){
.bounds={(px), (title_y), 0, 0},
.text=(titles[section]),
.wrap=TextWrapNone
})
if section == 2 {
title_y := y + Scale(10)
Text((TextProps){
.bounds={(px), (title_y), 0, 0},
.text=(titles[section]),
.font=font,
.wrap=TextWrapNone
})
Text((TextProps){
.bounds={(px), (title_y + AppTextLineHeight(font) + Scale(2)), 0, 0},
.text=(GetLocaleText("habit_tracking_hint")),
.wrap=TextWrapNone
})
} else {
Text((TextProps){
.bounds={(float)px, (float)y, (float)inner, (float)header},
.text=(titles[section]),
.font=font,
.wrap=TextWrapNone,
.vertical_align=TextAlignCenter
})
}
if section == 1 && !app->habit_edit.sections[section] {
summary: [16] char = {0}
@@ -429,10 +437,14 @@ draw_form :: (app: InnerBreeze*) #private {
snprintf(summary, sizeof(summary), "%02d:00", app->habit_edit.reminder_hour)
status = summary
}
status_width := AppTextWidth(status, small)
Text((TextProps){
.bounds={(x + w - Scale(44) - AppTextWidth(status, small)), (AppControlTextY(status, y, header, small)), 0, 0},
.bounds={(float)(x + w - Scale(44) - status_width),
(float)y, (float)status_width, (float)header},
.text=(status),
.wrap=TextWrapNone
.font=small,
.wrap=TextWrapNone,
.vertical_align=TextAlignCenter
})
}
cx := x + w - Scale(24)
+33
View File
@@ -836,6 +836,38 @@ test_default_bottom_nav_routes_include_elist(void)
"default fourth bottom nav item should be settings");
}
static void
test_nav_update_resets_saved_layout_once(void)
{
InnerBreeze app = test_app();
app.bottom_nav_route_count = 3;
app.bottom_nav_routes[0] = APP_NAV_ROUTE_HABITS;
app.bottom_nav_routes[1] = APP_NAV_ROUTE_PRACTICE;
app.bottom_nav_routes[2] = APP_NAV_ROUTE_SETTINGS;
expect(app_reset_bottom_nav_routes_for_layout_version(&app, 1),
"updating an older layout should reset navigation");
expect(app.bottom_nav_route_count == 4 &&
app.bottom_nav_routes[0] == APP_NAV_ROUTE_ELIST &&
app.bottom_nav_routes[1] == APP_NAV_ROUTE_HABITS &&
app.bottom_nav_routes[2] == APP_NAV_ROUTE_PRACTICE &&
app.bottom_nav_routes[3] == APP_NAV_ROUTE_SETTINGS,
"updated navigation should show Lists, Habits, Practice, Settings");
app.bottom_nav_route_count = 3;
app.bottom_nav_routes[0] = APP_NAV_ROUTE_HABITS;
app.bottom_nav_routes[1] = APP_NAV_ROUTE_PRACTICE;
app.bottom_nav_routes[2] = APP_NAV_ROUTE_SETTINGS;
expect(!app_reset_bottom_nav_routes_for_layout_version(&app, 2),
"current layout should not reset again");
expect(app.bottom_nav_route_count == 3 &&
app.bottom_nav_routes[0] == APP_NAV_ROUTE_HABITS &&
app.bottom_nav_routes[1] == APP_NAV_ROUTE_PRACTICE &&
app.bottom_nav_routes[2] == APP_NAV_ROUTE_SETTINGS,
"navigation changes after the update should be preserved");
}
static void
test_same_frame_modal_close_consumes_bottom_nav_click(void)
{
@@ -1612,6 +1644,7 @@ main(void)
test_desktop_rail_spacing();
test_navigation_placement_and_collapse();
test_default_bottom_nav_routes_include_elist();
test_nav_update_resets_saved_layout_once();
test_same_frame_modal_close_consumes_bottom_nav_click();
test_unblocked_bottom_nav_click_still_routes();
test_edge_bottom_nav_routes_are_applied();
+34
View File
@@ -2,6 +2,7 @@
#include "sync_account.h"
#include "sync_client.h"
#include "screens/habits_screen.h"
#include <curl/curl.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
@@ -11,6 +12,37 @@
#include <unistd.h>
static char current_root[1024];
static size_t
discard_http_body(char *data, size_t size, size_t count, void *user)
{
(void)data;
(void)user;
return size * count;
}
static void
check_loopback_http(const char *base_url)
{
char url[256];
char error[CURL_ERROR_SIZE] = {0};
CURL *curl = curl_easy_init();
CURLcode result;
long status = 0;
assert(curl != NULL);
snprintf(url, sizeof(url), "%s/healthz", base_url);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, discard_http_body);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L);
result = curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
if(result != CURLE_OK || status != 200) {
fprintf(stderr, "loopback HTTP probe failed: curl=%d (%s), status=%ld, detail=%s\n",
(int)result, curl_easy_strerror(result), status, error);
curl_easy_cleanup(curl);
exit(1);
}
curl_easy_cleanup(curl);
}
void data_init(void) {}
const char *data_root(void) { return current_root; }
void TraceLog(int level, const char *fmt, ...) {
@@ -111,6 +143,8 @@ int main(int argc, char **argv) {
/* The normal runner supplies a fresh loopback server and disposable data root. */
assert(live || strncmp(argv[1], "http://127.0.0.1:", 17) == 0);
assert(strncmp(argv[3], "http://127.0.0.1:", 17) == 0);
if(!live)
check_loopback_http(argv[1]);
char alias[40], friend_alias[40];
snprintf(alias, sizeof(alias), "restore_%ld", (long)getpid());
snprintf(friend_alias, sizeof(friend_alias), "friend_%ld", (long)getpid());
+4 -4
View File
@@ -6,8 +6,8 @@ IDI_APP_ICON ICON "inbe.ico"
IDI_NOTIFICATION_ICON ICON "inbe.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEVERSION 2,0,2,0
PRODUCTVERSION 2,0,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -24,11 +24,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "waozi"
VALUE "FileDescription", "Inner Breeze"
VALUE "FileVersion", "2.0.0"
VALUE "FileVersion", "2.0.2"
VALUE "InternalName", "inbe"
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
VALUE "ProductName", "Inner Breeze"
VALUE "ProductVersion", "2.0.0"
VALUE "ProductVersion", "2.0.2"
END
END
BLOCK "VarFileInfo"