Skip to content

feat(web): 基于 /backend-api/subscriptions 的轻量 Codex Subscription - #4

Draft
HuiCheng wants to merge 10 commits into
devfrom
cursor/feat-codex-subscription-6719
Draft

HuiCheng wants to merge 10 commits into
devfrom
cursor/feat-codex-subscription-6719

Conversation

@HuiCheng

@HuiCheng HuiCheng commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

上游工作 PR 镜像。请以 seakee#745 为准。

seakee#743:轻量 Codex Subscription(慢刷新、按 chatgpt_account_id 共享、非 Free Tab;until = subscriptions > wham > JWT;配额链路不动)。

Community and maintenance PRs must target dev.

Scope

  • Frontend panel
  • Manager Server
  • CPA panel mode
  • Full Docker mode
  • Native packages / release
  • Docs / Wiki
  • CI / build / tooling

Changes

见上游 seakee#745

User Impact

见上游 seakee#745

Compatibility / Runtime Notes

  • CPA panel mode: 前端 + management api-call
  • Manager Server mode: 无 schema 变更
  • Full Docker / native packages: 面板更新后生效

Data / Security Notes

N/A beyond existing management api-call token use.

Risk / Rollback

Risk level: Medium

Rollback notes: 关/回退上游 PR。

Verification

  • Type check
  • Lint
  • Tests
  • Build
  • Manual UI check
  • Docs/link check
  • Not applicable, docs-only

Commands / evidence:

npm run type-check && npm run test

Screenshots / Recordings

见上游 seakee#745

Docs

  • Not needed — explanation included below

Docs decision: 同上游。

Related

Upstream: seakee#745
Refs seakee#743

HuiCheng and others added 2 commits September 12, 2026 16:25
Fetch /backend-api/subscriptions independently of quota refresh, share
records by chatgpt_account_id, and prefer subscriptions.activeUntilMs
for list remaining days. Paid Codex gets a gated Subscription tab.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Replace the brittle renderer tab test with field-builder coverage and
assert the demo api-call subscriptions payload.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
@cursor
cursor Bot changed the base branch from cursor/upstream-dev-6719 to dev September 12, 2026 16:31
@HuiCheng HuiCheng changed the title feat(web): add lightweight Codex subscription from ChatGPT subscriptions feat(web): 基于 /backend-api/subscriptions 的轻量 Codex Subscription Sep 12, 2026
HuiCheng and others added 4 commits September 12, 2026 17:35
Replace the unstyled field dump with Quota-style summary metric cards
and an Overview field grid for secondary billing details.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Keep the new tab tests stable under react-test-renderer and match Prettier.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Show the formatted until time as the metric value and remaining days as
a second line so the 4-card row no longer ellipsizes "2 days".

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Keep the absolute until timestamp as the overview card hero and leave
remaining days only in the value tooltip.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

After 截图已按 until-only 刷新(卡面无剩余天数)。上游 seakee#745 同路径已替换:https://raw.githubusercontent.com/HuiCheng/CPA-Manager-Plus/media/pr-745-subscription-ui/docs/pr-745/after-subscription-pro-20x.png

HuiCheng and others added 4 commits September 13, 2026 14:18
Reject unmatched array payloads, mark post-ready fetch failures as
soft_failed with retry cooldown, resolve ready store records when
callers omit subscriptionsRecord, and rotate a sibling authIndex after
http/network soft-fail.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
…builds

Keep token-scoped objects without account-id, but return null for mismatched
object/nested payloads. Preserve a fresh ready record when a chained force
soft-fails. Re-run target ensure when subscriptionEntries change so sibling
authIndex rotate actually schedules, and include subscriptionEntries in the
rows useMemo deps for seakee#742 sort bake timing.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
…n objects

A parent account-id that is not the requested account must not adopt a
nested token-scoped object. Nested arrays under an envelope id can still
select a matching per-account element.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Honor triedAuthIndexes for 3+ siblings, keep ready only for chained force
after a just-ready inflight, default demo subscriptions to free when plan
is missing, hide the tab when the API plan is free, and search dual-key
subscriptions arrays before token-scoped sibling objects.

Co-authored-by: 程辉 <HuiCheng@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant