Repository navigation
feat: full Windows compatibility, mantis-ui compat crate, shots & bundle scripts #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2c810ed
chore: add AGENTS.md, PR template, and CI workflow for ZOGWORK/mantis
sushilm20 b3870a0
feat: full Windows compatibility, mantis-ui compat crate, shots & bun…
sushilm20 7f03307
fix: address all Loopy findings, ChatText layout, and CI formatting
sushilm20 15f6446
fix: address all 15 Loopy review #2 findings and CI timeout
sushilm20 4e903c4
fix: address all 13 Loopy review #3 findings
sushilm20 0ec5466
fix: address Loopy review #4 (npm shim, IME/cursor editing, resizable…
sushilm20 b1452bf
fix: address all 12 Loopy review #5 findings (scroll threshold, input…
sushilm20 adc88d6
fix: address all 8 P2 findings from Loopy review #6
sushilm20 adbc34f
fix: address all 5 P2 findings from Loopy review #7
sushilm20 a3db5db
fix: address all 8 P2 findings from Loopy review #8
sushilm20 0d4cfc4
fix: address all 7 P2 findings from Loopy review #9
sushilm20 85853b8
fix: address all 4 findings from Loopy review #11
sushilm20 e2b1104
fix: address all 3 P2 findings from Loopy review #12
sushilm20 d17280f
fix: address all 3 P2 findings from Loopy review #13
sushilm20 984dcac
fix: address all 5 findings from Loopy review #14
sushilm20 9bc37b8
fix: address all 3 P2 findings from Loopy review #15
sushilm20 4f57f04
fix: address all 4 P2 findings on PR #3 (fmt scope, CMake discovery, …
sushilm20 9cbbdf6
fix: address all 5 P2 findings from PR #3 review #3
sushilm20 c772ba4
fix: snap slider endpoints across unaligned steps and isolate CI conc…
sushilm20 6312f3a
fix: use per-PR concurrency group in CI workflow
sushilm20 94ed33c
fix: address all 5 P2 findings on bundle.ps1 and shots.ps1
sushilm20 669c296
fix: harden atomic staging, lock, and temp capture in bundle.ps1 and …
sushilm20 3560334
fix: address all 6 rollback, lock, subdir, and bounded-wait findings …
sushilm20 72e9a37
fix: preserve artifacts and surface cleanup/timeout failures in bundl…
sushilm20 ade202e
ci: retrigger workflow after enabling fork Actions
sushilm20 0658da7
fix: validate screenshot extension, use literal paths, and persist or…
sushilm20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## What and why | ||
|
|
||
| <!-- The problem (with evidence) and what this changes. --> | ||
|
|
||
| ## Screenshots | ||
|
|
||
| <!-- Required for any user-visible change (AGENTS.md rules 5–6): capture with `.\scripts\shots.ps1` | ||
| before opening the PR and attach with `gh pr create --attach 'file.png#alt text'`, before/after when visual. | ||
| If nothing a user sees changes, replace this comment with: No user-visible change. --> | ||
|
|
||
| ## Tests | ||
|
|
||
| <!-- What runs (`cargo test --workspace`, `cargo clippy --workspace --all-targets`), and which test fails on main without this change. --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| fmt: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable | ||
| with: | ||
| components: rustfmt | ||
| - run: cargo fmt --manifest-path vendor/mantis-ui/Cargo.toml --check && rustfmt --edition 2024 --check crates/mantis-core/src/paths.rs crates/mantis-app/src/snapshot.rs crates/mantis-agent/src/harness.rs | ||
|
|
||
| check: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [windows-latest, macos-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable | ||
| with: | ||
| components: clippy | ||
| - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2 | ||
| with: | ||
| key: ${{ runner.os }}-cargo | ||
| - name: Cache OpenCascade (.occt) | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||
| with: | ||
| path: .occt | ||
| key: ${{ runner.os }}-occt-${{ hashFiles('Cargo.lock') }} | ||
| - name: Install CMake (macOS) | ||
| if: runner.os == 'macOS' | ||
| run: brew install cmake | ||
| - name: Clippy | ||
| run: cargo clippy --workspace --all-targets | ||
| - name: Test (mantis-ui) | ||
| run: cargo test -p mantis-ui | ||
| - name: Test | ||
| run: cargo test --workspace | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # AGENTS.md | ||
|
|
||
| How to work in this repo (humans and coding agents alike). Mantis: | ||
| agentic hardware IDE in Rust on GPUI. Fork of `GrowlyX/mantis` maintained under `ZOGWORK/mantis` with full Windows support. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. **Every change goes through a pull request.** Branch from `main`, push, and open the PR against `ZOGWORK/mantis`. Never push to `main` directly. Cut branches with `git checkout --no-track -b <branch> origin/main` and push with `git push -u origin HEAD:refs/heads/<branch>`. | ||
| 2. **Loopy review to 5/5 — Loopy is the only reviewer.** Trigger with a `@loopyreviews-bot review` comment, fix every finding, reply on and resolve each thread, push, and re-trigger. Merge only when the latest Loopy comment says **Confidence 5/5**, its "last reviewed" commit is the PR's **current head commit**, **0 threads are unresolved**, and CI is green. Read the bot's comment itself, not only the `loopy/review` status. If Loopy is down, stop and ask the owner: there is no self-review fallback. | ||
| 3. **Tests, formatting, and lints before pushing.** Run `cargo fmt --manifest-path vendor/mantis-ui/Cargo.toml --check` and `rustfmt --edition 2024 --check` on fork-added Rust files (`crates/mantis-core/src/paths.rs`, `crates/mantis-app/src/snapshot.rs`, `crates/mantis-agent/src/harness.rs`), `cargo clippy --workspace --all-targets`, and `cargo test --workspace`. Avoid running `rustfmt` across unmodified upstream `GrowlyX/mantis` files to keep upstream sync diffs clean. A bug fix comes with a test that fails on `main` and passes on the branch. | ||
| 4. **Keep upstream compatibility.** Preserve `#[cfg(target_os = "macos")]` / `#[cfg(unix)]` paths untouched wherever possible and isolate Windows-specific implementations under `#[cfg(target_os = "windows")]`, so `upstream` (`GrowlyX/mantis`) stays easy to sync and our changes can be upstreamed cleanly. | ||
|
|
||
| ## Screenshots and verification | ||
|
|
||
| 5. **UI changes ship with screenshots, captured before the PR opens.** If the diff changes anything a user sees in `mantis-app` (layout, panels, colors, 3D viewport, controls, dialogs), the PR body embeds at least one screenshot of the rendered change inline — before/after when the change is visual. A link out, a screenshot of code, or a promise to demo later does not satisfy this. A PR with no user-visible change writes `"No user-visible change."` in the template's `## Screenshots` section rather than deleting it, so the reviewer sees the claim and can disagree. | ||
| 6. **Capture with `scripts/shots.ps1` (Windows) or `MANTIS_SNAPSHOT` (macOS), never ad-hoc scripts.** It runs `mantis` headless via `MANTIS_SNAPSHOT`, `MANTIS_STATE`, `MANTIS_DO`, and `MANTIS_SIZE`, and writes PNGs **outside the repository** (under `$env:TEMP\mantis-shots`). Attach them with the GitHub CLI: `gh pr create --attach 'file.png#alt text'` or `gh pr comment <n> --attach ...`. Never commit screenshots to the repo. | ||
|
|
||
| ## Code conventions | ||
|
|
||
| 7. **Line endings:** LF (`\n`) for Rust/TOML/YAML/Markdown; PowerShell scripts (`.ps1`) may use UTF-8. No spaces in file names. | ||
| 8. **Secrets:** Never commit API keys (`ANTHROPIC_API_KEY`, `EXA_API_KEY`, `MANTIS_STORE_TOKEN`) or `.db` files. | ||
| 9. **Upstream sync:** `origin` is `ZOGWORK/mantis` and `upstream` is `GrowlyX/mantis`. Sync `main` via `git fetch upstream` and PRs, never force-push `main`. | ||
|
|
||
| ## Useful commands | ||
|
|
||
| ```powershell | ||
| cargo test --workspace # run all Rust unit/integration tests | ||
| cargo clippy --workspace --all-targets # lint workspace | ||
| cargo run --release -p mantis-app # launch the GPUI desktop app | ||
| cargo run --release -p mantis-cli -- demo out # build and route reference board | ||
| .\scripts\shots.ps1 # capture PR screenshots outside repo | ||
| .\scripts\bundle.ps1 # build release Windows package | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # CLAUDE.md | ||
|
|
||
| Read and follow [AGENTS.md](AGENTS.md): every change via PR on `ZOGWORK/mantis`, Loopy (the only reviewer) to 5/5 on the head commit, `rustfmt --check` on fork-owned files + `cargo clippy` + `cargo test --workspace`, and screenshots with `scripts/shots.ps1` (or `MANTIS_SNAPSHOT`) for anything user-visible. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.