Skip to content

feat: add credits usage panel mirroring the Qoder IDE usage view - #21

Open
luoxuanzao wants to merge 3 commits into
mainfrom
feat/credits-usage-panel
Open

feat: add credits usage panel mirroring the Qoder IDE usage view#21
luoxuanzao wants to merge 3 commits into
mainfrom
feat/credits-usage-panel

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • Add a credits usage panel to the chat view: a gauge button next to the
    session history opens a dropup popover mirroring the Qoder IDE usage view
    (plan credits with edition badge, personal/add-on resource pack, org
    resource package, segmented progress bars, renewal date), with a
    "View Details" link to the edition's account usage page
    (qoder.com vs qoder.com.cn). Data comes from the SDK's getUsageInfo(),
    piggybacked on the startup probe plus a TTL-cached manual refresh.
  • Personal accounts render like the IDE: plain tier label (体验版/Trial)
    instead of the org badge, and no renewal line for the year-9999 sentinel.
  • Fix the model selector dropdown flying to the far toolbar edge on wide
    views (regression from Feat/narrow sidebar adaptivity #18) and switch toolbar dropdowns to logical-edge
    anchoring for RTL layouts.
  • Needed so users can see remaining credits inside Obsidian without
    opening the IDE, matching both international and China editions.

Verification

  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build
  • npm run release:check
  • npm run audit:prod
  • Tested affected qodercli behavior against a real CLI when applicable
    (live idle probes against both qodercli/teams and qoderclicn/personal
    accounts; build deployed to a real vault and verified visually,
    including narrow-sidebar behavior)

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

luoxuanzao and others added 3 commits August 14, 2026 21:14
- Startup probe piggybacks getUsageInfo() so the runtime catalog caches
  account usage; a gauge button next to the session history opens a
  dropup panel with plan quota, personal/add-on pack and org resource
  package, each with a segmented progress bar
- Personal accounts render like the IDE: plain tier label instead of
  the org badge, no renewal line for the year-9999 sentinel expiry
- "View Details" links to the edition account usage page
  (qoder.com vs qoder.com.cn); panel width tracks the footer so narrow
  sidebars clip neither edge
- 10 locales plus unit tests for the button, service, probe and catalog

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
- Model dropdown opens above the model button (inset-inline-start on
  the toolbar) instead of flying to the far edge on wide views, a
  regression from the narrow-sidebar adaptivity change
- Permission dropdown switches right to inset-inline-end so both
  dropdowns anchor correctly in right-to-left layouts while keeping
  the adaptive max-width

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.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