Refactor moderation dashboard to use repository-backed data - #68
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| def _load_recent_sales(self) -> List[SalesRecord]: | ||
| today = date.today() | ||
| start = today - timedelta(days=6) | ||
| return self._sales_source.get_sales_report(start, today) |
There was a problem hiding this comment.
Recent sales window excludes seed data
The repository builds its snapshot using _load_recent_sales() which queries only the last 7 days (date.today() - timedelta(days=6)). However, SalesReportService is seeded exclusively with records from early April 2024, so once the current date moves past that range the query returns an empty list. As a result the dashboard’s KPIs, tickets, insights, heatmap, and violation statistics become empty even though demo data exists, making the moderation dashboard effectively blank. Consider using the available seed range or providing deterministic demo dates instead of date.today().
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68df1d3985508327bbb8d5bb3f5c1914