Stabilize CI runtime for updated deps and unblock Dependabot auto-format flow (#185)

* chore: apply ci and dependabot remediation changes

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot authored and GitHub committed 2026-08-01 10:58:33 +08:00
1 parent 95b51f0209
commit 04fbddb979
59 files changed
+627 -516

No files matched your search

+23 -20
View File
@@ -53,27 +53,30 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
const navigate = useNavigate()
const login = useCallback(async (username: string, password: string) => {
try {
await loginRequest(username, password)
const user = await getProfile()
authEpoch.current++
user.role = normalizeRole(user.role)
setProfile(user)
navigate("/dashboard")
} catch (error: any) {
const msg = error?.message
if (msg === "ApiErrorUnauthorized" || msg === "Unauthorized") {
toast(t("InvalidUsernameOrPassword"))
} else {
toast(msg || t("NetworkError"))
const login = useCallback(
async (username: string, password: string) => {
try {
await loginRequest(username, password)
const user = await getProfile()
authEpoch.current++
user.role = normalizeRole(user.role)
setProfile(user)
navigate("/dashboard")
} catch (error: any) {
const msg = error?.message
if (msg === "ApiErrorUnauthorized" || msg === "Unauthorized") {
toast(t("InvalidUsernameOrPassword"))
} else {
toast(msg || t("NetworkError"))
}
} finally {
// An explicit login resolves auth regardless of the still-pending
// mount probe; clear loading so ProtectedRoute stops blanking.
setLoading(false)
}
} finally {
// An explicit login resolves auth regardless of the still-pending
// mount probe; clear loading so ProtectedRoute stops blanking.
setLoading(false)
}
}, [navigate, setProfile, t])
},
[navigate, setProfile, t],
)
const loginOauth2 = useCallback(async () => {
try {