Skip to content

fix(notes): add self participant to new notes#5299

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/default-note-user-participant
May 22, 2026
Merged

fix(notes): add self participant to new notes#5299
ComputelessComputer merged 1 commit into
mainfrom
fix/default-note-user-participant

Conversation

@ComputelessComputer
Copy link
Copy Markdown
Collaborator

@ComputelessComputer ComputelessComputer commented May 22, 2026

Create plain sessions through one helper so new notes include the current user participant while self-only blanks still clean up.


Note

Medium Risk
Changes note/session creation and emptiness detection logic, which can affect session cleanup behavior and participant mappings across the app. Risk is moderate due to new transactional writes and default-user fallbacks, but scope is localized to session/participant creation.

Overview
New notes are now created via the shared createSession helper from useNewNote, useNewNoteAndListen, and useNewNoteAndUpload, removing the duplicated inline session-row creation and moving the note_created analytics emission into the helper.

createSession now assigns the current user (store.getValue("user_id") with a DEFAULT_USER_ID fallback) to the session and ensures the current user is added as a manual participant (creating a blank humans row if needed) in a single transaction; event-derived participant creation is also updated to use the current user.

isSessionEmpty is adjusted so a note with only the default self participant is still considered empty, while additional non-auto participants count as content. Added sessions.test.ts to cover self-participant creation, analytics firing, and the updated emptiness semantics.

Reviewed by Cursor Bugbot for commit d5ce26f. Bugbot is set up for automated code reviews on this repo. Configure here.

Create plain sessions through one helper so new notes include the current user participant while self-only blanks still clean up.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit d5ce26f
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a1005caa371060008bf38ef

@ComputelessComputer ComputelessComputer merged commit 35792bc into main May 22, 2026
10 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/default-note-user-participant branch May 22, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant