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
11 changes: 11 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "litepost-preview",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["exec", "vite", "preview", "--port", "4173", "--strictPort"],
"port": 4173
}
]
}
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
frontend:
name: Frontend Quality Gates
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# pnpm must be installed before setup-node so its cache probe can find it
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test:run

- name: Build frontend
run: pnpm build

rust:
name: Rust Quality Gate
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Cargo check
working-directory: src-tauri
run: cargo check
64 changes: 64 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy Docs

on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- "package.json"
- "pnpm-lock.yaml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# pnpm must be installed before setup-node so its cache probe can find it
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build with VitePress
run: pnpm docs:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ coverage
.temp
.cache

# VitePress
docs/.vitepress/cache
docs/.vitepress/dist

# Claude Code local settings
.claude/settings.local.json

# TypeScript
*.tsbuildinfo

Expand Down
124 changes: 124 additions & 0 deletions REAL_APP_TEST_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# LitePost Real-App Test Checklist (Phase 1 -> Phase 2 Gate)

Use this checklist against the **release build** (`pnpm tauri build`) to validate core power-user flows before starting Phase 2.

## 1. Release Smoke

- [ ] Install and launch from `nsis` or `msi` bundle.
- [ ] Create/open/close tabs (`Ctrl+N`, `Ctrl+W` if enabled).
- [ ] Send a basic request (`GET https://httpbin.org/get`) and confirm `200`.
- [ ] Restart app and confirm state persists (tabs, active environment, saved collections).

## 2. cURL Import Robustness

### 2.1 Basic + Headers + Query

Paste:

```bash
curl -X GET "https://httpbin.org/anything?from=curl&n=1" -H "X-Test: litepost" -H "Accept: application/json"
```

- [ ] Method, URL, query, and headers are populated correctly.
- [ ] Sending the imported request succeeds.

### 2.2 JSON Body + Escaping

Paste:

```bash
curl -X POST "https://httpbin.org/anything" -H "Content-Type: application/json" -d "{\"name\":\"LitePost\",\"msg\":\"hello \\\"world\\\"\"}"
```

- [ ] Body is valid JSON in editor.
- [ ] Sent request echoes JSON in response.

### 2.3 Multipart + File

Paste (replace with a real file path):

```bash
curl -X POST "https://httpbin.org/post" -F "meta=demo" -F "file=@C:/tmp/demo.txt"
```

- [ ] `multipart/form-data` mode activates.
- [ ] Text field and file field are mapped correctly.
- [ ] Request succeeds and response includes `form` + `files`.

## 3. Multipart Editor UX

- [ ] Add/remove text and file rows.
- [ ] Pick file with dialog, then send.
- [ ] Save request to collection, reopen it, verify rows persisted.
- [ ] Switch tabs and return; rows remain intact.

## 4. Pre-request Scripts

Use script:

```javascript
pm.environment.set("nonce", Math.random().toString(16).slice(2));
pm.request.setHeader("X-Nonce", pm.environment.get("nonce"));
pm.request.setQueryParam("nonce", pm.environment.get("nonce"));
```

- [ ] Request sends with dynamic header/query values.
- [ ] `{{nonce}}` becomes available in environment.

Failure behavior:

```javascript
throw new Error("intentional test error");
```

- [ ] Request does not send.
- [ ] Error clearly identifies the failing script name.

## 5. Extraction Rules (Single Request)

Send:

```http
GET https://httpbin.org/uuid
```

Rule:

- Source: `body`
- Path: `uuid`
- Variable: `last_uuid`

- [ ] Preview resolves before extraction.
- [ ] "Extract All" stores `last_uuid` in active environment.

Also verify:

- [ ] Source `status` with variable `last_status` stores `200`.
- [ ] Source `header` with path `content-type` stores expected value.

## 6. Collection Runner + Chaining

Create collection with two requests:

1) `GET https://httpbin.org/uuid` with extraction rule `uuid -> run_uuid`
2) `GET https://httpbin.org/anything?id={{run_uuid}}`

- [ ] Select active environment.
- [ ] Run collection.
- [ ] Request 2 resolves `{{run_uuid}}` from request 1 extraction.
- [ ] Runner summary (pass/fail, durations) looks correct.

## 7. Regression Checks After Bundle Split

- [ ] Body editor still loads and formats JSON.
- [ ] GraphQL editor still mounts and accepts query/variables.
- [ ] Response/code snippet syntax highlighting still renders.
- [ ] No blank/unstyled editor panes after cold start.

## 8. Release Artifacts

Current expected outputs:

- `src-tauri/target/release/litepost.exe`
- `src-tauri/target/release/bundle/msi/litepost_0.2.0_x64_en-US.msi`
- `src-tauri/target/release/bundle/nsis/litepost_0.2.0_x64-setup.exe`
104 changes: 104 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# LitePost Roadmap (Post-Phase 1)

This roadmap reflects current implementation status and the remaining planned phases.

## Current Status

- Phase 0 complete: multipart persistence hardening, collection runner multipart support, cURL parser robustness + tests.
- Phase 1 complete: pre-request script runtime, persistent extraction rules, request chaining support in single sends and collection runner.
- Phase 2 complete: global + per-request timeout, connect timeout, SSL verification toggle, proxy configuration.
- Phase 3 complete: schema introspection, field/argument autocomplete, operation picker, GraphQL error rendering, syntax highlighting.

## Phase 2 - Network Controls (Complete)

### Goals

- Add global and per-request timeout controls.
- Add SSL verification toggle (for local/self-signed development).
- Add proxy configuration support.

### Deliverables

- Settings UI + request-level overrides.
- Persisted settings model updates.
- Frontend request options wiring.
- Rust/Tauri transport wiring (`timeout`, `connect timeout`, SSL verify, proxy).
- Error messages for bad proxy/certificate config.

### Acceptance Criteria

- Users can set global timeout and override on specific requests.
- Users can disable SSL verification per request or globally.
- Users can route traffic through configured proxy and see requests succeed.
- Collection runner honors the same settings.

## Phase 3 - GraphQL Power Mode (Complete)

### Goals

- Move from basic GraphQL editing to high-productivity workflow.

### Deliverables

- Schema introspection fetch and cache.
- Query/mutation autocomplete from schema.
- Operation picker/validation improvements.
- Better GraphQL error rendering.

### Acceptance Criteria

- Users can introspect a GraphQL endpoint and get field autocomplete.
- Invalid query/variables issues are surfaced before send where possible.

## Phase 4 - WebSocket + Runner V2

### Goals

- Add first-class WebSocket support and enhance collection execution.

### Deliverables

- WebSocket panel: connect/send/log/status/close.
- Optional JSON formatting helpers in WS panel.
- Runner enhancements: sequential/parallel modes, configurable concurrency.
- Stop-on-fail and summary improvements.

### Acceptance Criteria

- Users can use `ws://` / `wss://` endpoints in-app.
- Runner can execute collections in configured mode with clear pass/fail reporting.

## Phase 5 - Power UX + Local-First Differentiators

### Goals

- Improve discoverability and speed for power users.

### Deliverables

- Command palette and expanded keyboard shortcuts.
- Response diff/compare workflow.
- OpenAPI import UX cleanup (modal-first, remove prompt-based flow).
- Better local backup/export/import ergonomics.

### Acceptance Criteria

- Common actions are available via shortcut/palette.
- Users can compare two responses with meaningful diffs.
- OpenAPI imports are guided and reliable.

## Phase 6 - Optional Stretch

### Candidate Features

- Local mock server.
- Local scheduled monitors/checks.
- Cookie jar inspector/editor enhancements.
- Additional auth helpers (SigV4/HMAC presets).

## Testing and Quality Gates (All Future Phases)

- Add targeted unit tests for each new runtime utility.
- Add integration-style tests for request preparation and chaining behavior.
- Ensure `pnpm build` and targeted Vitest suites pass before phase completion.

Loading
Loading