fix: refresh Windsurf quota cloud plugin#313
Conversation
🤖 Augment PR SummarySummary: Updates the Windsurf provider to use the new quota-only cloud Changes:
Technical Notes: The plugin now validates a strict quota payload contract and distinguishes “no API key” (login hint) vs “quota unavailable” cases. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Updates the Windsurf provider integration to use the current quota-only cloud GetUserStatus flow, removing legacy local language-server probing/credit parsing and tightening test coverage to keep the repository coverage gate passing.
Changes:
- Refactor Windsurf plugin to be cloud-only and emit quota-based “Daily quota”, “Weekly quota”, and “Extra usage balance” lines.
- Update Windsurf plugin manifest (
plugin.json) to match the new quota-oriented lines/scopes. - Add/extend targeted hook + plugin tests to cover new behaviors and edge cases.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/hooks/use-app-update.test.ts | Adds additional tests for Tauri gating, in-flight checks, progress edge cases, and unmount safety. |
| src/hooks/app/use-settings-plugin-actions.test.ts | Adds reorder edge-case tests (missing/unstable order metadata, empty visible subset). |
| src/hooks/app/use-probe-auto-update.test.ts | Adds initial coverage for auto-update scheduling reset behavior. |
| plugins/windsurf/plugin.test.js | Reworks tests around the new cloud quota contract and variant fallback behavior. |
| plugins/windsurf/plugin.json | Replaces legacy credit lines with quota + extra usage balance line definitions. |
| plugins/windsurf/plugin.js | Implements the new quota-only cloud probe logic and output formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Description
Related Issue
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passbun tauri devbun run test:coverageand it passedGetUserStatusresponseScreenshots
Checklist
mainbranchNote
Medium Risk
Medium risk because it changes the Windsurf provider’s data source/contract (new cloud URL + quota fields) and alters error/fallback behavior, which could break quota display if the upstream payload differs or parsing is too strict.
Overview
Updates the Windsurf plugin to only call the quota-based cloud
GetUserStatusAPI (newserver.self-serve.windsurf.comendpoint with fixed compat version), removing all local language-server probing and legacy credit parsing.The plugin now renders
Daily quota,Weekly quota, andExtra usage balance, with stricter contract validation, percent clamping, and clearer fallback hints for auth vs quota-unavailable cases.Extensively rewrites/expands tests for the Windsurf plugin and adds targeted hook tests (
useProbeAutoUpdate,useSettingsPluginActions,useAppUpdate) to cover edge cases like missing settings/order metadata, non-Tauri runtime, in-flight checks, unknown download sizes, and unmount safety.Written by Cursor Bugbot for commit ae7f896. This will update automatically on new commits. Configure here.
Summary by cubic
Switched the Windsurf plugin to the quota-only cloud API and now show daily/weekly quota plus extra usage balance. Removed local LS probing and tightened auth/fallback logic with focused tests.
Bug Fixes
exa.seat_management_pb.SeatManagementService/GetUserStatusathttps://server.self-serve.windsurf.comusing compat1.108.2.windsurfoverwindsurf-next; read the API key from both variants; detect auth statuses and show the login hint; fall through on non-2xx, network, empty, or non‑quota payloads; validate the quota contract (daily/weekly remaining%, reset times, extra balance), clamp percentages, format dollars, convert Unix seconds to ISO, and throw a clear quota‑unavailable hint when invalid.Refactors
plugins/windsurf/plugin.jsonto "Daily quota", "Weekly quota", and "Extra usage balance".use-probe-auto-update,use-settings-plugin-actions, anduse-app-update(non‑Tauri, in‑flight rechecks, unknown download length, missing/empty order metadata, restore saved order, and unmount safety).Written for commit ae7f896. Summary will update on new commits.