From 26cb34296966342a4ab786e7be79411747f9cc95 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Fri, 6 Jun 2025 14:17:30 +0530 Subject: [PATCH 01/15] fix(desktop): arrow inserting escape sequences (#5108) The unstable flag was causing arrow keys to display ANSI escape sequences as literal text instead of performing cursor navigation. For example the arrow keys in URL input fields display escape sequences (`^[[C, ^[[D, ^[[A, ^[[B`) as literal text. Closes HFE-880 Closes #5102 The unstable feature flag was originally added to support experimental features that were required for functionality that is no longer needed in the current implementation. See: - [Tauri Issue #9257] - Keyboard shortcuts broken with unstable flag - [Tauri Issue #10194] - Arrow keys printing invalid characters - [Wry Issue #1177] - Related macOS input handling issues --- packages/hoppscotch-common/package.json | 2 +- .../hoppscotch-common/src/components.d.ts | 2 -- packages/hoppscotch-desktop/package.json | 2 +- .../tauri-plugin-appload/Cargo.toml | 2 +- .../hoppscotch-desktop/src-tauri/Cargo.lock | 4 ++-- .../hoppscotch-desktop/src-tauri/Cargo.toml | 4 ++-- packages/hoppscotch-kernel/package.json | 2 +- pnpm-lock.yaml | 24 +++++++++---------- 8 files changed, 20 insertions(+), 22 deletions(-) diff --git a/packages/hoppscotch-common/package.json b/packages/hoppscotch-common/package.json index 4683368f..8ec5b444 100644 --- a/packages/hoppscotch-common/package.json +++ b/packages/hoppscotch-common/package.json @@ -39,7 +39,7 @@ "@hoppscotch/httpsnippet": "3.0.7", "@hoppscotch/js-sandbox": "workspace:^", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#5939b8f", "@hoppscotch/ui": "0.2.2", "@hoppscotch/vue-toasted": "0.1.0", "@lezer/highlight": "1.2.0", diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts index bbd18fe7..be3cfcb7 100644 --- a/packages/hoppscotch-common/src/components.d.ts +++ b/packages/hoppscotch-common/src/components.d.ts @@ -124,7 +124,6 @@ declare module 'vue' { HistoryGraphqlCard: typeof import('./components/history/graphql/Card.vue')['default'] HistoryPersonal: typeof import('./components/history/Personal.vue')['default'] HistoryRestCard: typeof import('./components/history/rest/Card.vue')['default'] - HoppAccordion: typeof import('@hoppscotch/ui')['HoppAccordion'] HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary'] HoppButtonSecondary: typeof import('@hoppscotch/ui')['HoppButtonSecondary'] HoppSmartAnchor: typeof import('@hoppscotch/ui')['HoppSmartAnchor'] @@ -146,7 +145,6 @@ declare module 'vue' { HoppSmartSpinner: typeof import('@hoppscotch/ui')['HoppSmartSpinner'] HoppSmartTab: typeof import('@hoppscotch/ui')['HoppSmartTab'] HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs'] - HoppSmartTextarea: typeof import('@hoppscotch/ui')['HoppSmartTextarea'] HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle'] HoppSmartTree: typeof import('@hoppscotch/ui')['HoppSmartTree'] HoppSmartWindow: typeof import('@hoppscotch/ui')['HoppSmartWindow'] diff --git a/packages/hoppscotch-desktop/package.json b/packages/hoppscotch-desktop/package.json index de83b8a6..62435724 100644 --- a/packages/hoppscotch-desktop/package.json +++ b/packages/hoppscotch-desktop/package.json @@ -16,7 +16,7 @@ "@fontsource-variable/material-symbols-rounded": "5.1.3", "@fontsource-variable/roboto-mono": "5.1.0", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#5939b8f", "@hoppscotch/ui": "0.2.1", "@tauri-apps/api": "2.1.1", "@tauri-apps/plugin-process": "2.2.0", diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml index 7d07d383..c4b38a8f 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml @@ -9,7 +9,7 @@ exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"] links = "tauri-plugin-appload" [dependencies] -tauri = { version = "2.0.6", features = ["unstable"] } +tauri = { version = "2.0.6" } serde = "1.0" serde_json = { version = "1", features = [] } thiserror = { version = "2.0.3", features = [] } diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.lock b/packages/hoppscotch-desktop/src-tauri/Cargo.lock index 5291a5fb..7c2fd199 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.lock +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.lock @@ -5038,7 +5038,7 @@ dependencies = [ [[package]] name = "tauri-plugin-appload" version = "0.1.0" -source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload#87e78a8d35c02e53366d3b56286d0350f772efb7" +source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=5939b8f#5939b8ff3fdffeebd72749f32b3a06cd5a0c37fc" dependencies = [ "base64 0.22.1", "blake3", @@ -5148,7 +5148,7 @@ dependencies = [ [[package]] name = "tauri-plugin-relay" version = "0.1.0" -source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay#3273b9b075f1f6fa9171799a961c435454c0c9a2" +source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay?rev=3273b9b#3273b9b075f1f6fa9171799a961c435454c0c9a2" dependencies = [ "relay", "serde", diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.toml b/packages/hoppscotch-desktop/src-tauri/Cargo.toml index aa32aa42..396d5144 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.toml +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.toml @@ -29,8 +29,8 @@ tauri-plugin-store = "2.2.0" tauri-plugin-dialog = "2.2.0" tauri-plugin-fs = "2.2.0" tauri-plugin-deep-link = "2.2.0" -tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload" } -tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay" } +tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "5939b8f" } +tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay", rev = "3273b9b" } axum = "0.8.1" tower-http = { version = "0.6.2", features = ["cors"] } portpicker = "0.1.1" diff --git a/packages/hoppscotch-kernel/package.json b/packages/hoppscotch-kernel/package.json index c011b365..28fd4526 100644 --- a/packages/hoppscotch-kernel/package.json +++ b/packages/hoppscotch-kernel/package.json @@ -57,6 +57,6 @@ "@tauri-apps/plugin-dialog": "2.0.1", "@tauri-apps/plugin-fs": "2.0.2", "@tauri-apps/plugin-store": "2.2.0", - "@hoppscotch/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay" + "@hoppscotch/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay#3273b9b" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 365ddd4a..20c869a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -525,8 +525,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/87e78a8d35c02e53366d3b56286d0350f772efb7' + specifier: github:CuriousCorrelation/tauri-plugin-appload#5939b8f + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/5939b8f' '@hoppscotch/ui': specifier: 0.2.2 version: 0.2.2(eslint@8.57.0)(terser@5.39.2)(typescript@5.8.3)(vite@5.4.9(@types/node@22.15.19)(sass@1.79.5)(terser@5.39.2))(vue@3.5.12(typescript@5.8.3)) @@ -995,8 +995,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/87e78a8d35c02e53366d3b56286d0350f772efb7' + specifier: github:CuriousCorrelation/tauri-plugin-appload#5939b8f + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/5939b8f' '@hoppscotch/ui': specifier: 0.2.1 version: 0.2.1(eslint@9.27.0(jiti@2.4.2))(terser@5.39.2)(typescript@5.7.2)(vite@5.4.11(@types/node@22.15.19)(sass@1.80.3)(terser@5.39.2))(vue@3.5.12(typescript@5.7.2)) @@ -1201,8 +1201,8 @@ importers: packages/hoppscotch-kernel: dependencies: '@hoppscotch/plugin-relay': - specifier: github:CuriousCorrelation/tauri-plugin-relay - version: '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b075f1f6fa9171799a961c435454c0c9a2' + specifier: github:CuriousCorrelation/tauri-plugin-relay#3273b9b + version: '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b' '@tauri-apps/api': specifier: 2.1.1 version: 2.1.1 @@ -1835,12 +1835,12 @@ packages: graphql: optional: true - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/87e78a8d35c02e53366d3b56286d0350f772efb7': - resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/87e78a8d35c02e53366d3b56286d0350f772efb7} + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/5939b8f': + resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/5939b8f} version: 0.1.0 - '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b075f1f6fa9171799a961c435454c0c9a2': - resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b075f1f6fa9171799a961c435454c0c9a2} + '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b': + resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b} version: 0.1.0 '@alloc/quick-lru@5.2.0': @@ -14550,11 +14550,11 @@ snapshots: optionalDependencies: graphql: 16.11.0 - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/87e78a8d35c02e53366d3b56286d0350f772efb7': + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/5939b8f': dependencies: '@tauri-apps/api': 2.1.1 - '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b075f1f6fa9171799a961c435454c0c9a2': + '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/3273b9b': dependencies: '@tauri-apps/api': 2.1.1 From 5e33595c12dd0c26a97e56d65242b0abc9fbe75a Mon Sep 17 00:00:00 2001 From: James George <25279263+jamesgeorge007@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:38:11 +0530 Subject: [PATCH 02/15] feat(common): in app console UI enhancements (#5120) Co-authored-by: nivedin --- .../src/components/console/Item.vue | 6 +- .../src/components/console/Value.vue | 83 +++++++++++-------- 2 files changed, 51 insertions(+), 38 deletions(-) diff --git a/packages/hoppscotch-common/src/components/console/Item.vue b/packages/hoppscotch-common/src/components/console/Item.vue index 68e803d7..88c97878 100644 --- a/packages/hoppscotch-common/src/components/console/Item.vue +++ b/packages/hoppscotch-common/src/components/console/Item.vue @@ -3,10 +3,10 @@ class="flex items-start px-4 py-2 text-tiny text-secondaryDark rounded-md" :class="color" > - + -
-
{{ formattedTimestamp }}
+
+
{{ formattedTimestamp }}
-
+
{{ prettyStringified }}
+      v-else-if="parsedJSON"
+      class="overflow-auto max-h-96 p-4 bg-primary text-secondaryDark border !border-dividerLight rounded"
+      >{{ formattedJSONString }}
     
-
{{ formattedPrimitive }}
     
@@ -25,52 +27,51 @@ import { computed } from "vue" import VueJsonPretty from "vue-json-pretty" import "vue-json-pretty/lib/styles.css" +import { useColorMode } from "~/composables/theming" const props = defineProps<{ value: unknown }>() -const snippetColors = ` - border rounded-md bg-gray-50 text-black !border-gray-200 - dark:bg-gray-900 dark:text-gray-100 dark:!border-gray-700 -` +const theme = useColorMode() -const isObjectOrArray = computed(() => { - return typeof props.value === "object" && props.value !== null -}) +const isObjectOrArray = computed( + () => typeof props.value === "object" && props.value !== null +) + +const parsedJSON = computed(() => { + if (typeof props.value !== "string") { + return null + } -const isStringifiedObject = computed(() => { - if (typeof props.value !== "string") return false try { const parsed = JSON.parse(props.value) - return typeof parsed === "object" && parsed !== null + return typeof parsed === "object" && parsed !== null ? parsed : null } catch { - return false + return null } }) -const parsedValue = computed(() => { - if (isObjectOrArray.value) return props.value +const parsedValue = computed(() => + isObjectOrArray.value ? props.value : parsedJSON.value +) - if (isStringifiedObject.value && typeof props.value === "string") { - try { - return JSON.parse(props.value) - } catch { - return null - } +const formattedJSONString = computed(() => { + if (typeof props.value !== "string") { + return "" } - return null -}) + if (parsedJSON.value) { + // Return the original string if it looks already formatted + const hasNewlines = props.value.includes("\n") + const hasIndentation = props.value.match(/^\s{2,}["[{]/m) !== null -const prettyStringified = computed(() => { - if (typeof props.value === "string") { - try { - const parsed = JSON.parse(props.value) - return JSON.stringify(parsed, null, 2) - } catch { + if (hasNewlines || hasIndentation) { return props.value } + + return JSON.stringify(parsedJSON.value, null, 2) } - return "" + + return props.value }) const formattedPrimitive = computed(() => { @@ -98,4 +99,16 @@ const formattedPrimitive = computed(() => { return "[Unserializable]" } }) + +const isDarkTheme = computed(() => ["dark", "black"].includes(theme.value)) + +const treeViewTheme = computed(() => (isDarkTheme.value ? "dark" : "light")) + + From 011c8090aa58e3ea505cb03e87c2985404f57cb4 Mon Sep 17 00:00:00 2001 From: Radrogyl Date: Tue, 10 Jun 2025 09:26:20 +0200 Subject: [PATCH 03/15] fix: use `HOPP_AIO_ALTERNATE_PORT` in healthcheck (#5136) --- healthcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcheck.sh b/healthcheck.sh index 9b29906b..9b3939f1 100644 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -9,7 +9,7 @@ curlCheck() { } if [ "$ENABLE_SUBPATH_BASED_ACCESS" = "true" ]; then - curlCheck "http://localhost:80/backend/ping" || exit 1 + curlCheck "http://localhost:${HOPP_AIO_ALTERNATE_PORT:-80}/backend/ping" || exit 1 else curlCheck "http://localhost:3000" || exit 1 curlCheck "http://localhost:3100" || exit 1 From b63c70762405d543e740c27a1039d4470f8ad105 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Tue, 10 Jun 2025 13:21:54 +0530 Subject: [PATCH 04/15] fix(desktop): align connected instance with launch (#5132) --- .../src/components/app/Header.vue | 22 ++++++-- .../src/components/instance/Switcher.vue | 25 ++++++++- .../hoppscotch-common/src/platform/index.ts | 2 + .../src/platform/instance.ts | 10 ++++ .../src/services/instance-switcher.service.ts | 55 ++++++++++++------- .../hoppscotch-desktop/src/views/Home.vue | 34 ++++++++++-- packages/hoppscotch-selfhost-web/src/main.ts | 10 ++++ 7 files changed, 126 insertions(+), 32 deletions(-) create mode 100644 packages/hoppscotch-common/src/platform/instance.ts diff --git a/packages/hoppscotch-common/src/components/app/Header.vue b/packages/hoppscotch-common/src/components/app/Header.vue index 6d72a9a3..7c766829 100644 --- a/packages/hoppscotch-common/src/components/app/Header.vue +++ b/packages/hoppscotch-common/src/components/app/Header.vue @@ -22,11 +22,23 @@ :on-shown="() => instanceSwitcherRef.focus()" >
- - {{ instanceDisplayName }} - +
+ + {{ instanceDisplayName }} + + + {{ platform.instance.displayConfig.description }} + +