Skip to content

Commit e188328

Browse files
committed
release: v0.4.0
Bumps @scrapeman/desktop to 0.4.0, adds a CHANGELOG, imports the writing-style guidance from scrapeman-landing into .claude/CLAUDE.md, and rewrites the package description to match the landing positioning ("free, local-first API client with unlimited history, git-friendly .sman collections, a built-in load runner, and native Scrape.do proxy"). See CHANGELOG.md for the full 0.3.2 → 0.4.0 delta.
1 parent d9d8674 commit e188328

3 files changed

Lines changed: 123 additions & 2 deletions

File tree

.claude/CLAUDE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Scrapeman — Claude instructions
2+
3+
## Project
4+
Scrapeman is a Postman/Bruno-class API client built for scraping engineers.
5+
Electron + React + TypeScript, pnpm monorepo. Sibling repo is
6+
`/Users/mert/Developer/scrapeman-landing` (the marketing site).
7+
8+
## User-facing writing rules
9+
10+
Apply every time you write prose a human will read: README updates, DOCS
11+
sections, commit messages, PR descriptions, release notes, CHANGELOG
12+
entries, in-app toasts and error copy. This list comes from two open
13+
skills the user follows — `blader/humanizer` and `hardikpandya/stop-slop`
14+
plus the anti-slop notes in memory. State facts and numbers; skip the vibes.
15+
16+
**Write in English.** Code comments, commit messages, PR descriptions,
17+
release notes, and CHANGELOG entries are always in English, even when the
18+
chat is in Turkish.
19+
20+
### Cut on sight
21+
- Significance inflation: "pivotal", "transformative", "testament to",
22+
"marking a new era", "at its core"
23+
- Promotional adjectives: "seamless", "vibrant", "empowering",
24+
"game-changing", "cutting-edge", "revolutionary"
25+
- AI tells: "leverage", "unlock", "showcase", "landscape", "actually",
26+
"additionally", "while details are limited"
27+
- Vague attributions: "experts say", "industry observers", "some argue"
28+
- Formulaic challenges: "Despite the challenges, X continues to thrive"
29+
- Chatbot artifacts: "Great question!", "I hope this helps", sycophancy
30+
- Generic conclusions: "The future looks bright", "The possibilities are
31+
endless"
32+
- Signposting: "Let's dive in", "Here's what you need to know"
33+
- Negative parallelisms: "Not just X, but Y", "Everything you need,
34+
nothing you don't"
35+
- Rule-of-three arranged for rhetoric ("innovation, inspiration, insights")
36+
37+
### Prefer
38+
- "is" and "has" over "serves as", "features", "boasts"
39+
- "To" over "In order to"; "Because" over "Due to the fact that"
40+
- Short sentences. Mix lengths only when rhythm demands.
41+
- Concrete numbers (tests, file counts, bug IDs, commit hashes, version
42+
tags) instead of adjectives
43+
- Commas or periods over em-dashes for breathing
44+
- Sentence-case headings (not Title Case)
45+
- No emojis, no curly quotes, no inline-header bold lists like
46+
"**Performance:** ..."
47+
48+
### Before shipping prose
49+
Score it 1–10 on directness, rhythm, trust, authenticity, density. Rewrite
50+
if the total is under 35 / 50. Rewriting the first line usually fixes the
51+
rest.
52+
53+
## Brand capitalisation
54+
- User-facing prose: `Scrape.do` (capital S), `Scrapeman` (capital S).
55+
- Lowercase `scrape.do` is fine only inside URLs, code blocks, env vars,
56+
and literal terminal output.
57+
58+
## Agent workflow
59+
- Worktree isolation: every code-writing agent gets `isolation: "worktree"`.
60+
- Reviews: ninja-fullstack / ninja-scraping hand their work to
61+
developer-core for review (APPROVED / CHANGES REQUESTED / BLOCKED).
62+
- Commits ship without `Co-Authored-By` unless the user asks for it.
63+
- Pushes always need explicit approval. `git add` + `git commit` are fine
64+
any time; `git push` waits.
65+
- Every feature ships with README.md + DOCS.md updates in the same commit.
66+
67+
## Key project context
68+
- HTTP: `undici` (not axios, not fetch).
69+
- UI: React 18, Zustand, Tailwind, Radix, Lucide, Inter + Geist Mono.
70+
- IPC seam: renderer talks to main only through `contextBridge`. Renderer
71+
must never import `@scrapeman/http-core` top-level — it drags `undici`
72+
into the browser bundle.
73+
- File format: `.sman` (primary) and `.req.yaml` (legacy, read-only,
74+
migrated on first save).
75+
- `exactOptionalPropertyTypes` is on — use conditional spread, not
76+
`field: undefined`.

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Changelog
2+
3+
All notable changes land here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [SemVer](https://semver.org/).
4+
5+
## [0.4.0] — 2026-04-22
6+
7+
### Added
8+
- Screenshot capture button in the request header. Hides the sidebar, tab bar and action buttons, then opens a modal with the PNG and a copy-to-clipboard button that uses Electron's native `clipboard.writeImage`. A "Tested with Scrapeman" watermark sits in the bottom-right of the captured frame.
9+
- Git pull now prompts on diverged branches instead of aborting. Dialog offers Rebase, Merge commit, or Cancel; the pick is passed through IPC to `git pull --rebase` or `git pull --no-rebase --no-ff`. Auth, network, and merge-conflict errors render as plain English banners. A three-second inline badge confirms the pull strategy that ran.
10+
- Drag-to-reorder rows in Params and Headers. Hover-only grip handle on the left; a two-pixel accent line appears above or below the hovered row based on cursor position, and the drop lands at that edge.
11+
- Bulk header edit. Pencil toggle at the top-right of the Headers table opens a textarea where each line is `Key: Value`; a `//` prefix disables that line. Round-trip between table and textarea is lossless, `{{var}}` placeholders preserved.
12+
- JSON body beautify. Button shows up when body mode is `json`; Shift+Cmd+F (macOS) or Shift+Ctrl+F (Windows/Linux) runs the same format from inside the editor. Body containing unresolved `{{var}}` is skipped with a toast.
13+
- Response body search runs over a `@tanstack/react-virtual` pipeline: 150ms debounce, line-indexed match table, and only the visible rows hit the DOM. A 5 MB body stays under 30 ms per keystroke. HTML responses now have a CodeMirror pretty view with one-dark in dark mode and a size warning above 500 KB.
14+
- `normalizeUrl(raw)` in `http-core` handles scheme-less URLs (`localhost/api`), port-only (`:80/path`), and empty host (`:/path`) by prepending `http://` and defaulting the host to `0.0.0.0`. Runs after variable resolution so `{{host}}` still works.
15+
- `.sman` is now the primary file extension. Legacy `.req.yaml` files are read as-is; the first save rewrites them to `.sman` and deletes the old path. Collisions resolve to `.sman`. Parser accepts `scrapeman: "1.0"` and `scrapeman: "2.0"`; the writer always emits `2.0`.
16+
- Per-tab sub-pane memory. Each request tab remembers whether it was on Params, Headers, Body, Auth, Settings, Code or Load when you left it.
17+
- Response body validator. Settings tab has an "Expected text" input; when set, the response status bar shows a green check or red cross chip reporting whether the decoded body contains the substring. `{{var}}` supported.
18+
- Load runs land in history with a `LoadRunSummary` (sent, succeeded, failed, validationFailures, elapsedMs, rps, p50, p95, p99, min, max, statusHistogram, errorKinds).
19+
- Load test shows the active validation rules while the run is live: `status = 2xx` and `body ⊃ "success"` chips appear next to the progress bar and on the initial spinner screen.
20+
- Hover descriptions on every load-test metric: RPS, p50, p95, p99, min, max, Inflight, Success rate, Failed, Validation fail.
21+
22+
### Fixed
23+
- Response body and execution state no longer leak between tabs when you switch tabs before the response lands. The store captures the target tab id at send time and writes back via a new `mutateById` helper instead of whichever tab happens to be active.
24+
- Load test state is now per-tab. Config, run id, progress snapshot, and event log live on `Tab.loadTest` in the store; tab switches and sidebar toggles preserve them. Closing a tab aborts its running load run so the main process does not keep firing events at a dead tab id.
25+
- Response viewer toolbars (status metrics bar, body/headers switcher) and the Headers panel column header are now opaque and sticky. Virtualized body text no longer bleeds into the chrome when restoring from history or retrying.
26+
- Virtualized rows in raw and pretty no longer overlap. The inner `<pre>` used `whitespace-pre-wrap break-words` while the outer height was pinned to 18 px, so long lines wrapped visually and drew over the next row. Flattened to a single `whitespace-pre` div and widened the slab to `max-content`; long lines now scroll horizontally inside the `overflow-auto` parent.
27+
- Active search match is centered both vertically and horizontally. Vertical scroll goes through the virtualizer; horizontal scroll is computed from the mark's `getBoundingClientRect()` and applied to `parent.scrollLeft`, which sidesteps the `contain: strict` + absolute-positioned slab combination that broke `scrollIntoView`.
28+
- HTML pretty mode follows search navigation. Enter / Shift+Enter map the active match into a CodeMirror `SelectionRange` and dispatch `scrollIntoView(range, { y: 'center', x: 'center' })`; the read-only selection highlight doubles as the active-match cue.
29+
- Executor and scrape.do composer stopped re-appending `request.params` onto URLs. The URL bar is now the single source of truth for the outgoing URL; `request.params` stays in the file format for round-tripping disabled rows but never reaches the wire. Fixes duplicated `token=` in the scrape.do envelope (`"Wrong query parameter. You are sending multiple value via same parameter('token')"`) and `{{var}}` going through unresolved.
30+
- Disabled URL params survive tab switches, disk saves, and reloads. Added `disabledParams: string[]` to the file format; all params round-trip with their enabled flag.
31+
- Params row order is preserved when toggling the enabled checkbox. Previously `[disabled..., enabled...]` regrouping reshuffled the list on reload.
32+
- `HeadersEditor` no longer imports from `@scrapeman/http-core`. The top-level export dragged `undici` into the renderer bundle and the browser crashed with `process is not defined`. The bulk helpers moved to `apps/desktop/src/renderer/src/utils/header-bulk.ts`.
33+
- `git pull --ff-only` no longer fatals on diverged branches (see Added).
34+
35+
### Changed
36+
- Request execution contract: `request.url` is canonical. `request.params` is metadata for the file format only and is not appended to the URL by the executor or by `composeScrapeDoRequest`.
37+
38+
### Tests
39+
- Test files: 22 passed in `http-core`, 2 in `apps/desktop`.
40+
- Total: 332 tests pass, 7 skipped.
41+
- `pnpm -r typecheck` clean in all three packages.
42+
43+
## [0.3.2] and earlier
44+
45+
See `git log --grep='release:'` for prior version notes.

apps/desktop/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@scrapeman/desktop",
3-
"version": "0.3.2",
3+
"version": "0.4.0",
44
"private": true,
5-
"description": "Scrapeman — Postman-grade API client for every developer",
5+
"description": "Free, local-first API client with unlimited history, git-friendly .sman collections, a built-in load runner, and native Scrape.do proxy.",
66
"author": {
77
"name": "scrape-do",
88
"email": "hello@scrape.do",

0 commit comments

Comments
 (0)