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
2 changes: 1 addition & 1 deletion apps/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DEFAULT_PORT = 3760;
const DEFAULT_GATEWAY_PORT = 31879;
const DEFAULT_GATEWAY_BASE_PATH = '/tracevane';
const DEFAULT_BIND_HOST = '127.0.0.1';
const TRACEVANE_VERSION_FALLBACK = '0.2.4';
const TRACEVANE_VERSION_FALLBACK = '0.2.6';

let cachedTracevaneVersion: string | null = null;

Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tracevane-api",
"version": "0.2.4",
"version": "0.2.6",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tracevane-web",
"version": "0.2.5",
"version": "0.2.6",
"private": true,
"type": "module",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/features/file-manager/FileManagerPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
useFilesSummaryQuery,
} from "@/lib/query/files";
import { toast } from "@/design/ui/sonner";
import { resolveApiUrl } from "@/lib/runtime";
import { LoadingState } from "@/shared/states/LoadingState";
import {
OperationHistoryPanel,
Expand Down Expand Up @@ -2523,7 +2524,7 @@ function downloadSelectedArchive(
const params = new URLSearchParams({ rootId, name: defaultArchiveName() });
for (const selectedPath of selectedPaths) params.append("path", selectedPath);
window.open(
`/api/files/download-archive?${params.toString()}`,
resolveApiUrl(`/api/files/download-archive?${params.toString()}`),
"_blank",
"noopener,noreferrer",
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
} from "@/design/ui/dialog";
import { Input } from "@/design/ui/input";
import { dryRunFileTransfer, dryRunUnarchiveFile, transferFiles } from "@/lib/api/files";
import { resolveApiUrl } from "@/lib/runtime";
import { toast } from "@/design/ui/sonner";
import type {
FilesTransferConflictPolicy,
Expand Down Expand Up @@ -219,7 +220,7 @@ export function FileActionsMenu({
`/api/files/download?rootId=${encodeURIComponent(rootId)}` +
`&path=${encodeURIComponent(target.path)}` +
`&download=1`;
window.open(url, "_blank", "noopener,noreferrer");
window.open(resolveApiUrl(url), "_blank", "noopener,noreferrer");
closeAll();
}, [target, rootId, closeAll]);

Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/shared/file-surface/FileSurfacePreviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from "react";

import { cn } from "@/design/lib/utils";
import { Button } from "@/design/ui/button";
import { resolveApiUrl } from "@/lib/runtime";
import type { FileEntrySummary, FilesReadPayload } from "../../../../../types/files";

export type FileSurfacePreviewKind = "image" | "video" | "audio" | "pdf" | "binary";
Expand Down Expand Up @@ -535,7 +536,7 @@ function PdfPreviewFrame({ src, title }: { src: string; title: string }) {
function buildFileDownloadUrl(rootId: string, path: string, attachment = false): string {
const search = new URLSearchParams({ rootId, path });
if (attachment) search.set("download", "1");
return `/api/files/download?${search.toString()}`;
return resolveApiUrl(`/api/files/download?${search.toString()}`);
}

function previewKindLabel(kind: FileSurfacePreviewKind): string {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const tracevaneBasePath = process.env.TRACEVANE_BASE_PATH || "";
const tracevaneSmokeDisableWatch = process.env.TRACEVANE_SMOKE_DISABLE_WATCH === "1";
const webConfigDir = path.dirname(fileURLToPath(import.meta.url));
const tracevaneRootDir = path.resolve(webConfigDir, "..", "..");
const TRACEVANE_PACKAGE_VERSION_FALLBACK = "0.2.4";
const TRACEVANE_PACKAGE_VERSION_FALLBACK = "0.2.6";
const tracevanePackageVersionOverride =
process.env.TRACEVANE_BUILD_VERSION?.trim() || "";
const tracevanePackageVersion = (() => {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ <h3 data-i18n="install.manualTitle">Or run the installer yourself</h3>
</footer>

<script>
const TRACEVANE_VERSION = "0.2.4";
const TRACEVANE_VERSION = "0.2.6";
const OPENCLAW_MIN_VERSION = "2026.5.28";

const translations = {
Expand Down
2 changes: 1 addition & 1 deletion install-tracevane.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
TRACEVANE_DEFAULT_VERSION="${TRACEVANE_DEFAULT_VERSION:-0.2.4}"
TRACEVANE_DEFAULT_VERSION="${TRACEVANE_DEFAULT_VERSION:-0.2.6}"
VERSION_EXPLICIT=0
PACKAGE_URL_EXPLICIT=0
GATEWAY_BIND_EXPLICIT=0
Expand Down
2 changes: 1 addition & 1 deletion openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "tracevane",
"name": "Tracevane",
"description": "Tracevane 本地 AI Agent 控制工作台,聚焦 Gateway、Channel Connectors、CLI Agent 和运行态自愈。",
"version": "0.2.4",
"version": "0.2.6",
"homepage": "https://github.com/binbin/tracevane",
"activation": {
"onStartup": true
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@binbin/tracevane",
"version": "0.2.5",
"version": "0.2.6",
"description": "Tracevane - Local AI Agent Control Workbench",
"private": true,
"repository": {
Expand Down
12 changes: 12 additions & 0 deletions tests/system/web-file-manager-domain.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ test("file manager routes files through unified online surface", () => {
assert.doesNotMatch(packageJson, /docs:render/);
assert.doesNotMatch(packageJson, /markdown-visual-editor|fallback-preview|html-editor|upload-preview|preview-resilience/);
});

test("file manager direct download URLs honor the mounted API base path", () => {
for (const relativePath of [
"apps/web/src/shared/file-surface/FileSurfacePreviewPanel.tsx",
"apps/web/src/features/file-manager/file-tools/FileActionsMenu.tsx",
"apps/web/src/features/file-manager/FileManagerPage.tsx",
]) {
const source = read(relativePath);
assert.match(source, /resolveApiUrl/);
assert.doesNotMatch(source, /window\.open\(\s*`\/api\/files\//);
}
});
Loading