Conversation
Default account sort stays risk then filename. Paid Codex rows with different subscriptionActiveUntil values must order by that expiry when sort=remaining.
Wire sort=remaining to subscriptionUntilMs from the same presentation rules the list already uses for paid Codex remaining days. Default sort stays risk then filename.
Lock the comparator against the demo fixture remaining-day values so sort=remaining stays ordered on the same accounts the panel shows.
Keep the sort field on the same number-or-null contract as createdAtMs.
19 tasks
HuiCheng
force-pushed
the
cursor/fix-accounts-remaining-sort-db8e
branch
from
September 12, 2026 04:46
3dee8c1 to
4307213
Compare
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
The Codex accounts list shows paid plan remaining days but never sorts by them.
sort=defaultis risk then filename. This PR addssort=remainingand orders rows by the samesubscriptionUntilMsthe list already uses.The branch starts at
e19d8267(upstream v1.12.12). HuiChengmainhas diverged from that commit, and this environment cannot open a PR intoseakee/CPA-Manager-Plus. The review base iscursor/v1.12.12-base-db8eso the diff stays the fix commits.Scope
Changes
buildAccountRowsstoressubscriptionUntilMsfrombuildAccountSubscriptionPresentation.sortAccountRowshonorssort=remainingwith unknown or free plans last.User Impact
On the accounts page, choose 套餐剩余时间 / Plan remaining. Ascending puts the soonest paid Codex expiry first.
Compatibility / Runtime Notes
Data / Security Notes
N/A. Sort uses existing local quota and token subscription fields.
Risk / Rollback
Risk level: Low
Rollback notes: revert the commits. Other sort keys are unchanged.
Verification
Commands / evidence:
Screenshots / Recordings
Default sort on the Codex demo list. Remaining days are 2, then 12, then 5.
Default sort does not order remaining days
After Plan remaining. Paid rows are 2 days, 5 days, 12 days, 23 days.
Plan remaining sort orders soonest expiry first
Docs
Docs decision: existing sort control. One new dropdown label. No setup or API docs.
Related
N/A
To show artifacts inline, enable in settings.