Skip to content

Feat/background thread discovery#135

Draft
Just-Insane wants to merge 4 commits intoSableClient:devfrom
Just-Insane:feat/background-thread-discovery
Draft

Feat/background thread discovery#135
Just-Insane wants to merge 4 commits intoSableClient:devfrom
Just-Insane:feat/background-thread-discovery

Conversation

@Just-Insane
Copy link
Contributor

  • Implement automatic background pagination on room open with adaptive limits:
    • High-end (4g+/desktop/high-memory): 500 messages, 1s delay
    • Medium (3g or <=4GB RAM): 250 messages, 2s delay
    • Low-end (save-data/2g or mobile): 100 messages, 3s delay

Description

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Evie Gauthier added 4 commits March 10, 2026 09:02
- Add device capability detection using same logic as sliding sync
- Implement background pagination on room open with adaptive limits:
  - High-end (4g+/desktop/high-memory): 500 messages, 1s delay
  - Medium (3g or <=4GB RAM): 250 messages, 2s delay
  - Low-end (save-data/2g or mobile): 100 messages, 3s delay
- Detection based on: connection type, device memory, save-data preference
- Improves message history availability without blocking initial room load
- Consistent with sliding sync's adaptive behavior
- Export AdaptiveSignals type and readAdaptiveSignals() from device-capabilities.ts
- Update slidingSync.ts to import shared logic instead of duplicating it
- Single source of truth for device capability detection across the app
- Reduces code duplication and ensures consistent behavior
- Move readAdaptiveSignals import to top with other imports
- Fixes unconventional import placement from previous refactor
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