Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function useConnectionDiagnosis(
state,
clientVersion: Constants.expoConfig?.version,
serverVersion: presentation.serverConfig?.environment.serverVersion,
primary: presentation.entry.target._tag === "PrimaryConnectionTarget",
},
messages,
);
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/files/FileMarkdownPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export function FileMarkdownPreview(props: {
const markdown = maskMarkdownFrontmatter(props.markdown);

// Only chunks near the viewport mount, so only they pay for the JS rewrites and native parse.
const { chunks, definitions } = splitMarkdown(markdown);
const { chunks, definitions } = splitMarkdown(markdown, undefined, true);
// A piece this long (one huge fence or HTML block) is too slow to parse, so it shows as source,
// in runs so no one text view lays out all of it.
const pieces = chunks.flatMap((chunk): PreviewPiece[] => {
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/src/features/threads/ThreadRouteScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ function LiveThreadRouteController(props: ThreadRouteScreenProps) {
return <UnavailableThreadDraftRedirect environmentId={environmentId} />;
}

// Reconnecting cannot help an environment this app does not support; its settings say why.
const canReconnect = routeEnvironmentRuntime !== null && routeConnectionState !== "unsupported";
return withInspectorHeader(
<ThreadUnavailableScreen
actionLabel={
routeEnvironmentRuntime === null ? gt("Manage environments") : gt("Reconnect environment")
}
actionLabel={canReconnect ? gt("Reconnect environment") : gt("Manage environments")}
onAction={() => {
if (routeEnvironmentRuntime !== null) {
if (canReconnect) {
onReconnectEnvironment(environmentId);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ describe("threadRouteOpensDraft", () => {
expect(threadRouteOpensDraft(failedDetail)).toBe(false);
});

it.each(["available", "unsupported"] as const)(
"keeps the route for an environment this app is not connected to (%s)",
(connectionState) => {
expect(threadRouteOpensDraft({ connectionState, detailStatus: "empty" })).toBe(false);
},
);

it("opens a draft once the thread can't arrive", () => {
expect(
threadRouteOpensDraft({ connectionState: "reconnecting", detailStatus: "deleted" }),
Expand Down
9 changes: 7 additions & 2 deletions apps/mobile/src/features/threads/thread-route-hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export function threadRouteIsHydrating(input: {
/**
* Replacing the route with a draft can't be undone, so a thread that may still arrive keeps its
* route: a reconnecting environment often delivers it moments later, and Reconnect starts a
* fresh connecting attempt.
* fresh connecting attempt. One that is not on this device or is switched off ("available"), or
* that this app cannot talk to, takes no draft either.
*/
export function threadRouteOpensDraft(input: {
readonly connectionState: EnvironmentConnectionPhase;
Expand All @@ -55,7 +56,11 @@ export function threadRouteOpensDraft(input: {
if (input.detailStatus === "deleted") {
return true;
}
return input.connectionState !== "reconnecting" && input.connectionState !== "connecting";
return (
input.connectionState === "connected" ||
input.connectionState === "offline" ||
input.connectionState === "error"
);
}

/**
Expand Down
64 changes: 34 additions & 30 deletions apps/mobile/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,16 @@
"0151ffe1b504490d": "Dieser Client benötigt einen neueren Server. Aktualisiere Onicode auf {host}, um dich zu verbinden.",
"b7554d48eece78bf": "Dieses Gerät ist offline",
"383d44c3b4927750": "{host} verwendet eine ältere Onicode-Version",
"93033e6fe944005b": "Unter der Adresse von {host} antwortet ein anderes Onicode",
"8fbb34f526bbc90b": "Dieses Gerät konnte die Verbindung nicht vorbereiten",
"f8f76728b8057648": "Onicode auf {host} hat dieses Gerät nicht akzeptiert",
"c5a5c823837b491a": "Keine Verbindung zu Onicode auf {host}",
"c6863c736a0be936": "Onicode auf {host} hat nicht geantwortet",
"be1a485071912959": "Verbinde dieses Gerät mit dem Netzwerk. Onicode verbindet sich von selbst wieder.",
"2e189c743ae0f3ab": "Aktualisiere Onicode auf {host}.",
"790e44894a6c18c5": "Wenn dieses Gerät in einem anderen Netzwerk ist, hat dort womöglich ein anderer Rechner diese Adresse. Onicode versucht es erneut, sobald sich das Netzwerk ändert.",
"5b72c411f6916189": "Starte Onicode auf diesem Gerät neu.",
"5443861e7c25340f": "Wenn Onicode auf {host} neu installiert wurde, entferne {host} und kopple es erneut.",
"6a1d53c7bee371aa": "Wenn es weiter fehlschlägt, entferne {host} von diesem Gerät und füge es erneut hinzu.",
"e950948b20d099cf": "Die Anmeldung dieses Geräts bei {host} ist abgelaufen oder wurde widerrufen. Kopple es erneut mit einem neuen Kopplungslink von {host}.",
"053d954a87a5dc82": "Stelle sicher, dass Onicode auf {host} läuft.",
Expand All @@ -493,7 +497,7 @@
"bc24c300d53d61c5": "{host} hat auf keiner gespeicherten Route geantwortet.",
"b0dd3cd876937ca8": "Verbindungsprofil {connectionId} ist nicht verfügbar.",
"5ce46783e79ca9d1": "Zugangsdaten der Verbindung {connectionId} sind nicht verfügbar.",
"421397f0269eb397": "Unter dieser Adresse läuft jetzt eine andere Onicode-Installation ({actual}, nicht {expected}). Entferne diese Verbindung und füge sie erneut hinzu.",
"c9330ffc3d8e205b": "Unter dieser Adresse antwortet eine andere Onicode-Installation.",
"33c6c9e0fd567f24": "Dieser Rechner meldet dieses Gerät nicht über das Tailnet an. Kopple es stattdessen mit einem Code von diesem Rechner.",
"ea0d3e4e51d5706f": "Die Zugangsdaten der Umgebung sind ungültig.",
"7283ebfd16d09677": "Die Zugangsdaten der Umgebung gewähren nicht den erforderlichen Zugriff.",
Expand Down Expand Up @@ -1750,35 +1754,6 @@
"b6e901ff18c9870c": "Dieses Video konnte nicht geladen werden. Prüfe die Verbindung und versuch es erneut.",
"846a81c1af70b4d6": "Video konnte nicht geöffnet werden",
"3546993db5f4884d": "Dieses Video konnte nicht geladen oder abgespielt werden. Prüfe die Verbindung oder halte das Video gedrückt, um das Original zu speichern oder zu teilen.",
"2f43856cab225c65": "Agenten-Benachrichtigungen",
"370fd93e509d1e31": "Laufende Agenten-Aktivität",
"d65f9a3ee3f07eb8": "Agenten-Aktivität",
"da192ff3231b10c8": "Alles fertig",
"97884c869683f97f": "{count, plural, one {{count} braucht dich} other {{count} brauchen dich}}",
"425e4a3d6c5c2867": "{count, plural, one {{count} fehlgeschlagen} other {{count} fehlgeschlagen}}",
"47229f653e4ebdee": "{count, plural, one {Fertig, {count} fehlgeschlagen} other {Fertig, {count} fehlgeschlagen}}",
"67d4a779cd49a863": "{count, plural, one {{count} fertig} other {{count} fertig}}",
"cefbcab009d74314": "{count, plural, one {{count} arbeitet} other {{count} arbeiten}}",
"6a3a43a30efe568c": "{count, plural, one {{count} aktiv} other {{count} aktiv}}",
"070e8d2523890f69": "{count, plural, one {{count} Thread} other {{count} Threads}}",
"8b310df9f3ba0ff2": "Wird verbunden",
"ad78fae7d373cf21": "Arbeitet",
"6676b94ff43c6214": "Genehmigung",
"068c8b6f9a2c1b4f": "Eingabe",
"0a260c7744afd0be": "Wartet",
"6583fff72f2231e8": "Fertig",
"37ffec8201f153c1": "Fehlgeschlagen",
"ebf96603a559247b": "Aktiv",
"7e81c3bd3e20afce": "{count} live",
"476e8fdb172008ea": "Läuft",
"fde2d0d0f81321de": "Prüfen",
"c37dbb5b38c06eee": "Antwort",
"1a424675921db512": "Wartet",
"d9d8ba6b8f69a34a": "Fertig",
"13c2082812368db7": "Fehler",
"4d16d880b1ca69d1": "Öffnen",
"16aed9b9b6f9ca2d": "Genehmigen",
"58108ce1e9afd3d7": "Antworten",
"07f8fca2dd944865": "Agenten-Anmeldung",
"f47cd63daffa1319": "Abgleichcode {code}",
"268f1054c28cdfff": "Dieses Gerät kann keinen Zugriff gewähren.",
Expand Down Expand Up @@ -1818,6 +1793,35 @@
],
"03fb284cacf02176": "Dieses Gerät braucht die Berechtigung „Zugriff verwalten“ auf {environment}.",
"97370f7ca457d991": "Dieses Gerät kann das auf {environment} nicht gewähren.",
"2f43856cab225c65": "Agenten-Benachrichtigungen",
"370fd93e509d1e31": "Laufende Agenten-Aktivität",
"d65f9a3ee3f07eb8": "Agenten-Aktivität",
"da192ff3231b10c8": "Alles fertig",
"97884c869683f97f": "{count, plural, one {{count} braucht dich} other {{count} brauchen dich}}",
"425e4a3d6c5c2867": "{count, plural, one {{count} fehlgeschlagen} other {{count} fehlgeschlagen}}",
"47229f653e4ebdee": "{count, plural, one {Fertig, {count} fehlgeschlagen} other {Fertig, {count} fehlgeschlagen}}",
"67d4a779cd49a863": "{count, plural, one {{count} fertig} other {{count} fertig}}",
"cefbcab009d74314": "{count, plural, one {{count} arbeitet} other {{count} arbeiten}}",
"6a3a43a30efe568c": "{count, plural, one {{count} aktiv} other {{count} aktiv}}",
"070e8d2523890f69": "{count, plural, one {{count} Thread} other {{count} Threads}}",
"8b310df9f3ba0ff2": "Wird verbunden",
"ad78fae7d373cf21": "Arbeitet",
"6676b94ff43c6214": "Genehmigung",
"068c8b6f9a2c1b4f": "Eingabe",
"0a260c7744afd0be": "Wartet",
"6583fff72f2231e8": "Fertig",
"37ffec8201f153c1": "Fehlgeschlagen",
"ebf96603a559247b": "Aktiv",
"7e81c3bd3e20afce": "{count} live",
"476e8fdb172008ea": "Läuft",
"fde2d0d0f81321de": "Prüfen",
"c37dbb5b38c06eee": "Antwort",
"1a424675921db512": "Wartet",
"d9d8ba6b8f69a34a": "Fertig",
"13c2082812368db7": "Fehler",
"4d16d880b1ca69d1": "Öffnen",
"16aed9b9b6f9ca2d": "Genehmigen",
"58108ce1e9afd3d7": "Antworten",
"d7b190749dba3db4": "Benachrichtigungsberechtigungen konnten nicht gelesen werden.",
"773cbfec641ff5aa": "Benachrichtigungsberechtigungen konnten nicht angefordert werden.",
"b9b1dccabd2ed00d": "Archivierte Threads",
Expand Down
64 changes: 34 additions & 30 deletions apps/mobile/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,16 @@
"0151ffe1b504490d": "This client requires a newer server. Update Onicode on {host} to connect.",
"b7554d48eece78bf": "This device is offline",
"383d44c3b4927750": "{host} runs an older Onicode",
"93033e6fe944005b": "Another Onicode answers at the address of {host}",
"8fbb34f526bbc90b": "This device could not prepare the connection",
"f8f76728b8057648": "Onicode on {host} did not accept this device",
"c5a5c823837b491a": "Could not connect to Onicode on {host}",
"c6863c736a0be936": "Onicode on {host} did not answer",
"be1a485071912959": "Connect this device to the network. Onicode reconnects on its own.",
"2e189c743ae0f3ab": "Update Onicode on {host}.",
"790e44894a6c18c5": "If this device is on another network, another machine may have that address there. Onicode tries again when the network changes.",
"5b72c411f6916189": "Restart Onicode on this device.",
"5443861e7c25340f": "If Onicode on {host} was reinstalled, remove {host} and pair it again.",
"6a1d53c7bee371aa": "If it keeps failing, remove {host} from this device and add it again.",
"e950948b20d099cf": "This device's sign-in to {host} expired or was revoked. Pair it again with a new pairing link from {host}.",
"053d954a87a5dc82": "Make sure Onicode is running on {host}.",
Expand All @@ -493,7 +497,7 @@
"bc24c300d53d61c5": "{host} did not answer on any saved route.",
"b0dd3cd876937ca8": "Connection profile {connectionId} is unavailable.",
"5ce46783e79ca9d1": "Connection credential {connectionId} is unavailable.",
"421397f0269eb397": "This address now runs a different Onicode install ({actual}, not {expected}). Remove this connection and add it again.",
"c9330ffc3d8e205b": "A different Onicode install answers at this address.",
"33c6c9e0fd567f24": "That machine does not sign in this device from the tailnet. Pair it with a code from that machine instead.",
"ea0d3e4e51d5706f": "The environment credential is invalid.",
"7283ebfd16d09677": "The environment credential does not grant the required access.",
Expand Down Expand Up @@ -1750,35 +1754,6 @@
"b6e901ff18c9870c": "Could not load this video. Check the connection and try again.",
"846a81c1af70b4d6": "Could not open video",
"3546993db5f4884d": "This video couldn't be loaded or played. Check the connection, or touch and hold the video to save or share the original.",
"2f43856cab225c65": "Agent alerts",
"370fd93e509d1e31": "Ongoing agent activity",
"d65f9a3ee3f07eb8": "Agent activity",
"da192ff3231b10c8": "All finished",
"97884c869683f97f": "{count, plural, one {{count} needs you} other {{count} need you}}",
"425e4a3d6c5c2867": "{count, plural, one {{count} failed} other {{count} failed}}",
"47229f653e4ebdee": "{count, plural, one {Finished, {count} failed} other {Finished, {count} failed}}",
"67d4a779cd49a863": "{count, plural, one {{count} done} other {{count} done}}",
"cefbcab009d74314": "{count, plural, one {{count} working} other {{count} working}}",
"6a3a43a30efe568c": "{count, plural, one {{count} active} other {{count} active}}",
"070e8d2523890f69": "{count, plural, one {{count} thread} other {{count} threads}}",
"8b310df9f3ba0ff2": "Connecting",
"ad78fae7d373cf21": "Working",
"6676b94ff43c6214": "Approval",
"068c8b6f9a2c1b4f": "Input",
"0a260c7744afd0be": "Waiting",
"6583fff72f2231e8": "Done",
"37ffec8201f153c1": "Failed",
"ebf96603a559247b": "Active",
"7e81c3bd3e20afce": "{count} live",
"476e8fdb172008ea": "Working",
"fde2d0d0f81321de": "Approve",
"c37dbb5b38c06eee": "Answer",
"1a424675921db512": "Waiting",
"d9d8ba6b8f69a34a": "Done",
"13c2082812368db7": "Failed",
"4d16d880b1ca69d1": "Open",
"16aed9b9b6f9ca2d": "Approve",
"58108ce1e9afd3d7": "Answer",
"07f8fca2dd944865": "Agent sign-in",
"f47cd63daffa1319": "Match code {code}",
"268f1054c28cdfff": "This device cannot grant any access.",
Expand Down Expand Up @@ -1819,6 +1794,35 @@
],
"03fb284cacf02176": "This device needs the Manage access permission on {environment}.",
"97370f7ca457d991": "This device cannot grant this on {environment}.",
"2f43856cab225c65": "Agent alerts",
"370fd93e509d1e31": "Ongoing agent activity",
"d65f9a3ee3f07eb8": "Agent activity",
"da192ff3231b10c8": "All finished",
"97884c869683f97f": "{count, plural, one {{count} needs you} other {{count} need you}}",
"425e4a3d6c5c2867": "{count, plural, one {{count} failed} other {{count} failed}}",
"47229f653e4ebdee": "{count, plural, one {Finished, {count} failed} other {Finished, {count} failed}}",
"67d4a779cd49a863": "{count, plural, one {{count} done} other {{count} done}}",
"cefbcab009d74314": "{count, plural, one {{count} working} other {{count} working}}",
"6a3a43a30efe568c": "{count, plural, one {{count} active} other {{count} active}}",
"070e8d2523890f69": "{count, plural, one {{count} thread} other {{count} threads}}",
"8b310df9f3ba0ff2": "Connecting",
"ad78fae7d373cf21": "Working",
"6676b94ff43c6214": "Approval",
"068c8b6f9a2c1b4f": "Input",
"0a260c7744afd0be": "Waiting",
"6583fff72f2231e8": "Done",
"37ffec8201f153c1": "Failed",
"ebf96603a559247b": "Active",
"7e81c3bd3e20afce": "{count} live",
"476e8fdb172008ea": "Working",
"fde2d0d0f81321de": "Approve",
"c37dbb5b38c06eee": "Answer",
"1a424675921db512": "Waiting",
"d9d8ba6b8f69a34a": "Done",
"13c2082812368db7": "Failed",
"4d16d880b1ca69d1": "Open",
"16aed9b9b6f9ca2d": "Approve",
"58108ce1e9afd3d7": "Answer",
"d7b190749dba3db4": "Failed to read notification permissions.",
"773cbfec641ff5aa": "Failed to request notification permissions.",
"b9b1dccabd2ed00d": "Archived threads",
Expand Down
Loading