fix(tui): drop misleading /login hint in /usage and /status before first message - #2752
fix(tui): drop misleading /login hint in /usage and /status before first message#2752nothankyouzzz wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: c1f7806 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06a49a3153
ℹ️ 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 "@codex address that feedback".
…rst message On the v2 engine the session is created lazily on the first message, so a missing session is not a sign-in problem: guard requireSession behind a session-less check in both reports. Both commands also wait out an in-flight lazy creation first, so a /usage or /status typed right behind the first prompt reports the about-to-exist session instead of the session-less case.
06a49a3 to
c1f7806
Compare
|
@chatgpt-codex-connector Good catch on the in-flight lazy creation race — fixed in c1f7806. |
|
To use Codex here, create an environment for this repo. |
Related Issue
Resolve #2751
Problem
See linked issue.
What changed
The session-backed sections of
/usageand/statusloaded their data throughrequireSession()unconditionally. On the v2 engine the TUI starts session-less (the session is created lazily on the first message), sorequireSession()throwsNo active session. Send /login to login.— correct on the v1 engine where a missing session means the user is not signed in, but wrong here.Both loaders now skip the session-backed section when the v2 engine has no session yet:
/usagefalls back to the existing mutedNo token usage recorded yet.line and/statussimply omits the warning row (itsSessionrow already showsnone). The account-level Plan usage section is unaffected, and the v1 engine keeps the/loginhint./usagedeliberately stays out of the lazy-creation command set — viewing usage should not create a session.Added unit tests covering both commands on both engines.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.