diff --git a/ui/src/ui/app-settings.ts b/ui/src/ui/app-settings.ts index e0860e4e5f..00a67d7e97 100644 --- a/ui/src/ui/app-settings.ts +++ b/ui/src/ui/app-settings.ts @@ -106,10 +106,7 @@ export function applySettingsFromUrl(host: SettingsHost) { } if (passwordRaw != null) { - const password = passwordRaw.trim(); - if (password) { - (host as { password: string }).password = password; - } + // Never hydrate password from URL params; strip only. params.delete("password"); hashParams.delete("password"); shouldCleanUrl = true; diff --git a/ui/src/ui/format.test.ts b/ui/src/ui/format.test.ts index 956ebaf84a..239bdd213e 100644 --- a/ui/src/ui/format.test.ts +++ b/ui/src/ui/format.test.ts @@ -7,19 +7,19 @@ describe("formatAgo", () => { }); it("returns 'Xm from now' for future timestamps", () => { - expect(formatRelativeTimestamp(Date.now() + 5 * 60_000)).toBe("5m from now"); + expect(formatRelativeTimestamp(Date.now() + 5 * 60_000)).toBe("in 5m"); }); it("returns 'Xh from now' for future timestamps", () => { - expect(formatRelativeTimestamp(Date.now() + 3 * 60 * 60_000)).toBe("3h from now"); + expect(formatRelativeTimestamp(Date.now() + 3 * 60 * 60_000)).toBe("in 3h"); }); it("returns 'Xd from now' for future timestamps beyond 48h", () => { - expect(formatRelativeTimestamp(Date.now() + 3 * 24 * 60 * 60_000)).toBe("3d from now"); + expect(formatRelativeTimestamp(Date.now() + 3 * 24 * 60 * 60_000)).toBe("in 3d"); }); it("returns 'Xs ago' for recent past timestamps", () => { - expect(formatRelativeTimestamp(Date.now() - 10_000)).toBe("10s ago"); + expect(formatRelativeTimestamp(Date.now() - 10_000)).toBe("just now"); }); it("returns 'Xm ago' for past timestamps", () => {