fix: exclude Claude-imported sessions from stats (#494), truncate status bar messages (#502)#622
Open
MrRealORG wants to merge 1 commit into
Conversation
…uncate status bar messages (XiaomiMiMo#502) Two fixes in one: 1. now excludes sessions imported from Claude Code by querying the claude_import table and filtering out those session IDs. Previously, imported Claude sessions inflated all metrics (sessions, days, tokens, cost) making the output misleading for users who just migrated from Claude Code. 2. The prompt status bar busy message is now truncated to 80 characters, matching the existing retry message truncation. Additionally, the session status schema now validates that busy messages are at most 200 characters, providing server-side defense against unexpectedly long status messages overflowing the status bar area.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #494, improves #502
Fix 1: excludes Claude Code imported sessions (#494)
Problem: queried all sessions from the database, including those imported from Claude Code via the one-time migration. Users who just installed MiMo saw inflated metrics (e.g., 216 sessions when only 12 were native MiMo sessions, 32 days of history from old Claude data).
Solution: now queries the table to get the set of imported session IDs and filters them out before computing stats. This is the authoritative source — every imported Claude session has a row in linking to .
Files changed:
Fix 2: Truncate busy messages in prompt status bar (#502)
Problem: The displayed in the prompt status bar had no length limit, while the message was truncated to 80 chars. This inconsistency meant a long or malformed busy message could overflow the status bar area.
Solution:
Files changed: