Skip to content

fix: remove sidebar spend card - #248

Merged
Suzhen Zheng (benniao85) merged 1 commit into
mainfrom
benniao85-remove-spend-card
Oct 23, 2026
Merged

Suzhen Zheng (benniao85) merged 1 commit into
mainfrom
benniao85-remove-spend-card

Conversation

@benniao85

Copy link
Copy Markdown
Collaborator

Description

Remove the monetary Spend card from the lower-left sidebar shown in the reported screenshot. Keep Tokens, the collapse control, refresh behavior, and Settings usage statistics unchanged. The remaining Tokens card fills the available width.

Based on the latest fetched origin/main (56566e2). Scope is limited to the monetary card, not the entire Usage section.

Related Issue

N/A — requested directly with a screenshot.

Changes

  • Remove the Spend card, its currency conversion and spend-only snapshot fields, and its English/Chinese translation keys.
  • Change the usage grid to one full-width column for Tokens.
  • Add seven regression tests covering both locales, zero usage, polling cleanup, collapse persistence, navigation, and the single-column layout.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • CI/CD or build configuration change
  • Refactoring (no functional changes)

Testing

  • Tests pass locally (cd desktop && npm run test)
  • Renderer tests pass locally (cd desktop/renderer && npm run test)
  • Build succeeds (cd desktop && npm run build)
  • Manual testing performed (describe below)
  • npm --prefix desktop\renderer run test -- src\components\SidePanel.test.ts — before the fix, six of seven tests failed on the old monetary card/two-column layout, confirming regression coverage.
  • npm --prefix desktop\renderer run test -- src\components\SidePanel.test.ts src\i18n\index.test.ts src\views\SettingsView.test.ts — passed: 58 tests across three files, including all seven new tests.
  • npm --prefix desktop run build — passed (main-process TypeScript, renderer type-check, and Vite production build). Reports warnings from unchanged dependency annotations, mixed gateway imports, and large bundles.
  • npm --prefix desktop\renderer run lint -- src\components\SidePanel.vue src\components\SidePanel.test.ts src\i18n\en-US.ts src\i18n\zh-CN.ts — passed with 0 errors and 107 existing warnings; the script also lints the full renderer.
  • git diff --cached --check — passed before commit.
  • Browser-development preview using mock IPC: visually verified the sidebar has no monetary card, Tokens occupies the full available width (247 px card / 247 px grid), and collapsing/re-expanding works. No live provider or installed desktop session was used.

The full main-process and renderer suites were not run; targeted renderer tests were used for this UI-only change. Formatting validation could not run: Prettier was missing, and restoring it failed with TLS handshake errors against both configured and official npm registries; an offline retry had no cached package. Desktop npm ci also encountered an existing jschardet lockfile mismatch, so build dependencies were restored with npm --prefix desktop install --ignore-scripts --package-lock=false --no-audit --no-fund. No manifests or lockfiles were changed.

Checklist

  • My code follows the coding guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes

Documentation: N/A; no existing documentation describes this monetary card. The full-suite checklist remains unchecked because only the relevant new and existing tests were run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@benniao85
Suzhen Zheng (benniao85) merged commit ab3323e into main Oct 23, 2026
0 of 2 checks passed
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.

2 participants