HEL-824: land verified fixes on 4321aeb (small-screen first-press, real-time reading clock)

- 6 modified + handoff JSON per CHANGES-HEL-824.json, all hashes verified against git 4321aeb and package bytes
- rework_browser_check: skip full-text sheet at micro height (<420px design hides the control); migrate stale 返回日子 selector to 结束交谈 · 回到日子
- fresh run evidence: web build 25/25 unit tests, backend 142/142 (py3.12), all four browser checks PASS incl. new compact first-press and 700ms slow-frame sections (slow_frames_new_turn_to_reply_s=2.32s), layout regression 320/390/1024/1600 both themes

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
白栖知
2026-10-24 07:39:26 +08:00
co-authored by multica-agent
parent 4321aebfdc
commit cef8ae5581
38 changed files with 368 additions and 32 deletions
+2 -7
View File
@@ -3,13 +3,8 @@ import { useLayoutEffect, type ReactNode } from 'react';
export function Viewport({ children }: { children: ReactNode }) {
useLayoutEffect(() => {
const viewport = window.visualViewport, html = document.documentElement, style = html.style;
let settle: ReturnType<typeof setTimeout>;
const update = () => {
// Keyboard/browser-bar geometry must follow the viewport immediately;
// a decorative stage transition would cover the dialogue in between.
html.classList.add('viewport-resizing');
clearTimeout(settle);
settle = setTimeout(() => html.classList.remove('viewport-resizing'), 200);
// Keyboard/browser-bar geometry follows the viewport at once; the dialogue has no position transition.
const height = viewport?.height ?? innerHeight, top = viewport?.offsetTop ?? 0;
style.setProperty('--view-h', `${height}px`);
style.setProperty('--view-top', `${top}px`);
@@ -24,7 +19,7 @@ export function Viewport({ children }: { children: ReactNode }) {
viewport?.addEventListener('resize', update); viewport?.addEventListener('scroll', update);
window.addEventListener('resize', update);
document.addEventListener('visibilitychange', visibility);
return () => { clearTimeout(settle); viewport?.removeEventListener('resize', update); viewport?.removeEventListener('scroll', update); window.removeEventListener('resize', update); document.removeEventListener('visibilitychange', visibility); };
return () => { viewport?.removeEventListener('resize', update); viewport?.removeEventListener('scroll', update); window.removeEventListener('resize', update); document.removeEventListener('visibilitychange', visibility); };
}, []);
return children;
}