From 0bf3210c8de2cf762c1720dbe452a187e8437ffd Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 23:16:06 +0800 Subject: [PATCH] fix(birth): coordinates grid stacks at the allowed 480px breakpoint (BUG-2125 follow-up) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq --- docs/BUG_HISTORY.md | 1 + frontend/src/app/globals.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index d914f692d..c28da7472 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -28849,6 +28849,7 @@ - 根因:出生资料没有坐标来源字段,地点选择器只能选到区县。 - 修复:产品负责人 2026-11-21 认可样式(artifact W8DYZcWjQtwsuE8w96qok3)。出生地点选择器在已定位后多一个文字按钮「填写精确经纬度」,展开后填纬度、经度(十进制度数,最多 4 位小数),状态行改为「按你填写的 … 计算」,「改回区县中心点」恢复;超出范围或离所选地点中心超过 500 公里不能保存(提示可能填反),超过 50 公里只提示;提示都在格子下方,不弹窗。时区仍按所选地点和出生日期查,经纬度只影响上升和宫位;改坐标按改出生资料处理,旧报告不自动重算。个人资料、编辑人物、首页引导、合盘「新增星盘」都有这个按钮;年运第二步是现居地,不加。新迁移 `20261121140000_birth_coordinate_source.sql` 给 `profiles`、`chart_profiles` 加 `birth_coordinate_source`(默认 `district_centroid`,只允许 `district_centroid` / `user_entered`,授权与经纬度一致)。星盘页出生资料表加「坐标」行;报告发 `district_centroid` / `user_entered`,资料章节写「坐标来源:区县中心点 / 你填写的经纬度」,出生资料表加坐标行(中英文)。 - 验证与防复发:`frontend/tests/birth-coordinates-2125.test.tsx`(7 条:校验、选择器三种状态、输入后保存被拦再恢复、载荷与来源往返、报告载荷、星盘页坐标行、迁移内容)、`tests/test_birth_coordinate_source_2125.py`(5 条,两张公开盘中英文两种来源);最新迁移名单类测试和 `server-owned-birth-profile`、`database-local-business` 按原值、新值、原因更新(数据库测试本机无 Docker 未跑,由 CI 跑)。本地生产构建截图:编辑人物、合盘新增、首页引导三处在 1280 / 390 宽度的收起、展开、出错状态,年运第二步不变。 +- 补充:首次推送的门禁因窄屏断点用了不在允许清单里的 420px 失败(`viewport-breakpoint-contract`),改为清单里的 480px。 - 尚未处理:服务端只校验范围,不校验 500 公里;后台重置账户时清空经纬度但不改来源标记(没有坐标时标记不起作用);星盘页没有单独的时区行。 - 关联记录:BUG-1506、BUG-2051、BUG-2067,占星师 2026-11-20 第 13 问。 - 修复版本:`claude/birth-coordinates-2125`。 diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index b250dfaa4..489da7351 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -860,7 +860,7 @@ section[popover]:has(> [data-sonner-toaster]), section[popover][aria-label^="页 .birth-place-coordinate-check.is-invalid, .birth-place-coordinate-check.is-far { color: var(--color-danger); } .birth-place-coordinate-check.is-warn { color: var(--color-warning, var(--color-ink-secondary)); } -@media (max-width: 420px) { .birth-place-coordinates { grid-template-columns: 1fr; } } +@media (max-width: 480px) { .birth-place-coordinates { grid-template-columns: 1fr; } } .save-profile { justify-self: end; } .form-error { color: var(--color-danger); }