Documentation Index
Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
Use this file to discover all available pages before exploring further.
Post Email Delivery Recovery
The post email queue now treats provider-accepted delivery as durable once it is written toemail_audit. The sent_emails table is still the primary history surface for the product UI, but queue retries must not resend a post email just because the follow-up sent_emails insert or user_group_post_checks.email_id link failed.
Recovery Rules
email_auditis created before a send and updated tosentimmediately after provider success.- Batch processing checks both
sent_emailsand matchingemail_auditentries for the same post-recipient pair before sending. - If an audit record proves the email was already sent, the worker marks the queue row as
sentand backfillssent_emailsopportunistically instead of resending. - If provider delivery succeeds but local
sent_emailspersistence fails, the queue row still transitions tosentwith a warning inlast_errorso the system does not retry the message.
Claiming Strategy
- The queue worker should only claim rows that it can start in the current processing slice.
- Avoid front-claiming the whole
sendLimit; strandedprocessingrows interact badly with stale cleanup and can create duplicate delivery attempts after requeue.
Attendance Exports
The workspace attendance page now supports exporting attendance for everyone across a selected date range.Behavior
- The export is inclusive: records on both the start date and end date are included.
- Exports are workspace-wide and include all recorded attendance rows across groups in the selected period.
- The UI builds the file client-side, but the data source remains the authenticated internal API route at
/api/v1/workspaces/:wsId/users/attendance/export.
Implementation Notes
- Keep range filtering on the persisted
user_group_attendance.datestring values withgte(startDate)andlte(endDate)to avoid timezone drift. - Page the API response for large exports instead of assuming a single Supabase page will return every matching row.
- Excel and CSV generation should stay in the client so the page can reuse localized column labels and progress feedback.
Workspace Member Profiles
Workspace members can have workspace-specific display names, similar to server profiles.Behavior
- Member profile display names are stored on
workspace_users.display_name, not on the globalusers.display_name. - The workspace members settings page can edit display names for joined members and pending invites.
- Pending email invites may create a
workspace_usersrow before the invited platform user joins. - When the invited user later joins,
workspace_user_linked_usersshould reuse exactly one unlinkedworkspace_usersrow with a matching email in the same workspace. - If multiple matching workspace profiles exist for an email, runtime linking must not guess. Admin edit APIs should report the ambiguity so duplicate profiles can be resolved explicitly.
Implementation Notes
- Keep members-page writes narrow: update the workspace profile display name only.
- Always verify
manage_workspace_membersbefore writing member profiles from the members settings UI. - Enhanced member listing should display the workspace profile name when available and fall back to the platform user display name.
Attendance Manager Counting
Workspace attendance settings include a default-onATTENDANCE_COUNT_MANAGERS flag.
- When enabled, group managers count toward attendance totals in user-group list summaries.
- When disabled, attendance totals on the user-group list subtract group managers from the group member count.
- This is separate from
ATTENDANCE_SHOW_MANAGERS, which controls whether managers appear in detailed attendance-taking views.