nextcloud / nextcloud/spreed

Enhanced offline-support for Talk web + desktop clients

Open
#17,654 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature: frontend 🖌️ Needs triage
Dominant language
JavaScript
Stars
2.2k
Forks
586
Avg merge
18h 27m
Merged PRs (30d)
333

Description

[!TIP]

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Offline support

Prerequisites
  1. Vuex to Pinia Migration: All left Vuex stores (conversationsStore.js, messagesStore.js, participantsStore.js) must be fully migrated to Pinia.
  2. Optimized Message List Rendering: message display mechanism must be refactored to handle large message volumes efficiently. Instead of "easing" the entire list, implement a strategy to render only the currently visible messages plus a small buffer (context) above and below (virtual list / windowing)
Proposed Plan for Offline Support
  1. Database Layer (IndexedDB)

    • Pick a library (promise-based wrapper around IndexedDB):
      • Dexie.js
      • db.js
      • RxDB
      • other suggestions?
    • Define Schema Design (what goes in):
      • settings + local/remote capabilites
      • conversations: metadata and last messages (migrate from current BrowserStorage approach)
      • participants
      • threads
      • scheduled messages / drafts
      • messages
      • chat / thread blocks: coupled with messages
      • polls and reactions
  2. Persistence & Hydration

    • APP >> DB: utilize Pinia's $subscribe in all relevant stores to trigger persistence of state changes
    • DB >> APP: during app initialization load data from IndexedDB into the Pinia stores
      • step 2: lazy load some data on demand
      • step 3: persist less data in stores, and more in db
  3. Connection Management & Operation Queue

    • Monitor connection status globally (use @vueuse/core useOnline or custom solution)
    • Better handle offline state (instead of bombing with requests)
    • Queue requests while offline, when the online event is detected, process the queue
    • Handle conflict resolutions
  4. UI/UX Enhancements

    • Connectivity Indicators: status bar or badge indicating "Working Offline" or "Synchronizing..."
    • Optimistic UI Extensions: Update the message list to visually distinguish states
    • Toast Notifications: Provide feedback when the app successfully reconnects and finishes syncing pending changes
  5. Implementation Phases

    1. Setup & Schema: Integrate DB wrapper and define the database structure, including tables for all identified data.
    2. Core Data Persistence & Eager Hydration: Implement store-to-DB synchronization and eager loading for conversations and settings
    3. Lazy Loading for Messages: Implement on-demand loading for messages, ensuring efficient display and pagination
    4. On-Demand Loading for Auxiliary Features: Implement loading for participants, chat blocks, threads, scheduled messages, polls, and reactions when their respective UI components are activated.
    5. Mutation Queuing: Implement the operationQueue for sending messages and other mutations while offline.
    6. Sync & Conflicts: Implement reconnection logic and basic conflict resolution for the operationQueue.
    7. UI/UX & Testing: Add visual indicators and perform rigorous offline testing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with conversationsStore.js, messagesStore.js, and participantsStore.js, then review the Vuex-to-Pinia prerequisite and the proposed IndexedDB options. Done means the stores are migrated, offline data and queued mutations support synchronization and conflict handling, and the listed UI/UX and testing phase is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database, desktop, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.