fix(engine,server): safe area clamp, analytics batch, achievement save order, daily rollover, replay validation, leaderboard opt-in (#56, #60, #61, #62, #66, #68)
Build and Deploy / build-and-push (push) Successful in 3m54s
Build and Deploy / build-and-push (push) Successful in 3m54s
- #66: Clamp safe-area insets to 25% of window height with warn!() on excess - #68: Move fire_flush outside per-event loop in analytics (batch flush once) - #56: Persist progress before marking reward_granted to prevent XP loss on crash - #60: Add DateRolloverTimer + check_date_rollover system for midnight seed refresh - #62: Add validate_header() in replay upload with mode/draw_mode allowlists - #61: Restore two-query leaderboard opt-in check (SELECT then UPDATE); original queries already in .sqlx cache; EXISTS variant would require sqlx prepare Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -294,7 +294,10 @@ impl HighContrastBackground {
|
||||
/// Convenience constructor — HC colour defaults to
|
||||
/// [`BORDER_SUBTLE_HC`].
|
||||
pub const fn with_default(default_color: bevy::prelude::Color) -> Self {
|
||||
Self { default_color, hc_color: BORDER_SUBTLE_HC }
|
||||
Self {
|
||||
default_color,
|
||||
hc_color: BORDER_SUBTLE_HC,
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructor for sites whose HC colour differs from the standard
|
||||
@@ -305,7 +308,10 @@ impl HighContrastBackground {
|
||||
default_color: bevy::prelude::Color,
|
||||
hc_color: bevy::prelude::Color,
|
||||
) -> Self {
|
||||
Self { default_color, hc_color }
|
||||
Self {
|
||||
default_color,
|
||||
hc_color,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +627,9 @@ mod tests {
|
||||
/// honest if someone tweaks values later.
|
||||
#[test]
|
||||
fn spacing_scale_is_a_4_multiple_geometric_progression() {
|
||||
for v in [SPACE_1, SPACE_2, SPACE_3, SPACE_4, SPACE_5, SPACE_6, SPACE_7] {
|
||||
for v in [
|
||||
SPACE_1, SPACE_2, SPACE_3, SPACE_4, SPACE_5, SPACE_6, SPACE_7,
|
||||
] {
|
||||
assert!(v > 0.0, "spacing tokens must be positive");
|
||||
assert!(
|
||||
(v.rem_euclid(4.0)).abs() < f32::EPSILON,
|
||||
@@ -633,7 +641,13 @@ mod tests {
|
||||
/// Type scale is monotonically decreasing display → caption.
|
||||
#[test]
|
||||
fn type_scale_is_monotonically_decreasing() {
|
||||
let scale = [TYPE_DISPLAY, TYPE_HEADLINE, TYPE_BODY_LG, TYPE_BODY, TYPE_CAPTION];
|
||||
let scale = [
|
||||
TYPE_DISPLAY,
|
||||
TYPE_HEADLINE,
|
||||
TYPE_BODY_LG,
|
||||
TYPE_BODY,
|
||||
TYPE_CAPTION,
|
||||
];
|
||||
for window in scale.windows(2) {
|
||||
assert!(
|
||||
window[0] > window[1],
|
||||
|
||||
Reference in New Issue
Block a user