Stay on top of work
Work without a connection
A dropped connection does not have to lose a comment. Source saves supported changes on your device, and sends them when a connection returns.
8 min read
What you can do
- Change issues while offline: comment, change labels and more, then sync when you reconnect.
- Fix a change that was not saved: the server refused a change, and you want to make it again.
- Sign out with unsent changes: keep or delete the changes that did not reach the server.
- Read commits and branches offline: open the history of a repository with a slow network, or none.
Saved pages and access
Source saves these pages in your browser, within the storage limits of the browser:
- the collaboration pages that you visited, and their loaded data,
- the code pages that you visited,
- the pages of results that you loaded.
These need a connection:
- a page that is not saved,
- settings, vault files and credentials,
- merges, reviews and uploads,
- destructive actions.
If browser storage is not available, changes need a connection, and wait for the server to confirm them.
When you are signed out
You do not have to sign in to get saved pages. Source also saves the issue and pull request pages, their lists, and the commit and branches pages that a signed-out visitor opens.
- A saved page opens at once, then loads the fresh data, the same as for a signed-in person.
- These pages hold only content that every signed-out visitor can see.
- When you sign in, Source removes them from this device.
How a saved page opens
- A page that you visited before in this browser, with the same account, opens at once. This is also true for a reload, a bookmark or a new tab. After an update of Source, the first visit of a page loads it from the network.
- Source shows the saved copy first and loads the fresh data in the background. The page updates when the fresh data arrives. Then Source saves the fresh copy.
- After you save a change, the page waits for the fresh data, and does not show the saved copy.
- An issue or pull request list also waits for the fresh data when its open count changed while you were on another page. So it never shows the old count first.
- When you follow a link, or a loaded page refreshes its data, the current view stays visible and a progress bar shows at the top. A pointer over a link can start to load its page before you click.
When access changes
- If the background load is refused because you lost access, Source removes the saved data of that repository.
- If only the page is not found (404), for example a deleted file, Source removes the saved copy of that page. Then it shows the not-found page.
- A switch to another account removes the saved pages, saved data and pending changes of the previous account from this device.
- If your session ends while a repository page is open (you signed out in another browser, or the session expired), the page learns it when its live updates connect again, within about 15 seconds. It asks the server once who is signed in. Source removes your data from this device, and the page shows what a signed-out visitor can see. The notice says
You were signed out.A sign-out in another tab of this browser does the same at once, with no notice. - If access to a repository is refused after you reconnect, Source removes its saved data and pages.
- A device that stays disconnected cannot learn about a new permission change until it reconnects.
Live updates after a disconnect
- Live subscriptions continue from a saved cursor after a disconnect. If the server already trimmed that history, Source starts a fresh authorized subscription.
- While you are connected, Source checks your access again at least every 15 seconds.
- A changed read permission clears the old repository cache before Source loads anything under the new permission.
To see what updates live, read See changes without a reload.
When a page does not load
The page says why, and what to do:
| The page says | What to do |
|---|---|
| You are signed out | Click Sign in. |
| Your account is waiting for approval | Click Open the waitlist. |
| Page not found: you do not have access, or the page does not exist | Click Go home. |
You are offline, and this page is not saved on this device. | Reconnect, then click Try again. |
| This page did not load, with an error | Click Try again or Reload. |
Access changes during a read
When Source removes a repository's saved data, it also invalidates reads that started before that removal. An old response cannot restore that data or replace a newer authorized response. An old refusal cannot remove data from a newer authorized load. This also applies to background refreshes and cached results after a network error or an overloaded server. A new load can read the repository again under the server's current access rules. A missing file or page does not by itself mean that access to the repository ended.
Account changes invalidate the previous account's reads. Repository access changes do not cancel accepted writes to other repositories.
A pending change can delay the replacement of saved pages. Old pages stay unavailable until the replacement is visible. A new authorized read uses only accepted replacement data, including its linked items and timeline.
A page that is already open also becomes unavailable when Source removes its access. This includes unsent private issue rows. A person whose access to a repository is removed stops getting its live updates within about 25 seconds. When an authorized replacement becomes visible, the page can show it again without a manual reload. Accepted changes still finish. A reply from a change that started before removal does not restore the removed data.
Live updates can remove access to one item or comment while repository access stays the same. Source hides the removed item, comment and cached timeline inputs during that update. When a live update changes a repository while a page of that repository loads, Source drops the older answer and reads the page again. The page shows the new answer, not an error. If the server accepted a change, later revocation ends an obsolete live-confirmation wait without rejecting that accepted change. An account change or a genuine confirmation timeout still fails the wait.
Live content removals also clear saved server documents through the existing service worker. Other client rows and accepted changes keep their owners.
A fresh live snapshot can omit a comment without sending a separate deletion. Source removes the omitted server comments from normalized and cached timelines before it notifies readers. A fresh snapshot clears the saved pages of the repository only when it omits a comment of an item that it sends again. A snapshot that sends the same comments again keeps them, so the next visit can still show the saved page at once. A pending local comment can remain on a still-readable item. A repository or all-data purge also hides those old local drafts.
A pending public write completion still belongs to its original account. Switching accounts or closing the client rejects that pending completion, including after live confirmation. A local-save receipt that was already delivered still means that the change was saved on this device at that time.
A read keeps its original ownership while it publishes normalized items. If a notification removes that access, the read stops publishing further items and does not save its old result. This also protects a new account's pending read of the same page.
Live changes and purge deletions enter offline storage in their accepted order, before their collection notifications. A new authorized replacement started by a notification keeps its own saved copy.
Repository removal also deletes saved rows that restoration has not shown, including older rows outside the memory limit. Those rows cannot return on an offline restart. New authorized replacements keep their own saved copy.
Discarding a saved draft removes only that draft. Live item and comment removals keep unrelated saved pages and unsent text, including while saved data is still loading.
A purge also retires older live updates waiting for saved data to load. Later authorized updates keep their own data and cursor. Switching accounts clears the previous account's saved data and pending changes even if its storage has not opened yet.