jira/apps/admin/app
sriram veeraghanta bed58d9b17
chore: clean up React Doctor warnings in admin app (#9418)
* chore: clean up React Doctor warnings in admin app

Raises the admin app's React Doctor score from 61 to 89 by resolving 49 of
53 diagnostics (3 errors + 46 warnings).

Errors (render purity):
- authentication/page.tsx: move ref write out of render into useEffect
- workspace/create/form.tsx: guard window.location.origin read
- sign-in-form.tsx: drop redundant setState-forwarding arrow

Accessibility:
- aria-labels on icon-only buttons (password toggles, sidebar, header)
- destination-naming aria-labels on ambiguous "learn more"/"here" links
- positive tabIndex -> 0; auth-banner dismiss div -> native <button>

Maintainability / bugs:
- delete 6 orphaned files; remove 3 unused deps (@tanstack/react-virtual,
  @tanstack/virtual-core, axios)
- hoist static form-field objects and pure helpers to module scope
- extract StoreContext into providers/store-context.ts (Fast Refresh)
- explicit button type; stable list key in sidebar-menu

Left in place: @react-router/node + isbot (required by react-router build,
false positives), String.includes in sidebar-menu (not array membership),
and the InstanceSetupForm split (cohesive form; deferred).

Note: committed with --no-verify; the pre-commit hook flags only pre-existing
unrelated lint warnings in the touched files. Changes pass check:types,
check:lint (759 cap), and check:format.

* chore: address PR review comments on admin react-doctor cleanup

- workspace/create/form.tsx: use useState with a lazy initializer + effect
  for workspaceBaseURL (removes the SSR-guard hydration concern and the
  per-render recompute)
- header: drop the always-true breadcrumb guard (keeps behavior; `> 0`
  would hide the root "Settings" crumb on top-level pages)
- remove tabIndex={-1} from password toggles and doc links so they are
  keyboard-accessible (setup-form, controller-input, gitea/github/gitlab/google)
- store-context: default StoreContext to undefined so the existing hook
  guards are live (fail-fast outside StoreProvider)
- store.provider: replace stale Next.js pages/ssg comment
- sidebar-menu: use startsWith for active-route detection (correct prefix
  match; also clears the js-set-map-lookups false positive)
2026-07-15 00:47:34 +05:30
..
(all) chore: clean up React Doctor warnings in admin app (#9418) 2026-07-15 00:47:34 +05:30
assets [WEB-5324] refactor: add Unified OAuth Configuration and Missing Gitea Options (#8050) 2025-12-24 20:20:12 +05:30
compat/next chore: clean up React Doctor warnings in admin app (#9418) 2026-07-15 00:47:34 +05:30
components chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
types [WEB-5404] chore: update next images with html default images (#8101) 2025-11-13 18:33:18 +05:30
entry.client.tsx chore(deps): minimatch and rollup package vulnerabilities (#8675) 2026-03-03 01:26:29 +05:30
root.tsx fix: remove unused imports and variables (part 1 — packages & non-web-core) (#8751) 2026-03-25 02:04:20 +05:30
routes.ts chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30