# Feature COMMS-1075 - Show a branded offline page in the installed application when the connection drops

Project: Stream Communicator
Status: merged
URL: https://community.openproject.org/work_packages/COMMS-1075

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Behind feature flag, 18.1.0, Passion time |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan | Community (COM) |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Kabiru Mwenja |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

> **Delivered in reduced form with SE-647 (PR <mention class="mention" data-id="25882" data-type="work_package" data-text="#25882">#25882</mention>):** a stock OpenProject offline page with Retry, served by the service worker. Instance branding, colour scheme support and the shell cache are not pursued for now; the criteria below are marked accordingly.

**As** a person who uses OpenProject as an installed desktop application  
**I want** to see a clear, branded page when I lose my connection  
**so that** I understand what happened and can pick up again once I am back online, rather than meeting the browser's own error page inside the app window.

**Acceptance criteria**

  - **Replaces the browser's error page**
      - With the connection gone, a navigation inside the installed application lands on an offline page instead of the browser's error page.
      - This applies both to full page loads and to Turbo Drive visits, including links followed from within a page. Turbo already turns a visit that fails on the network into a full page load, which the worker answers.
      - With the connection back, a Retry action loads the page the user was trying to reach. The page also offers to retry by itself when the browser reports it is online again.
  - **Stock OpenProject identity**
      - The page shows OpenProject's own wordmark on the default header blue and names the instance by its application title in the text.
      - ~~Instance logo and header colour from Design settings~~ and ~~light and dark colour schemes~~: not pursued for now.
      - A deploy or a change of the application title refreshes the cached page.
  - **Holds nothing private**
      - The page is the same for every visitor: no user name, no project, no work package, no notification count.
      - It is fetched without credentials when it is cached, so it can never capture a signed-in rendering.
  - **Localised**
      - The page appears in the visitor's language where OpenProject has a translation, falling back to the instance's default language.
  - **Documented**
      - The FAQ answer stating that OpenProject cannot be used offline is updated: the installed application shows an offline page and resumes when the connection returns, but no content is available offline and nothing can be edited.

**Technical notes**

  - The service worker ships with SE-647 and only serves this page; the shell cache in SE-687 is deferred. The page is precached by that worker and served as the fallback for failed navigations.
  - **Route.** A small public route at `/offline` (under the path prefix), outside authentication, rendered without the application frame and with no user-specific content. The worker fetches it with `credentials: "omit"` during install.
  - **Turbo Drive.** Turbo visits are `fetch` requests, not `mode: "navigate"`, but Turbo reloads the page when a visit fails on the network, so the worker answers the resulting navigation. No extra handling is needed.
  - **Locale.** The page is served from the cache and cannot consult a session. The credential-less fetch still carries the browser's `Accept-Language`, which OpenProject already uses for anonymous visitors, so the cached copy is in the browser's language. This matches the out-of-application experience and avoids precaching every locale. Accepted limitation: a user whose OpenProject language differs from their browser's sees the browser's language.
  - **Theme.** A single stock palette, identical in light and dark mode, with contrast checked once.
  - **Assets.** Styles, script and the wordmark are inlined, so the worker precaches the page alone and it renders fully offline.
  - **Spec.** A system spec takes the worker's own target offline through Cuprite (page-level network emulation does not govern a worker's fetches) and asserts the fallback for a full load and for a Turbo visit, and that Retry recovers.

**Permissions and visibility considerations**

  - *To whom is this feature visible?*
      - Anyone using an installed OpenProject application, or a browser tab controlled by the worker, when a navigation fails for lack of a connection. Every edition, no permission gate.
  - *When is it not visible?*
      - While the connection works.
      - Over plain HTTP, or wherever the service worker is not registered.

**Translation considerations**

  - Offline / Offline.
  - "You are offline" and a one-line explanation that OpenProject will reload once the connection returns. Reuse existing connection wording where the application already has it.
  - Retry / Erneut versuchen.

**Out of scope**

  - **Reading cached content offline**: work packages, documents, attachments, exports.
  - **Offline editing**, drafts kept on the device, and background sync of queued changes.
  - **An in-page connectivity banner** on pages that are already loaded.
  - **Mobile.** Phones and tablets are served by the OpenProject Mobile app.
