Skip to content

[Bug] Small state/config fixes: stale page on clear-search, file input never resets, global retry retries 4xx #1058

@chronoai-shining

Description

@chronoai-shining

Summary

Found during fine-grained code-quality review (second pass) at commit 14fbf3e (develop). Severity: low — bug. Three small state/config issues:

  1. MySkillsPage "Clear search" keeps stale pagination (pages/skill/MySkillsPage.tsx:126-134): typing resets page (89-92) but the empty-state "Clear search" button only does setSearchInput("") — a user on page 3 of a filtered set re-fires the cleared query with page=3 and can see an empty grid for a non-empty collection. Fix: also setPage(1). (Same family as [Bug] Changing the search query doesn't reset the URL ?page= param — false empty results on /registry #1000 on ExplorePage.)
  2. Import file input never resets (pages/admin/settings/sections/ExportImportSection.tsx:212-218): after a failed parse, re-picking the same fixed file doesn't fire onChange because the input's value is unchanged. EditSkillPage.tsx:63 does this correctly (e.target.value = ""). Fix: mirror it.
  3. Global retry: 1 retries non-retryable 4xx (App.tsx:222-229): every failed query — including 401/403/404 ApiClientErrors — is retried once, doubling load on hard failures and delaying error states. Fix: retry: (count, err) => !(err instanceof ApiClientError && err.statusCode < 500) && count < 1.

Metadata

Metadata

Labels

auto:eligible/auto MAY pick this issue for autonomous work. Required to claim.size:SSmall: < ~1h, single file/concern. Size is informational.type:bugDefect: behavior diverges from intent/spec.webornn-web frontend SPA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions