You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clear chat drafts and stale document keys on sign-out #444
On a shared device, two things outlive sign-out. Chat drafts are stored per workspace and room, not per user, so the next person who opens that chat sees the previous person's unsent text. Four localStorage keys also keep the last document's id, slug and Pad title, including a Private one; nothing reads them.
Delete the four localStorage.setItem calls in useDocumentMetadata.ts, after a repo grep confirms nothing reads those keys. On sign-out, remove the four keys once, for existing browsers.
On sign-out, clear the composer draft store (memory map and its IndexedDB table) in messageComposerDB.ts, through one exported function that useSignOut calls before signOut().
Do not add a user id to the draft key; clearing on sign-out is enough and keeps the store simple.
Acceptance criteria
After sign-out and a new sign-in on the same browser, no previous draft appears.
localStorage holds no docId, padName, slug or title key after sign-out.
Drafts still survive a reload for a signed-in user.
Verify
Manual: type a draft, sign out, sign in as another user, open the same chat.
grep -rn "localStorage.getItem('\(docId\|padName\|slug\|title\)')" apps/webapp/src returns nothing before step 1.
Activity
fix(webapp): keep the token out of page props and clear drafts on sig…
HMarzban commentedon Oct 9, 2026
Fixed and live.
bdce7bd5bbbdaae66c(production run 37976785981, green).signOut(), cancelling queued writes first, and removes the four stale localStorage keys.