From fc8ddb753a622ec89ae6e585b3947f912b0be573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=9Al=C4=99zak?= Date: Mon, 26 Oct 2026 14:01:04 +0100 Subject: [PATCH 1/2] fix missing tile when connected --- new-ui/biome.json | 2 +- new-ui/package.json | 8 +- new-ui/pnpm-lock.yaml | 136 ++++++++++-------- new-ui/pnpm-workspace.yaml | 4 + .../LocationCardConnectionTiles.tsx | 47 +++--- 5 files changed, 106 insertions(+), 91 deletions(-) diff --git a/new-ui/biome.json b/new-ui/biome.json index a855add3d..559e6a524 100644 --- a/new-ui/biome.json +++ b/new-ui/biome.json @@ -1,6 +1,6 @@ { "root": true, - "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json", + "$schema": "https://biomejs.dev/schemas/2.6.3/schema.json", "vcs": { "enabled": false, "clientKind": "git", diff --git a/new-ui/package.json b/new-ui/package.json index 786125e35..bb98f323b 100644 --- a/new-ui/package.json +++ b/new-ui/package.json @@ -14,13 +14,13 @@ "preview": "vite preview" }, "dependencies": { - "@biomejs/biome": "2.5.15", + "@biomejs/biome": "2.6.3", "@floating-ui/react": "^0.27.20", "@fluentui/keyboard-keys": "^9.0.9", "@stablelib/base64": "^2.0.1", "@stablelib/x25519": "^2.0.1", "@tanstack/react-form": "^1.33.5", - "@tanstack/react-query": "^5.104.5", + "@tanstack/react-query": "^5.105.0", "@tanstack/react-router": "^1.170.46", "@tauri-apps/api": "^2.12.4", "@tauri-apps/plugin-clipboard-manager": "^2.5.0", @@ -39,7 +39,7 @@ "p-timeout": "^7.0.2", "prettier": "^3.9.10", "qrcode.react": "^4.2.0", - "radashi": "^12.9.6", + "radashi": "^12.9.7", "react": "^19.3.1", "react-chartjs-2": "^5.3.1", "react-dom": "^19.3.1", @@ -67,7 +67,7 @@ "jsdom": "^30.1.3", "stylelint": "^17.16.0", "stylelint-config-standard-scss": "^17.0.0", - "stylelint-scss": "^7.3.0", + "stylelint-scss": "^7.4.0", "typescript": "~6.0.3", "vite": "^8.3.5", "vitest": "^5.0.5" diff --git a/new-ui/pnpm-lock.yaml b/new-ui/pnpm-lock.yaml index 82335ae7d..efcd4beae 100644 --- a/new-ui/pnpm-lock.yaml +++ b/new-ui/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@biomejs/biome': - specifier: 2.5.15 - version: 2.5.15 + specifier: 2.6.3 + version: 2.6.3 '@floating-ui/react': specifier: ^0.27.20 version: 0.27.20(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -27,8 +27,8 @@ importers: specifier: ^1.33.5 version: 1.33.5(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@tanstack/react-query': - specifier: ^5.104.5 - version: 5.104.5(@types/react@19.3.0)(react@19.3.1) + specifier: ^5.105.0 + version: 5.105.0(@types/react@19.3.0)(react@19.3.1) '@tanstack/react-router': specifier: ^1.170.46 version: 1.170.46(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -84,8 +84,8 @@ importers: specifier: ^4.2.0 version: 4.2.0(react@19.3.1) radashi: - specifier: ^12.9.6 - version: 12.9.6 + specifier: ^12.9.7 + version: 12.9.7 react: specifier: ^19.3.1 version: 19.3.1 @@ -163,8 +163,8 @@ importers: specifier: ^17.0.0 version: 17.0.0(postcss@8.5.31)(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) stylelint-scss: - specifier: ^7.3.0 - version: 7.3.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) + specifier: ^7.4.0 + version: 7.4.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) typescript: specifier: ~6.0.3 version: 6.0.3 @@ -256,59 +256,71 @@ packages: resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} engines: {node: '>=6.9.0'} - '@biomejs/biome@2.5.15': - resolution: {integrity: sha512-WZTW4slm/pdkh92K6t/3aEN++44JD1PQ7squ7RCMLI1flHGl43DVOIGXvCjHiZgBMO1V4uYxoFNtqrIA4qGuIQ==} + '@biomejs/biome@2.6.3': + resolution: {integrity: sha512-va/0xPku7wnfzv+D8Zpdm5uKiGJWiV8neqoEPnRjvNQQwhl4tVXS4fETs4H0CCB2rGeqJ4cu9y4iOZOnOYKAUA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.5.15': - resolution: {integrity: sha512-BZVzFhJ/mUvTLMYbc9x6el0o2Uv5zP7bACYyhFb6fSc1giroXm7PL0a5KqMJ9F+/BnkYRjagD/ROSDVOZ6eapg==} + '@biomejs/cli-android-arm64@2.6.3': + resolution: {integrity: sha512-5JD7QQDEHxdeEb4sftEHG+lsuUyu8Cob/hVLqRELbgGlFl68Rldv/PPi2k4dRjERZ/EItJ3O6Xmv8lqsEtUBiw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [android] + + '@biomejs/cli-android-x64@2.6.3': + resolution: {integrity: sha512-70WOGKCgpT+Uqg6LFdTLqefV54/DypdZg+LnBQDO6AWvkgXO+9xhVClajQyDsIHYjnXMtI1pRO5sP+zMXlS/bw==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [android] + + '@biomejs/cli-darwin-arm64@2.6.3': + resolution: {integrity: sha512-ezf+XEKeyJ2yYlBhrzyEEHLvfRYrhtNKc6maLzR/WcAcBccb4RVDeFxsymjBve2LO0bpIMRUAiS90D4bUBRT0A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.5.15': - resolution: {integrity: sha512-V5Kw63V+fVGNFhFrizDxMbGXAzZCh8kYzJpy3GI6gTapWDg7bZK9oYC9CbVgQSEdTnupz0U5Efz8Ev+5vdBBXw==} + '@biomejs/cli-darwin-x64@2.6.3': + resolution: {integrity: sha512-Lg2tFdg4elJo+7i707PpLMs6N1hATVt4kqDo6MD/q/VnPs8rsKReKXsz1TA5GNdfRVAQNJ5GRiyK2EwNptK+MA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.5.15': - resolution: {integrity: sha512-tGzZUTcJCV7tj5Adh/Gn6nR4MycqA3iohq2LEcrarAgRBkU0h0OKd2UzCRkOsOYOuUGaUJb4YmqRqyy2feGGSw==} + '@biomejs/cli-linux-arm64-musl@2.6.3': + resolution: {integrity: sha512-dYU70A89OFHzakQPE9VOPbE60JNcQt4mtxvUGQl+EgTkGtqCFxLD2RUn1SbiMu8Mu5xFscS1bfYDpoasaUrqNA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [musl] - '@biomejs/cli-linux-arm64@2.5.15': - resolution: {integrity: sha512-XaG7P7eeSLYETD3K9grfB0mQmpLQZjygdbsxekWBJAg4am79fGAtRpfRyNnTvXB2fZFNnJZG3nXm7HBat0+VUw==} + '@biomejs/cli-linux-arm64@2.6.3': + resolution: {integrity: sha512-8Stcvq98n1gs9VyLKuaWrnsd8kbXE2nKDAHtuLHGSYdGyNWN5JIIm5a28xdnmgdKzKHmiDgYyATetkEv7+zGow==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [glibc] - '@biomejs/cli-linux-x64-musl@2.5.15': - resolution: {integrity: sha512-IlxUcyxilVGPsE008x13pWdkTbU3nQpP2i9b5UrbOYj6goBkKsRX1XB7yJLcV+O1H9LBchIIm4adOaVLZBX0ZQ==} + '@biomejs/cli-linux-x64-musl@2.6.3': + resolution: {integrity: sha512-j6eFjUcWSphmgVTbrobEMA0wdbfNHKrGi8hRsFkc17jeS1n7nHwFACxp6jWqe9sxQqyFAeyOgt2/1bOGVcbATA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [musl] - '@biomejs/cli-linux-x64@2.5.15': - resolution: {integrity: sha512-xE4iEW/3LqlYj9GFgGrFsFSH51dEEpUbYWBfeOv0q87WkUDxK2o/HhreSb7qMJqck70RVM6Lg96hgedcAYcOkA==} + '@biomejs/cli-linux-x64@2.6.3': + resolution: {integrity: sha512-CShmx0bO6BngywT3minv8K1xsQX1ig1vsBqYTLnmDY3mBiDYHlaLRIsdHoM1pEU9dV3BN5a0uiH0IGDtYh9TWA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [glibc] - '@biomejs/cli-win32-arm64@2.5.15': - resolution: {integrity: sha512-2kPKzhNlm8C+Ru3GcO0Me2ODkCBLrVOUNuyi84RJyWDVKAA4+Kjj3jMjL938lF6BRfvltC4vB2nPY9SvN51Ovg==} + '@biomejs/cli-win32-arm64@2.6.3': + resolution: {integrity: sha512-00SthDxBPwNiT7IL/mOneif6fiEU1PXK875zhr+InpeZjovY1mF5tCuDhXo1Hh0GYyiKHKzLbItzn58SAyLhJQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.5.15': - resolution: {integrity: sha512-yAzh4UqEImV6Hcy0zjUqNfJAsUhoD64FBQCdTG8Md/Z2wQeVP/ZmJ3XRYAs1g8J9fjTFyl2fCtc5FB5til47+g==} + '@biomejs/cli-win32-x64@2.6.3': + resolution: {integrity: sha512-GhtOPphBWlnCepqpNk/w5eGN5oGRCzL20EbAkL1XCIpyboeVC9R642noyT43l8LSenGS4qz9IL8sKPfwY37V/Q==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -852,8 +864,8 @@ packages: resolution: {integrity: sha512-y/xtNPNt/YeyoVxE/JCx+T7yjEzpezmbb+toK8DDD1P4m7Kzs5YR956+7OKexG3f8aXgC3rLZl7b1V+yNUSy5w==} engines: {node: '>=18'} - '@tanstack/query-core@5.104.5': - resolution: {integrity: sha512-Q94gI8Opd+CbdVNOdj8ZCyV8WqLYitrDq1t96Xc8WZT6lY0r5iRnJLXYDxMex7EEf2v+mXvn4FcjaBKSxXZQ9A==} + '@tanstack/query-core@5.105.0': + resolution: {integrity: sha512-7p56vRmT/z4UJ6sctGIdl5WRUQyUv53IUpUwEKi2g97zMbO7zh8ZsCLffGAvCPBR4xD72e3VXsDyLwXHhoNTMQ==} '@tanstack/react-form@1.33.5': resolution: {integrity: sha512-LlRB28qJwO/QCGaHvWnbdh4haBgTFiZVmzA2uzxSBS3YA7/IqrQ6HOBK70CkFQ+DbflZ7NawsmSln13h5iIdTA==} @@ -864,8 +876,8 @@ packages: '@tanstack/react-start': optional: true - '@tanstack/react-query@5.104.5': - resolution: {integrity: sha512-RORgFe052U+93weaNuqg7qHq7vNVNzXN/VrXqD4bbAuQCWUqOl2lV5Ui9flWk5CVvMyL/Bh27QWhzwH0aaOx9g==} + '@tanstack/react-query@5.105.0': + resolution: {integrity: sha512-y+hMuDERvgg6ay1da0V1a6ZC0ZONt7dELxSFkqRZuwm7p1TTZs0MoXrPlBRflIpRoYjvzQVYxycnLImpFLhWrw==} peerDependencies: '@types/react': ^18 || ^19 react: ^18 || ^19 @@ -1967,8 +1979,8 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - radashi@12.9.6: - resolution: {integrity: sha512-0xf53IXAtaJEQ9VSy7npEDIRZKyKBNtNFRYycdtejzHXb0/pbKXj/nFVeJbv1Sbzzzj7aaR+Ttu9c5KTrSmGzw==} + radashi@12.9.7: + resolution: {integrity: sha512-e+4Z+FaYhshG2N3k4S1P1uN+UgFNA1xvaVNkgR5tR1WS3fnds5aahoF7fGg0Zw0tOrastVqoQ9K0kC5clmCmGw==} engines: {node: '>=16.0.0'} react-chartjs-2@5.3.1: @@ -2154,8 +2166,8 @@ packages: peerDependencies: stylelint: ^17.0.0 - stylelint-scss@7.3.0: - resolution: {integrity: sha512-FBz075AUFoEJ1WQKsgsRr6EJKcjy7jxQjV8xsAqbPcnhNiXnJ7C489vqUyDZccBy1GorewlshERkaMuCyOKXaw==} + stylelint-scss@7.4.0: + resolution: {integrity: sha512-OvN+AestcvtB/IFvde1kpFLq2mpIsPaeB8E+Cjlxu7qjf0ja7NCoTrDW97tuNeXFlYGUdwqGq5cXaByLpNwuxA==} engines: {node: '>=20.19.0'} peerDependencies: stylelint: ^16.8.2 || ^17.0.0 @@ -2600,39 +2612,47 @@ snapshots: '@babel/helper-string-parser': 7.29.11 '@babel/helper-validator-identifier': 7.29.7 - '@biomejs/biome@2.5.15': + '@biomejs/biome@2.6.3': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.5.15 - '@biomejs/cli-darwin-x64': 2.5.15 - '@biomejs/cli-linux-arm64': 2.5.15 - '@biomejs/cli-linux-arm64-musl': 2.5.15 - '@biomejs/cli-linux-x64': 2.5.15 - '@biomejs/cli-linux-x64-musl': 2.5.15 - '@biomejs/cli-win32-arm64': 2.5.15 - '@biomejs/cli-win32-x64': 2.5.15 - - '@biomejs/cli-darwin-arm64@2.5.15': + '@biomejs/cli-android-arm64': 2.6.3 + '@biomejs/cli-android-x64': 2.6.3 + '@biomejs/cli-darwin-arm64': 2.6.3 + '@biomejs/cli-darwin-x64': 2.6.3 + '@biomejs/cli-linux-arm64': 2.6.3 + '@biomejs/cli-linux-arm64-musl': 2.6.3 + '@biomejs/cli-linux-x64': 2.6.3 + '@biomejs/cli-linux-x64-musl': 2.6.3 + '@biomejs/cli-win32-arm64': 2.6.3 + '@biomejs/cli-win32-x64': 2.6.3 + + '@biomejs/cli-android-arm64@2.6.3': + optional: true + + '@biomejs/cli-android-x64@2.6.3': + optional: true + + '@biomejs/cli-darwin-arm64@2.6.3': optional: true - '@biomejs/cli-darwin-x64@2.5.15': + '@biomejs/cli-darwin-x64@2.6.3': optional: true - '@biomejs/cli-linux-arm64-musl@2.5.15': + '@biomejs/cli-linux-arm64-musl@2.6.3': optional: true - '@biomejs/cli-linux-arm64@2.5.15': + '@biomejs/cli-linux-arm64@2.6.3': optional: true - '@biomejs/cli-linux-x64-musl@2.5.15': + '@biomejs/cli-linux-x64-musl@2.6.3': optional: true - '@biomejs/cli-linux-x64@2.5.15': + '@biomejs/cli-linux-x64@2.6.3': optional: true - '@biomejs/cli-win32-arm64@2.5.15': + '@biomejs/cli-win32-arm64@2.6.3': optional: true - '@biomejs/cli-win32-x64@2.5.15': + '@biomejs/cli-win32-x64@2.6.3': optional: true '@bramus/specificity@2.4.3': @@ -3042,7 +3062,7 @@ snapshots: '@tanstack/pacer-lite@0.1.1': {} - '@tanstack/query-core@5.104.5': {} + '@tanstack/query-core@5.105.0': {} '@tanstack/react-form@1.33.5(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': dependencies: @@ -3052,9 +3072,9 @@ snapshots: transitivePeerDependencies: - react-dom - '@tanstack/react-query@5.104.5(@types/react@19.3.0)(react@19.3.1)': + '@tanstack/react-query@5.105.0(@types/react@19.3.0)(react@19.3.1)': dependencies: - '@tanstack/query-core': 5.104.5 + '@tanstack/query-core': 5.105.0 react: 19.3.1 optionalDependencies: '@types/react': 19.3.0 @@ -4332,7 +4352,7 @@ snapshots: queue-microtask@1.2.3: {} - radashi@12.9.6: {} + radashi@12.9.7: {} react-chartjs-2@5.3.1(chart.js@4.6.1)(react@19.3.1): dependencies: @@ -4529,7 +4549,7 @@ snapshots: postcss-scss: 4.0.9(postcss@8.5.31) stylelint: 17.16.0(supports-color@10.2.2)(typescript@6.0.3) stylelint-config-recommended: 18.0.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) - stylelint-scss: 7.3.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) + stylelint-scss: 7.4.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) optionalDependencies: postcss: 8.5.31 @@ -4550,7 +4570,7 @@ snapshots: stylelint: 17.16.0(supports-color@10.2.2)(typescript@6.0.3) stylelint-config-recommended: 18.0.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)) - stylelint-scss@7.3.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)): + stylelint-scss@7.4.0(stylelint@17.16.0(supports-color@10.2.2)(typescript@6.0.3)): dependencies: '@csstools/css-calc': 3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) diff --git a/new-ui/pnpm-workspace.yaml b/new-ui/pnpm-workspace.yaml index bf441ee6d..0534b365a 100644 --- a/new-ui/pnpm-workspace.yaml +++ b/new-ui/pnpm-workspace.yaml @@ -8,3 +8,7 @@ minimumReleaseAgeExclude: - vite@8.0.16 - fast-uri@3.1.4 || 3.1.5 - js-yaml@4.3.1 + - '@tanstack/query-core@5.105.0' + - '@tanstack/react-query@5.105.0' + - radashi@12.9.7 + - stylelint-scss@7.4.0 diff --git a/new-ui/src/shared/components/LocationCard/components/LocationCardConnectionTiles/LocationCardConnectionTiles.tsx b/new-ui/src/shared/components/LocationCard/components/LocationCardConnectionTiles/LocationCardConnectionTiles.tsx index dc3d577fe..bd43ca1f5 100644 --- a/new-ui/src/shared/components/LocationCard/components/LocationCardConnectionTiles/LocationCardConnectionTiles.tsx +++ b/new-ui/src/shared/components/LocationCard/components/LocationCardConnectionTiles/LocationCardConnectionTiles.tsx @@ -8,12 +8,7 @@ import { type LocationInfo, } from '../../../../rust-api/types'; import { isPresent } from '../../../../utils/isPresent'; -import { - mfaStepCount, - mfaStepsToText, - mfaToText, - shouldStartMfa, -} from '../../../../utils/mfa'; +import { mfaStepsOf, mfaStepsToText, mfaToText } from '../../../../utils/mfa'; import { BoxIcon } from '../../../BoxIcon/BoxIcon'; import { Icon, IconKind } from '../../../Icon'; @@ -30,21 +25,19 @@ export const LocationCardConnectionTiles = ({ location, instance, variant }: Pro location.route_all_traffic || instance?.client_traffic_policy === ClientTrafficPolicy.ForceAllTraffic; - const stepCount = mfaStepCount(location); - const isMultiStep = stepCount > 1; - const mfaLabel = useMemo(() => { - if (isMultiStep) return mfaStepsToText(stepCount); + const steps = mfaStepsOf(location); + if (steps.length === 0) return 'Not required'; + if (steps.length > 1) return mfaStepsToText(steps.length); + + const { methods } = steps[0]; + if (methods.length === 1) return mfaToText(methods[0].method, instance); + const key = `${location.connection_type.toLowerCase()}-${location.id}`; - const method = connectionMfaMethod[key]; - return isPresent(method) ? mfaToText(method) : null; - }, [ - connectionMfaMethod, - location.connection_type, - location.id, - stepCount, - isMultiStep, - ]); + const pickedMethod = connectionMfaMethod[key]; + if (isPresent(pickedMethod)) return mfaToText(pickedMethod, instance); + return mfaStepsToText(1); + }, [connectionMfaMethod, location, instance]); return (
@@ -57,15 +50,13 @@ export const LocationCardConnectionTiles = ({ location, instance, variant }: Pro {routeAllTraffic ? 'All traffic' : 'Predefined traffic'}

- {shouldStartMfa(location) && isPresent(mfaLabel) && ( -
- - - -

Active MFA

-

{mfaLabel}

-
- )} +
+ + + +

Active MFA

+

{mfaLabel}

+
); }; From 512bfe9c5a3baa9eddbc8d5a119dda5d37e92b4f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:06:24 +0000 Subject: [PATCH 2/2] chore(nix): update new-ui pnpm deps hash --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index d63dcbd3f..a7806283c 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -92,7 +92,7 @@ inherit version pnpm; src = ../new-ui; fetcherVersion = 4; - hash = "sha256-8rhntKFC5DltE1JXtHIXN79/ALY0akiniC/ZQKTKFK8="; + hash = "sha256-7y2sLaqP+6UERIJbtrWSTvfh+CSfHz/NURkvFrX9tmY="; }; # Pre-build the new UI frontend so Tauri can serve it as WebviewUrl::App("compact/") and "full/".