fix(deploy): disable gzip on /v1/ API paths — Flutter release AOT gzip decompression failure

服务端 200+数据正常、debug/JIT 正常;release/AOT 的 Dart HttpClient 对
Content-Encoding: gzip 解压异常 → JSON 解析失败 → 显示 INTERNAL_ERROR。
nginx /v1/ 路径 gzip off(静态资源 gzip 不受影响);proguard keep 规则
一并保留(dio/flutter_secure_storage/全项目模型)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-23 18:36:11 +08:00
parent fa06193a12
commit 222c44c1f7
9 changed files with 203 additions and 6 deletions
@@ -118,8 +118,10 @@ export function useVerticalPhotoStream(options: UseVerticalPhotoStreamOptions) {
writeTransform();
}
}
} catch {
/* 异常帧:跳过本次推进,链继续(数据边缘态由下次 reanchor 修复) */
} catch (err) {
/* 异常帧:跳过本次推进,链继续(数据边缘态由下次 reanchor 修复)。
* 临时探针(滚动卡死排查用,随后移除)。 */
console.error('[stream-frame-error]', err);
}
if (running.value) {
rafId = requestAnimationFrame(frame);
+20 -1
View File
@@ -155,6 +155,10 @@ function simulateBurst(photoId: string, delta: number): void {
}
defineExpose({ simulateBurst });
// 临时探针(卡死排查,随后移除)
if (typeof window !== 'undefined') {
(window as unknown as Record<string, unknown>).__embedDebug = { reasons: pauseReasons, userPaused };
}
// 收起/隐藏/换绑/减少动效 → 清粒子(§5.3)。
watch(activeRef, (value) => {
@@ -258,7 +262,7 @@ function onPointerMove(event: PointerEvent): void {
}
}
function onPointerUp(): void {
function onPointerUp(event: PointerEvent): void {
pointerDownY = null;
if (pointerWatchdog !== null) {
clearTimeout(pointerWatchdog);
@@ -269,6 +273,20 @@ function onPointerUp(): void {
// 滚动停死到刷新;滚轮/键盘路径各有 500ms 定时清除,拖动漏了)。
setReason('manual', false);
setReason('pointer', false);
// 窗外结束时(拖出窗外 Chrome 派发 pointercancel 而非 pointerleave——leave
// 不会再来)hover 原因同样会永久残留,这里按坐标判定一并清除;窗内正常
// 释放不清(点击后悬停继续暂停是合理行为)。
const rect = viewportEl.value?.getBoundingClientRect();
if (
rect !== undefined &&
(event.clientX < rect.left ||
event.clientX > rect.right ||
event.clientY < rect.top ||
event.clientY > rect.bottom)
) {
hoverPointerIsMouse = false;
setReason('hover', false);
}
scheduleResume();
}
@@ -385,6 +403,7 @@ function onWindowBlur(): void {
setReason('pointer', false);
setReason('manual', false);
setReason('focus', false);
setReason('hover', false);
}
onMounted(() => {