fix(app): 대화 screen pages back without limit, shows edits and drops stale answers

- history_query takes item cursors (before / from) ordered by time, source and id,
  so paging never skips or repeats an item and has no 2,000 item ceiling
- live refresh re-reads the window from the oldest item shown and compares whole
  items, so an edited message is redrawn
- answers to requests made before a filter change, and live answers older than
  the newest one asked, are dropped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-16 07:07:20 +09:00
parent 46f71e7f03
commit 27fcea4e3d
4 changed files with 175 additions and 41 deletions

View File

@@ -405,6 +405,8 @@ impl AdminApi {
said: flag("said"), answered: flag("answered"), thought: flag("thought"),
via: text("via"), person: text("person"), channel: text("channel"), find: text("find"),
since: args.get("since").and_then(Value::as_f64), until: args.get("until").and_then(Value::as_f64),
before: args.get("before").and_then(crate::history_view::Cursor::of),
from: args.get("from").and_then(crate::history_view::Cursor::of),
limit: args.get("limit").and_then(Value::as_u64).map_or(crate::history_view::DEFAULT_LIMIT, |n| n as usize),
};
let bot = self.secrets()?.get(DISCORD_TOKEN).ok().flatten().and_then(|t| crate::history_view::bot_id_of_token(&t));