Skip to content

fix: Cap desktop sessions list export by sensor type#1172

Merged
hanka merged 4 commits intomasterfrom
fe/fix/fix-exporting-sessions-list
Apr 13, 2026
Merged

fix: Cap desktop sessions list export by sensor type#1172
hanka merged 4 commits intomasterfrom
fe/fix/fix-exporting-sessions-list

Conversation

@evulins
Copy link
Copy Markdown
Collaborator

@evulins evulins commented Mar 30, 2026

Add tiered limits for desktop bulk session export

Trello task

@evulins evulins force-pushed the fe/fix/fix-exporting-sessions-list branch from f667f97 to 04f9282 Compare March 30, 2026 10:33
Copy link
Copy Markdown
Collaborator

@hanka hanka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!


return Failure.new(session_ids: ['must include at least one session']) if unique_ids.empty?

sessions = Session.where(id: unique_ids).includes(:streams)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing, but converting sessions to array (sessions = Session.where(id: unique_ids).includes(:streams)) and then comparing sessions.length with the unique_ids.size would save 1 additional query to DB

@hanka hanka merged commit b9c20b0 into master Apr 13, 2026
@hanka hanka deleted the fe/fix/fix-exporting-sessions-list branch April 13, 2026 13:08
@hanka hanka removed the on staging label Apr 13, 2026
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.

2 participants