Tracking: verified findings from a full frontend review (master @ 9979b31)
This is the tracking issue for a full review of the rewritten dashboard (master @ 9979b31), done with static analysis cross-checked against a live APISIX instance. Every item below was verified by reading the code at the cited location and/or reproducing at runtime — items are grouped by theme, each with its pointer. Dedicated issues/PRs are linked where they exist; unlinked items are up for grabs (several are good first issue material).
Already tracked separately
- [ ] #3414 — CRITICAL no-op Edit→Save deletes inline upstream health checks (silent data loss; runtime-reproduced)
- [ ] #3415 — CRITICAL 401 fabricated into a successful
{data:{}}response (false success toasts, crashes) - [ ] #3416 — secrets/private keys/tokens plaintext in view mode
- [ ] #3412 — Plugin Metadata page false "Key not found" toasts (root cause identified in the issue: skip list says
'500', Admin API returns404) - [ ] #3296 —
zOneOfinverted xor (dead code today; fix or remove) - [ ] #3205 — no search on list pages. Verified scope: all 12 list pages set
search={false}; worse, 5 pages (consumers, services, plugin_configs, consumer_groups, credentials) declaresorter: truewith no handler — the sort arrows render but do nothing. The plumbing already exists end-to-end (pageSearchSchemareservesname/label; the request interceptor already serializes Admin APIfilter) — only the input box is missing. - [ ] #3322 — dark mode. Cost note: nothing in
src/is theme-aware today; the expensive part is the antd+Mantine dual-theming — nearly free after UI-library consolidation (below).
Error handling / resilience
- [ ] Network-level failure (Admin API unreachable/timeout) of any mutation gives zero feedback: the interceptor only handles
err.responseerrors (src/config/req.ts), the sharedQueryClienthas noMutationCache.onError(src/config/global.ts), and 25 of 26useMutationsites have no localonError. Fix in one place:new QueryClient({ mutationCache: new MutationCache({ onError }) })toasting on!err.response. - [ ] No
defaultErrorComponenton the router: 11 of 12 resources render loader/render failures as the dev-styled red stack dump with no retry (only stream_routes registers a custom one — and that one dereferenceserr.response?.data.error_msgwithout guardingdata, the exact #3370 shape). - [ ]
routes/detail.$id.tsxhas the app's only local mutationonError— it double-toasts on HTTP errors (interceptor already toasted) with hardcoded English strings. - [ ] Plugin metadata hook classifies any failed GET as "not configured" → a real 500/network failure on a configured plugin offers the user an empty
{}to save over their existing metadata (detailed in #3412 comment). - [ ]
PluginEditorDrawerfiresonSave(asyncmutateAsyncon the metadata page), then closes and resets without awaiting — a failed save loses the user's edits. - [ ]
secrets/detail.$manager.$id.tsxis the only non-suspense detail page: on fetch failure it renders a blank editable form (Save would PUT an empty object over the real secret) instead of an error state. - [ ] Route
varsinvalid JSON: with a zod resolver attached, RHF ignores the Monaco field-levelvalidaterule, soJSON.parsethrows insidemutationFn→ onroutes/addthe Add click does nothing, silently. - [ ]
?page=abcbecomesNaNand is sent to the Admin API; duplicated?page=params throw a ZodError into the raw boundary (src/types/schema/pageSearch.ts). - [ ] Settings modal admin-key field fires
queryClient.invalidateQueries()+refetchQueries()per keystroke (src/components/page/SettingsModal.tsx) — captured an 18-request burst of identical list GETs; typing a 32-char key ≈ 32 full refetch storms. Apply on blur/debounce.
Data-integrity (form ↔ API round-trip)
- [ ]
rmDoubleUnderscoreKeysrecurses intonull(typeof null === 'object') and throws — runs before the null-cleaner inpipeProduce, so a plugin config containingnullcrashes the submit (src/utils/producer.ts). - [ ] Empty-value stripping inside surviving plugin configs:
produceRestoreEmptyPluginsonly restores whole-plugin entries; nested meaningful empties ({"headers": {}},[],"") are still silently removed (sibling of #3269/#3277). Inline route/serviceupstream.discovery_args: {}also still dropped (the #3376 merge-back fix covered the upstreams page only). - [ ] Inline upstream
name/desc/labelsare unconditionallydeleted on submit (FormPartUpstream/util.ts) while the form renders inputs for them — user input silently discarded; API-created values lost on any edit-save. - [ ] Route
script/script_idhave no form control; withshouldUnregister: truethey're dropped from the PUT body — a scripted route loses its script on any dashboard edit. - [ ]
checks.active.http_request_headersis rendered with the Labels widget (object) but typedarray<string>— existing values display empty, new input fails zod: field unusable in both directions (FormSectionChecks.tsx). - [ ]
ssls.client.skip_mtls_uri_regexrendered as a boolean Switch but typedarray<string>— same both-directions breakage (FormPartSSL/index.tsx). - [ ] Labels widget splits on every
:— a label value containing a colon errors on any subsequent edit of the tag set (Labels.tsx; split on first colon only). - [ ] Object-form nodes conversion corrupts IPv6 hosts and invents
port: 1/priority: 0(FormItemNodes.tsxkey.split(':')). - [ ] Stream routes: create path bypasses
pipeProduce(only resource whose create/edit run different cleaning pipelines), and the reused plugins section offers aplugin_config_idinput the resource schema doesn't have — typed values silently vanish. - [ ] Consumer delete redirects to
/consumer_groupsinstead of/consumers(consumers/detail.$username/index.tsx— copy-paste).
UX / IA / i18n / a11y
- [ ] Dirty-form navigation is fully unguarded (no
useBlocker/beforeunloadanywhere): sidebar click, browser Back, or tab close silently discards edits; the 14 add pages have no Cancel at all, so navigation is their only exit. ConverselyuseEditCancelGuardalways interrogates even with zero changes (its own comment documents whyisDirtyis untrustworthy under thedisabled-toggling architecture — worth fixing at the root: mount the form only in edit mode). - [ ] Language choice is never persisted or detected (
lng: 'en'hardcoded; reload resets a zh/tr user to English — while the admin key is persisted); antdConfigProvideris hardwired toenUSregardless of app language, so list pages stay English after switching; delete-confirm builds sentences by concatenation, producing garbled output in de/tr/es (trailing "¿?"); translation-progress indicator counts keys not values (all locales report 100% while tr has 98/232 English values) so it never displays. - [ ] Accessibility: exactly one
aria-labelin all ofsrc/— language/settings/burger buttons and plugin-card action buttons are nameless to screen readers; view-mode Monaco text is ~2.1:1 contrast (gray-5 on gray-0,global.css) on the primary read path; both drawers setcloseOnEscape={false}(for the select drawer there's no state to protect); plugin cards are wrapped inCombobox/role="option"semantics with nested interactive buttons and no keyboard wiring. Zero a11y assertions in e2e. - [ ] IA: flat 12-item nav with no grouping/icons; no breadcrumbs (4-level-deep credential pages orient by browser Back); one static
document.titlefor every page (routerHeadContentis already mounted — oneheadoption per route away). - [ ] Form TOC never refreshes when sections appear dynamically:
refreshTOCbuilds a debounced function and discards it without calling (FormSection/index.tsx:149-152). - [ ] Timestamps rendered as raw UTC ISO strings in list columns (
new Date(...).toISOString()), inconsistent with detail views.
Architecture / hygiene (the recurring-bug factories)
- [ ] Dual UI library: antd + pro-components exist only for
ProTableon the 12 list pages (configured down tosearch={false} options={false}) + oneEditableProTable; everything else is Mantine. Two token systems, two focus rings, two error styles on one screen; both frameworks load on the default landing route. Replace with a Mantine-native table. - [ ] MobX toolchain held hostage by one component:
mobx-react-observer's SWC plugin wraps every component app-wide to serve a singleuseLocalObservablesearch filter inPluginCardList.tsx(replaceable byuseState+useMemo);mobx-persist-storehas zero imports — dead dependency. - [ ] Hand-written zod transcription of Admin API constraints (~1,077 lines) is the root of the recurring "form rejects what the API accepts" class (#3146, #3147, #3362, #3376, #3395…). Cheapest structural guard: a CI contract test asserting the zod layer is looser or equal to the gateway's own schema; longer term, the JSON-Schema-driven form work (#3347/#3311/#2986).
- [ ] Submit pipeline strips then restores:
pipeProducedeep-cleans all empty values then patches back known exceptions one incident at a time — every future meaningful-empty field is pre-broken. Invert to dirty-fields-based submission. - [ ]
apis/imports types fromcomponents/(inverted layering, e.g.apis/ssls.ts); one detail page re-declares an exported query-options helper. - [ ] The repo's only unit test (
upstreams.test.ts, guarding the #3376 fix) never runs in CI — notestscript, no workflow invokes vitest.
Test-suite gaps (would-be regression escapes)
- [ ] No round-trip invariant test (create → read → no-op edit-save → deep-diff) — the class that would have caught #3414
- [ ] No masking assertions outside the settings modal (F7 unguarded)
- [ ] Mutation-failure feedback pinned only for route-create; no update/delete/network-level cases
- [ ]
validation.zOneOf-single-field.spec.tsonly tests the case an inverted implementation also passes — needs both/neither quadrants - [ ] No i18n key-parity unit test; the lang-switch integration spec self-skips if the switcher isn't found by accessible name
- [ ] Chromium-only; e2e backend tracks the moving
apache/apisix:devtag even for PR runs - [ ] 15
waitForTimeoutcall sites; suite is parallel-unsafe locally (specsdeleteAll*each other's fixtures; green in CI only becauseworkers: 1)
I'll be sending a first batch of small PRs for the top error-handling items and #3412/#3296/#3414. Happy to split any checkbox above into its own issue on request.
I'm working on the 'Error handling / resilience' section, please be careful not to create conflicts.
Update: 'Error handling / resilience' is done.
I'm working on the 'Data-integrity (form ↔ API round-trip)' section, please be careful not to create conflicts.
Status update on the review items. Most of the list is now covered by PRs; this note is mainly about what is not done yet and why.
Addressed (PRs opened, linked per area)
- Error handling / resilience and Data-integrity — all items resolved (merged; a few also fixed upstream in the meantime).
- UX / IA / i18n / a11y — dirty-form navigation guard + Cancel buttons on the add pages + conditional Edit→Cancel modal (#3443); language persistence + antd
ConfigProviderfollowing the app language + the delete-confirm sentence (#3440); a11y quick wins — accessible names on the header icon buttons, view-mode Monaco contrast, drawer Escape (#3442); per-routedocument.title(#3441); form TOC refresh on dynamic sections (#3439). (The "raw UTC ISO timestamps" point did not reproduce — the list columns already format viavalueType: 'dateTime'— so no change there.) - Architecture / hygiene — MobX de-hostaged + dead
mobx-persist-storedropped (#3446); theapis/→components/inverted type imports + the duplicated query-options helper (#3445); the unit test now runs in CI (#3444); and the "cheapest structural guard" for the zod layer — a contract test asserting it is looser-or-equal to the gateway's own per-resource schema (#3449), which already caught the upstreamschemeenum missingkafka, now fixed (#3450). - Test-suite gaps — round-trip invariant (#3448); masking assertion outside the settings modal (#3447); mutation-failure feedback extended to update / delete / network-level (#3447); the
zOneOfboth/neither quadrants (#3447); i18n key-parity unit test (#3447).
Still to do
Dual UI library — replace ProTable with a Mantine-native table.
A migration across all 12 list pages plus the one EditableProTable, removing antd + @ant-design/pro-components (the largest vendor chunk). Big enough that the replacement approach (a Mantine table library vs. a hand-rolled table) is worth agreeing before starting.
Submit pipeline — invert "strip-then-restore" to dirty-fields-based submission. This is the root of several data-integrity items that were each patched individually. Inverting it touches every form's submit path and the shared producer pipeline, so it has a large blast radius and wants its own design pass rather than being folded into an unrelated PR.
@moonming The "Still to do" section involves major, deep-level changes that require higher-level decisions. It might be best for you (or another maintainer) to take over this part, or provide explicit guidance/decisions on how to proceed.
Submit pipeline: "strip-then-restore" → dirty-fields (Architecture item)
pipeProduce deep-cleans all empty values from a submit body and then patches known exceptions back one incident at a time (plugins re-attached verbatim, discovery_args: {} restored). Any field that is meaningful-when-empty is pre-broken until another exception is added — the class behind #3269/#3277 (inline upstream name/desc/labels) and #3376 (discovery_args). The proposed inversion is dirty-fields-based submission: overlay only the fields the user actually changed onto the fetched original and PUT the full result, so nothing is stripped and every restore-exception retires.
I'm asking before doing it because it's the largest, highest-risk change here — it touches every form's submit path and leans on react-hook-form's dirtyFields, so a mistake reintroduces the same silent-data-loss class. Meanwhile the known cases are already fixed, and the new round-trip invariant test (create → read → no-op edit-save → deep-diff) now catches this class in CI. Given that, do you want the full inversion now, or is the current mitigated state acceptable with this deferred as a tracked improvement? (A lighter middle option: strip only UI-only __* keys and keep every schema-defined empty.)
Dual UI library: replace ProTable with a Mantine-native table (Architecture item)
antd + @ant-design/pro-components exist only for ProTable — the 12 list pages (all search={false} options={false}, i.e. plain paginated grids) plus one EditableProTable (the upstream nodes editor). Everything else is Mantine. The cost is continuous and unmitigated: the antd-vendor chunk is ~2.1 MB (~668 KB gzip, the largest chunk) and loads on every list page and any form with an upstream; list pages render a second design language next to Mantine; and it carries a dedicated @ant-design/v5-patch-for-react-19 shim. It's not a bug — nothing breaks — but every user pays it on every load.
The proposal is to replace all 13 usages with a Mantine-native table and drop antd entirely (all-or-nothing — the editable nodes grid must migrate too, or the chunk stays), phased as the 12 read-only tables first (well covered by existing CRUD/pagination/bulk e2e) then the editable grid last. The decision I'd want your call on, since it changes a framework-level dependency: mantine-react-table (feature-complete and Mantine-native, but itself a sizeable dep on @tanstack/react-table) versus a hand-rolled Mantine Table plus the existing pagination helper (no new UI framework, more code — especially for the editable grid). Is this something you want done, and if so which approach do you prefer?