Fix: "Clear my history" now clears account history too
clearSession only reset the device-local history; for a signed-in user the panel shows the account history (serverHistory), which was never cleared and never sent to the server — so it looked like nothing happened. Add DELETE /api/history (clear all) and have clearSession reset serverHistory + call it when signed in.
This commit is contained in:
@@ -70,3 +70,6 @@ def test_history_and_import(client):
|
||||
# granular removal from history
|
||||
tc.delete("/api/history/2")
|
||||
assert {a["id"] for a in tc.get("/api/history").json()["items"]} == {1, 3}
|
||||
# clear ALL history
|
||||
assert tc.delete("/api/history").json() == {"ok": True}
|
||||
assert tc.get("/api/history").json()["items"] == []
|
||||
|
||||
Reference in New Issue
Block a user