diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 885c18f..927aea1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,6 +43,9 @@ jobs: run: node scripts/check-desktop-version.cjs - name: Verify bundle icons run: node scripts/check-bundle-icons.cjs + - name: Decode the macOS bundle icon + if: runner.os == 'macOS' + run: iconutil -c iconset -o "$RUNNER_TEMP/CoreTrace.iconset" assets/ctrace.icns - run: npm run check - run: npm run format:check - name: Show what Prettier would change @@ -105,6 +108,12 @@ jobs: run: node scripts/check-desktop-version.cjs - name: Verify bundle icons run: node scripts/check-bundle-icons.cjs + - name: Decode the macOS bundle icon + if: runner.os == 'macOS' + run: iconutil -c iconset -o "$RUNNER_TEMP/CoreTrace.iconset" assets/ctrace.icns + - name: Verify the official analyser installs and runs + if: runner.os == 'Linux' || (runner.os == 'macOS' && runner.arch == 'ARM64') + run: cargo test --manifest-path src-tauri/Cargo.toml --locked official_release_installs_and_produces_sarif -- --ignored - name: Third-party notices run: npm run notices - name: Release notes diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..db8fd3b --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,5 @@ +# CoreTrace Desktop design + +CoreTrace is a French-language code and analysis workspace. Keep the existing charcoal surfaces, red primary accent, and compact editor typography. The CSS custom properties in `desktop/styles.css` define the runtime palette. + +The workspace header names the active folder and keeps **Analyser** in the same place with or without a file open. Use the shared dialog, focus styles, and text labels for all launch surfaces. Keep the primary action next to the consequence it authorizes. diff --git a/README.md b/README.md index 7d18ec4..3bee803 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,15 @@ production credentials are embedded in the preview. Follow progress, cancel, inspect verified reports and open findings in the matching workspace. Retrying an uncertain submission keeps its idempotency key until inputs change or submission succeeds. Local edits are not uploaded by this workflow. -- **Local analysis:** Select your installed native `ctrace` executable in Settings, - with its analysis tools installed. Open a source file or a folder and run static - analysis. SARIF findings, stdout/stderr and cancellation are available. +- **Local analysis:** Open a C/C++ folder and choose **Analyser** in the code + workspace. On supported systems the first local run offers to download the + official CoreTrace analyser and shows the version and size before it starts. + Managed downloads cover Linux x64 (glibc 2.34+) and Apple Silicon (macOS 14+). + You can also choose an installed native `ctrace` executable in Settings. + Linux needs the system C library headers (for example `libc6-dev` on Ubuntu). + The analyser runs locally and the installed version works offline. Desktop + and analyser updates each require approval before downloading or installing. + SARIF findings, stdout/stderr and cancellation are available. Settings also accepts a tool configuration (`--config`) and the project's `compile_commands.json` (`--compile-commands`). The packaged configuration is selected automatically next to a CoreTrace distribution. With a configuration, its tool @@ -92,7 +98,8 @@ tags build and publish installers and signed update artifacts to GitHub Releases navigation. Terminal, debugger, LSP, extensions, Git commit/push UI, WSL bridging and local LLM integrations are not included. Local analysis can run on the active file or open folder. Cloud analysis can run on a connected GitHub commit or - upload the open folder after you confirm the CTU quote. + on an open folder you choose to upload. The CTU quote requires your approval + before the analysis starts. See the [migration and rollback guide](docs/tauri-migration.md) for the Electron archive and the [original validation report](docs/desktop-validation.md). diff --git a/UX-CONTRACT.md b/UX-CONTRACT.md new file mode 100644 index 0000000..9062470 --- /dev/null +++ b/UX-CONTRACT.md @@ -0,0 +1,7 @@ +# Analysis UX + +- Analyse names a folder or supported source file and asks where to run. Local analysis requires no account. The first managed run discloses its required download, official version, and size before the user starts it. +- Cloud analysis discloses the upload before transfer and requires a second explicit approval for CTU. Failure offers a local retry. +- Analysis reads saved files. When the target contains edits, its action states that it saves them first. A save failure keeps the editor drafts and stops the launch. +- The run panel keeps progress, cancellation, recovery, and report access visible. Local reports belong to the workspace and run that created them. +- Updating Desktop or its analyser requires an explicit action for each. A managed analyser stays available offline after install, and a manually selected analyser remains the user's choice. diff --git a/assets/ctrace.icns b/assets/ctrace.icns index e13019c..d03e9a9 100644 Binary files a/assets/ctrace.icns and b/assets/ctrace.icns differ diff --git a/desktop/App.test.tsx b/desktop/App.test.tsx index 2cac2d3..8cb3458 100644 --- a/desktop/App.test.tsx +++ b/desktop/App.test.tsx @@ -21,6 +21,7 @@ type CloseHandler = (event: { }) => void | Promise; let closeHandler: CloseHandler | undefined; const destroy = vi.fn(() => Promise.resolve()); +const saveDrafts = vi.fn<() => Promise>(); vi.mock("@tauri-apps/api/window", () => ({ getCurrentWindow: () => ({ @@ -37,11 +38,15 @@ vi.mock("./features/WorkspaceEditor", () => ({ WorkspaceEditor: forwardRef(function FakeEditor( props: { dirtyChanged: (dirty: boolean) => void; - run: (path: string) => void; + run: (path?: string) => void; }, ref: React.Ref<{ open: () => Promise }>, ) { - useImperativeHandle(ref, () => ({ open: vi.fn() })); + useImperativeHandle(ref, () => ({ + open: vi.fn(), + saveDrafts, + hasDrafts: () => false, + })); return ( <>