fix: AI review loading UX and Gate preview snapshot time filter SQL

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-05 13:51:16 +08:00
parent 86a6081090
commit 4ac4c062e0
8 changed files with 264 additions and 36 deletions
+3 -2
View File
@@ -5573,9 +5573,10 @@ def render_main_page(page="trade"):
preview_snapshots = []
if page == "records":
try:
snap_ts = sql_list_time_field("preview_created_at", "snapshot_at")
snap_rows = conn.execute(
f"SELECT * FROM trend_pullback_preview_snapshots WHERE {sql_list_time_field('preview_created_at')} >= ? "
f"AND {sql_list_time_field('preview_created_at')} <= ? ORDER BY id DESC LIMIT 500",
f"SELECT * FROM trend_pullback_preview_snapshots WHERE {snap_ts} >= ? "
f"AND {snap_ts} <= ? ORDER BY id DESC LIMIT 500",
(start_bj, end_bj),
).fetchall()
for sr in snap_rows: