feat: add conversation shortcuts to statistics - #9847
Conversation
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dashboard/src/views/conversation/ConversationWorkspacePage.vue" line_range="421-423" />
<code_context>
+ if (umoQuery.value.trim()) {
+ params.umo = umoQuery.value.trim();
+ } else {
+ params.exclude_ids = "astrbot";
+ params.exclude_platforms = "webchat";
+ }
if (selectedBotIds.value.length) {
params.platforms = selectedBotIds.value.join(",");
</code_context>
<issue_to_address>
**issue (broader_impact):** When an UMO filter is present, `exclude_ids` and `exclude_platforms` are omitted, so the conversation shortcut can show the default `astrbot` and `webchat` entries that were previously excluded.
**Triggers:** When the selected UMO belongs to the excluded bot or platform.
**Suggested fix:** Always include the default exclusions and add `params.umo` independently when a UMO filter is set.
</issue_to_address>
### Comment 2
<location path="dashboard/src/views/conversation/ConversationWorkspacePage.vue" line_range="98-100" />
<code_context>
const selectedBotIds = ref<string[]>([]);
const selectedTypes = ref<string[]>([]);
-const umoQuery = ref("");
+const umoQuery = ref(
+ typeof initialUmoQuery === "string" ? initialUmoQuery : "",
+);
const sortValue = ref("updated_at:desc");
const groupBySession = ref(false);
</code_context>
<issue_to_address>
**issue (bug_risk):** The UMO value is copied from the URL only during component setup, while later edits to `umoQuery` never update the URL; reloading after typing or changing the filter loses the filter, and navigating between conversation shortcuts while the component is reused leaves the old filter active.
**Triggers:** When the user types a UMO into the filter or navigates from one statistics shortcut to another without remounting the conversation page.
**Suggested fix:** Watch `umoQuery` and synchronize `route.query.umo`, and watch route query changes to update `umoQuery` when the router reuses the page component.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: dashboard/src/views/conversation/ConversationWorkspacePage.vue:423, dashboard/src/views/conversation/ConversationWorkspacePage.vue:100
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| params.exclude_ids = "astrbot"; | ||
| params.exclude_platforms = "webchat"; | ||
| } |
There was a problem hiding this comment.
issue (broader_impact): When an UMO filter is present, exclude_ids and exclude_platforms are omitted, so the conversation shortcut can show the default astrbot and webchat entries that were previously excluded.
Triggers: When the selected UMO belongs to the excluded bot or platform.
Suggested fix: Always include the default exclusions and add params.umo independently when a UMO filter is set.
| const umoQuery = ref( | ||
| typeof initialUmoQuery === "string" ? initialUmoQuery : "", | ||
| ); |
There was a problem hiding this comment.
issue (bug_risk): The UMO value is copied from the URL only during component setup, while later edits to umoQuery never update the URL; reloading after typing or changing the filter loses the filter, and navigating between conversation shortcuts while the component is reused leaves the old filter active.
Triggers: When the user types a UMO into the filter or navigates from one statistics shortcut to another without remounting the conversation page.
Suggested fix: Watch umoQuery and synchronize route.query.umo, and watch route query changes to update umoQuery when the router reuses the page component.
Link session token rankings to the conversation workspace with a UMO query, and keep MDI icons instead of Lucide. Upstream-Commit: d2d7e5a Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com> Upstream-PR: AstrBotDevs#9847 Sync-Disposition: adapt Fork-Adaptation: Keep the Playwright T2I card and DataFilesPage /data route. Use MDI for the conversation shortcut and omit ru-RU locales. Tested: cd dashboard && pnpm exec vue-tsc --noEmit && pnpm exec vitest run --config vitest.config.ts tests/statsPage.vitest.ts tests/viewDialogLayouts.vitest.ts
Record adapted AstrBotDevs#9846 and AstrBotDevs#9847 through d2d7e5a.
Summary
Validation
Summary by Sourcery
Connect session usage statistics with filtered conversation views while improving UMO filter persistence, clearing, and mobile layout behavior.
New Features:
Bug Fixes:
Enhancements: