GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(gui): derive effective account filter without effect setState · lidge-jun/opencodex@2375280

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • gui/src/components/provider-workspace
    • ProviderAuthPanel.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎gui/src/components/provider-workspace/ProviderAuthPanel.tsx‎

Copy file name to clipboardExpand all lines: gui/src/components/provider-workspace/ProviderAuthPanel.tsx
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,26 +231,26 @@ export default function ProviderAuthPanel({
231231

232232
const showModelFamilies = item.name === "google-antigravity";
233233

234-
useEffect(() => {
235-
if (showModelFamilies) return;
236-
if (
234+
const effectiveAccountFilter = useMemo(() => {
235+
if (!showModelFamilies && (
237236
accountFilter === "with_limits_gemini"
238237
|| accountFilter === "with_limits_claude"
239238
|| accountFilter === "gemini_exhausted"
240239
|| accountFilter === "claude_exhausted"
241-
) {
242-
handleFilterChange("with_limits");
240+
)) {
241+
return "with_limits";
243242
}
243+
return accountFilter;
244244
}, [showModelFamilies, accountFilter]);
245245

246246
const analyzedAccounts = useMemo(() => {
247247
return accounts.map(a => analyzeAccountQuota(a, item.name));
248248
}, [accounts, item.name]);
249249

250250
const filteredAndSortedAccounts = useMemo(() => {
251-
const filtered = filterAccounts(analyzedAccounts, accountFilter, accountSearch);
252-
return sortAccounts(filtered, accountSort, accountFilter);
253-
}, [analyzedAccounts, accountFilter, accountSearch, accountSort]);
251+
const filtered = filterAccounts(analyzedAccounts, effectiveAccountFilter, accountSearch);
252+
return sortAccounts(filtered, accountSort, effectiveAccountFilter);
253+
}, [analyzedAccounts, effectiveAccountFilter, accountSearch, accountSort]);
254254
const refreshQuota = async () => {
255255
if (!onRefreshQuota || refreshingQuota) return;
256256
const generation = ++quotaRefreshGeneration.current;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.