diff --git a/app-catalog/catalog.json b/app-catalog/catalog.json index 30b8f302..3c05bb26 100644 --- a/app-catalog/catalog.json +++ b/app-catalog/catalog.json @@ -26,7 +26,7 @@ "headline": "Your node. Your source.", "description": "Install GitWorkshop to browse Archipelago's code from your own node, clone it with ngit, and contribute issues, patches, and reviews over Nostr.", "tag": "NGIT // NOSTR // NO SILO", - "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/archy", + "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/relay.ngit.dev/archy", "launchLabel": "Open GitWorkshop", "installLabel": "Install GitWorkshop", "detailsLabel": "How contribution works →" diff --git a/neode-ui/public/catalog.json b/neode-ui/public/catalog.json index 30b8f302..3c05bb26 100644 --- a/neode-ui/public/catalog.json +++ b/neode-ui/public/catalog.json @@ -26,7 +26,7 @@ "headline": "Your node. Your source.", "description": "Install GitWorkshop to browse Archipelago's code from your own node, clone it with ngit, and contribute issues, patches, and reviews over Nostr.", "tag": "NGIT // NOSTR // NO SILO", - "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/archy", + "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/relay.ngit.dev/archy", "launchLabel": "Open GitWorkshop", "installLabel": "Install GitWorkshop", "detailsLabel": "How contribution works →" diff --git a/neode-ui/src/views/appSession/__tests__/appSessionConfig.test.ts b/neode-ui/src/views/appSession/__tests__/appSessionConfig.test.ts index a6c0ce19..dc92f3ef 100644 --- a/neode-ui/src/views/appSession/__tests__/appSessionConfig.test.ts +++ b/neode-ui/src/views/appSession/__tests__/appSessionConfig.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, beforeEach } from 'vitest' -import { HOST_FRAME_APPS, NEW_TAB_APPS, directAppUrl, resolveAppUrl } from '../appSessionConfig' +import { DEFAULT_GITWORKSHOP_REPO_PATH, HOST_FRAME_APPS, NEW_TAB_APPS, directAppUrl, resolveAppUrl } from '../appSessionConfig' import { GENERATED_HOST_FRAME_APPS, GENERATED_NEW_TAB_APPS } from '../generatedAppSessionConfig' import { __setSignedCatalogForTests } from '../../discover/curatedApps' @@ -159,9 +159,9 @@ describe('appSessionConfig', () => { // Source is intentionally absent from SIGNED until owner UAT passes. It // must follow the already-working dashboard ingress instead of assuming // that the same address also exposes a dedicated high port. - expect(resolveAppUrl('archipelago-source')).toBe('/app/archipelago-source/') + expect(resolveAppUrl('archipelago-source')).toBe(`/app/archipelago-source${DEFAULT_GITWORKSHOP_REPO_PATH}`) expect(resolveAppUrl('archipelago-source', undefined, 'http://localhost:8337')) - .toBe('/app/archipelago-source/') + .toBe(`/app/archipelago-source${DEFAULT_GITWORKSHOP_REPO_PATH}`) expect(resolveAppUrl('archipelago-source', '/search')) .toBe('/app/archipelago-source/search') }) diff --git a/neode-ui/src/views/appSession/appSessionConfig.ts b/neode-ui/src/views/appSession/appSessionConfig.ts index 606e3a9b..6929150a 100644 --- a/neode-ui/src/views/appSession/appSessionConfig.ts +++ b/neode-ui/src/views/appSession/appSessionConfig.ts @@ -61,6 +61,10 @@ export const PROXY_APPS: Record = { 'uptime-kuma': '/app/uptime-kuma/', } +/** The repository shown when GitWorkshop is opened from the app launcher. */ +export const DEFAULT_GITWORKSHOP_REPO_PATH = + '/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/relay.ngit.dev/archy' + /** App launches use direct ports. Do not route through /app/... path proxies. */ export const HTTPS_PROXY_PATHS: Record = { } @@ -137,8 +141,8 @@ export function resolveAppUrl(id: string, routeQueryPath?: string, runtimeUrl?: // high port is reachable through the same address. if (id === 'archipelago-source') { const base = PROXY_APPS['archipelago-source']! - if (!routeQueryPath) return base - return base.replace(/\/+$/, '') + (routeQueryPath.startsWith('/') ? routeQueryPath : `/${routeQueryPath}`) + const path = routeQueryPath || DEFAULT_GITWORKSHOP_REPO_PATH + return base.replace(/\/+$/, '') + (path.startsWith('/') ? path : `/${path}`) } // Bitcoin UI is a host-network companion on :8334. Do not launch it via diff --git a/releases/app-catalog.json b/releases/app-catalog.json index a8029499..07d39768 100644 --- a/releases/app-catalog.json +++ b/releases/app-catalog.json @@ -5482,7 +5482,7 @@ "headline": "Your node. Your source.", "description": "Install GitWorkshop to browse Archipelago's code from your own node, clone it with ngit, and contribute issues, patches, and reviews over Nostr.", "tag": "NGIT // NOSTR // NO SILO", - "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/archy", + "path": "/npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg/relay.ngit.dev/archy", "launchLabel": "Open GitWorkshop", "installLabel": "Install GitWorkshop", "detailsLabel": "How contribution works \u2192"