mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 11:10:18 +00:00
test: couple mobile safe-area contract to viewport fit
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- Phone-width layouts (refs #2231) keep the hamburger drawer, but the drawer now presents the panel navigation as a vertical 44px touch-target strip instead of a cramped horizontal row. Installed mobile/PWA chrome also uses the sidebar color for `theme-color` and reserves the bottom safe area so the composer is not clipped by rounded corners or the home indicator.
|
||||
- Phone-width layouts (refs #2231) keep the hamburger drawer, but the drawer now presents the panel navigation as a vertical 44px touch-target strip instead of a cramped horizontal row. Installed mobile/PWA chrome now follows the app chrome color (`--sidebar`) for `theme-color` instead of the chat background (`--bg`), so iOS Safari / PWA status bars visibly match the titlebar/sidebar; the phone composer also reserves the bottom safe area so it is not clipped by rounded corners or the home indicator.
|
||||
|
||||
- **PR #2227** by @theh4v0c (closes #2223 — critical) — Context compression no longer destroys session history. The previous implementation renamed `old_sid.json` → `new_sid.json` before the new compressed session had been saved, destroying the only persistent copy of the full conversation. When the summarisation LLM call also failed, the user was left with zero recoverable messages and the bug report `Summary generation was unavailable. N message(s) were removed to free context space but could not be summarized.` text with no way to scroll back. The fix removes the destructive `old_path.rename(new_path)` call: `old_sid.json` is preserved intact as an immutable pre-compression archive, `new_sid.json` is created fresh via `s.save()`, and `parent_session_id` is set on the continuation session so the frontend can traverse the lineage chain back to the original. Even when summarisation or `s.save()` fails, the original conversation file survives on disk. New 106-line regression test file covers the no-rename invariant, parent_session_id stamping, and marker-only-result preservation. Stage-353 Opus SHOULD-FIX applied inline: the preservation block previously cleared `s.parent_session_id` before saving the snapshot (writing `parent=None` to `old_sid.json` on disk) and used a `if not s.parent_session_id` guard when stamping the continuation. Both bugs broke fork-of-fork compression lineage — a `/branch` fork that subsequently compressed would lose its "Forked from X" badge on the snapshot AND the continuation would skip past the snapshot back to the original fork parent. Maintainer fix removes the parent clearing during preservation (preserves the fork lineage on disk) and drops the `if not` guard (always stamps continuation to `old_sid`). Two new regression tests pin both invariants. Traversal now consistently walks new → old → old.parent → ... root.
|
||||
|
||||
|
||||
@@ -644,12 +644,27 @@ def test_100dvh_viewport_height():
|
||||
"style.css must use 100dvh for correct mobile viewport height (100vh hides content under address bar)"
|
||||
|
||||
|
||||
def test_pwa_viewport_fit_cover_enabled():
|
||||
"""Installed iOS PWAs need viewport-fit=cover for safe-area env values."""
|
||||
def test_pwa_viewport_fit_cover_couples_unconditional_safe_area_env_values():
|
||||
"""Safe-area env variables must stay coupled to viewport-fit=cover.
|
||||
|
||||
PR #1381 scoped the top inset because normal browser/webview chrome can
|
||||
already reserve status-bar space. This PR applies the safe-area env()
|
||||
values through variables unconditionally, which is safe only while the
|
||||
page opts into cover-mode viewport geometry.
|
||||
"""
|
||||
assert 'viewport-fit=cover' in HTML, (
|
||||
"index.html viewport meta must include viewport-fit=cover so iOS PWA "
|
||||
"safe-area-inset values are available"
|
||||
)
|
||||
assert "--app-titlebar-safe-top:env(safe-area-inset-top" in CSS, (
|
||||
"CSS uses the top safe-area env() value unconditionally through "
|
||||
"--app-titlebar-safe-top, so the viewport-fit=cover contract must "
|
||||
"be regression-tested beside it"
|
||||
)
|
||||
assert "--app-safe-bottom:env(safe-area-inset-bottom" in CSS, (
|
||||
"CSS uses the bottom safe-area env() value unconditionally through "
|
||||
"--app-safe-bottom, so the viewport-fit=cover contract must stay coupled"
|
||||
)
|
||||
|
||||
|
||||
def test_titlebar_safe_area_top_uses_scoped_variable():
|
||||
|
||||
Reference in New Issue
Block a user