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 @@ -45,7 +45,14 @@ export function ToolSummaryTranslationSettingsScreen() {
// failed state through the refetch leaves the block in place and lets the
// Retry button show the busy state until the request settles. Same contract
// as `use-current-user-id`.
const catalogueError = isError || (isLoading && isFetched);
//
// Only a catalogue with nothing to fall back on is an error: a failed
// background refetch (remount after `staleTime`, or reconnect) still holds
// the populated cache, so the stored model and the loaded catalogue keep
// working. Blanking the row to `—` and disabling the picker there would drop
// a working selection, which the voice-input sibling never does (it treats a
// failed refetch as `error` only while `models` is empty).
const catalogueError = (isError || (isLoading && isFetched)) && models.length === 0;

// Only a live catalogue can open the picker; while off, loading, failed, or
// empty there is nothing to pick (retry lives in the state below).
Expand Down
20 changes: 18 additions & 2 deletions apps/mobile/src/components/trusted-hosts-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'expo-router';
import { useTranslation } from 'react-i18next';
import { Pressable, View } from 'react-native';
import { Alert, Pressable, View } from 'react-native';

import { EmptyState } from '@/components/empty-state';
import { ScreenHeader } from '@/components/screen-header';
Expand All @@ -18,6 +18,22 @@ export function TrustedHostsScreen() {
const colors = useThemeColors();
const { trustedHosts, hasLoaded } = useTrustedHosts();

// Revoking is destructive and one tap away on a single row, so it confirms
// first, the way the passkey and device-session removal rows do
// (apps/mobile/AGENTS.md).
const confirmRevoke = (host: string) => {
Alert.alert(t('trustedHosts.revoke', { host }), t('trustedHosts.revokeMessage'), [
{ text: t('common.cancel'), style: 'cancel' },
{
text: t('organization.members.revokeConfirm'),
style: 'destructive',
onPress: () => {
revokeHost(host);
},
},
]);
};

return (
<View className="flex-1 bg-background">
<ScreenHeader title={t('trustedHosts.title')} />
Expand Down Expand Up @@ -67,7 +83,7 @@ export function TrustedHostsScreen() {
</Text>
<Pressable
onPress={() => {
revokeHost(host);
confirmRevoke(host);
}}
hitSlop={8}
accessibilityRole="button"
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/af.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/am.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/az.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/be.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/bg.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/bn.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/bs.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ca.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ckb.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/cs.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/cy.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/da.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/de.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/el.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2724,6 +2724,7 @@
"emptyTitle": "No trusted hosts",
"emptyDescription": "When you trust a link's host, it opens without asking again.",
"revoke": "Revoke {{host}}",
"revokeMessage": "Links to this host will ask for confirmation again.",
Comment thread
iscekic marked this conversation as resolved.
"backToPreferences": "Back to preferences"
},
"forceUpdate": {
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/es.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/et.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/eu.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/fa.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/fi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/fil.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/fr.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ga.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/gl.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/gu.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ha.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/he.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/hi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/hr.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ht.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/hu.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/hy.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/id.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ig.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/is.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/it.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/mobile/src/i18n/locales/ja.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading