mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 11:45:20 +02:00
07b4e15b34
* fix: cookie import picker returns JSON instead of HTML jsonResponse() was defined at module scope but referenced `url` which only existed as a parameter of handleCookiePickerRoute(). Every API call crashed, the catch block also crashed, and Bun returned a default HTML page that the frontend couldn't parse as JSON. Thread port via corsOrigin() helper and options objects. Add route-level tests to prevent this class of bug from shipping again. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add help command to browse server Agents that don't have SKILL.md loaded (or misread flags) had no way to self-discover the CLI. The help command returns a formatted reference of all commands and snapshot flags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: version-aware find-browse with META signal protocol Agents in other workspaces found stale browse binaries that were missing newer flags. find-browse now compares the local binary's git SHA against origin/main via git ls-remote (4hr cache), and emits META:UPDATE_AVAILABLE when behind. SKILL.md setup checks parse META signals and prompt the user to update. - New compiled binary: browse/dist/find-browse (TypeScript, testable) - Bash shim at browse/bin/find-browse delegates to compiled binary - .version file written at build time with git commit SHA - Build script compiles both browse and find-browse binaries - Graceful degradation: offline, missing .version, corrupt cache all skip check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: clean up .bun-build temp files after compile bun build --compile leaves ~58MB temp files in the working directory. Add rm -f .*.bun-build to the build script to clean up after each build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: make help command reachable by removing it from META_COMMANDS help was in META_COMMANDS, so it dispatched to handleMetaCommand() which threw "Unknown meta command: help". Removing it from the set lets the dedicated else-if handler in handleCommand() execute correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: bump version and changelog (v0.3.2) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add shared Greptile comment triage reference doc Shared reference for fetching, filtering, and classifying Greptile review comments on GitHub PRs. Used by both /review and /ship skills. Includes parallel API fetching, suppressions check, classification logic, reply APIs, and history file writes. * feat: make /review and /ship Greptile-aware /review: Step 2.5 fetches and classifies Greptile comments, Step 5 resolves them with AskUserQuestion for valid issues and false positives. /ship: Step 3.75 triages Greptile comments between pre-landing review and version bump. Adds Greptile Review section to PR body in Step 8. Re-runs tests if any Greptile fixes are applied. * feat: add Greptile batting average to /retro Reads ~/.gstack/greptile-history.md, computes signal ratio (valid catches vs false positives), includes in metrics table, JSON snapshot, and Code Quality Signals narrative. * docs: add Greptile integration section to README Personal endorsement, two-layer review narrative, full UX walkthrough transcript, skills table updates. Add Greptile training feedback loop to TODO.md future ideas. * feat: add local dev mode for testing skills from within the repo bin/dev-setup creates .claude/skills/gstack symlink to the working tree so Claude Code discovers skills locally. bin/dev-teardown cleans up. DEVELOPING_GSTACK.md documents the workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: narrow gitignore to .claude/skills/ instead of all .claude/ Avoids ignoring legitimate Claude Code config like settings.json or CLAUDE.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: rename DEVELOPING_GSTACK.md to CONTRIBUTING.md Rewritten as a contributor-friendly guide instead of a dry plan doc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: explain why dev-setup is needed in CONTRIBUTING.md quick start Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add browser interaction guidance to CLAUDE.md Prevents Claude from using mcp__claude-in-chrome__* tools instead of /browse. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add shared config module for project-local browse state Centralizes path resolution (git root detection, state dir, log paths) into config.ts. Both cli.ts and server.ts import from it, eliminating duplicated PORT_OFFSET/BROWSE_PORT/STATE_FILE logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: rewrite port selection to use random ports Replace CONDUCTOR_PORT magic offset and 9400-9409 scan with random port 10000-60000. Atomic state file writes, log paths from config module, binaryVersion field for auto-restart on update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: move browse state from /tmp to project-local .gstack/ CLI now uses config module for state paths, passes BROWSE_STATE_FILE to spawned server. Adds version mismatch auto-restart, legacy /tmp cleanup with PID verification, and removes stale global install fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update crash log path reference to .gstack/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add config tests and update CLI lifecycle test 14 new tests for config resolution, ensureStateDir, readVersionHash, resolveServerScript, and version mismatch detection. Remove obsolete CONDUCTOR_PORT/BROWSE_PORT filtering from commands.test.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update BROWSER.md and TODO.md for project-local state Replace /tmp paths with .gstack/, remove CONDUCTOR_PORT docs, document random port selection and per-project isolation. Add server bundling TODO. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update README, CHANGELOG, and CONTRIBUTING for v0.3.2 - README: replace Conductor-aware language with project-local isolation, add Greptile setup note - CHANGELOG: comprehensive v0.3.2 entry with all state management changes - CONTRIBUTING: add instructions for testing branches in other repos Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add diff-aware mode to /qa — auto-tests affected pages from branch diff When on a feature branch, /qa now reads git diff main, identifies affected pages/routes from changed files, and tests them automatically. No URL required. The most natural flow: write code, /ship, /qa. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: update CHANGELOG for complete v0.3.2 coverage Add missing entries: diff-aware QA mode, Greptile integration, local dev mode, crash log path fix, README/SKILL.md updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
7.3 KiB
7.3 KiB
Changelog
0.3.2 — 2026-03-13
Fixed
- Cookie import picker now returns JSON instead of HTML —
jsonResponse()referencedurlout of scope, crashing every API call helpcommand routed correctly (was unreachable due to META_COMMANDS dispatch ordering)- Stale servers from global install no longer shadow local changes — removed legacy
~/.claude/skills/gstackfallback fromresolveServerScript() - Crash log path references updated from
/tmp/to.gstack/
Added
- Diff-aware QA mode —
/qaon a feature branch auto-analyzesgit diff, identifies affected pages/routes, detects the running app on localhost, and tests only what changed. No URL needed. - Project-local browse state — state file, logs, and all server state now live in
.gstack/inside the project root (detected viagit rev-parse --show-toplevel). No more/tmpstate files. - Shared config module (
browse/src/config.ts) — centralizes path resolution for CLI and server, eliminates duplicated port/state logic - Random port selection — server picks a random port 10000-60000 instead of scanning 9400-9409. No more CONDUCTOR_PORT magic offset. No more port collisions across workspaces.
- Binary version tracking — state file includes
binaryVersionSHA; CLI auto-restarts the server when the binary is rebuilt - Legacy /tmp cleanup — CLI scans for and removes old
/tmp/browse-server*.jsonfiles, verifying PID ownership before sending signals - Greptile integration —
/reviewand/shipfetch and triage Greptile bot comments;/retrotracks Greptile batting average across weeks - Local dev mode —
bin/dev-setupsymlinks skills from the repo for in-place development;bin/dev-teardownrestores global install helpcommand — agents can self-discover all commands and snapshot flags- Version-aware
find-browsewith META signal protocol — detects stale binaries and prompts agents to update browse/dist/find-browsecompiled binary with git SHA comparison against origin/main (4hr cached).versionfile written at build time for binary version tracking- Route-level tests for cookie picker (13 tests) and find-browse version check (10 tests)
- Config resolution tests (14 tests) covering git root detection, BROWSE_STATE_FILE override, ensureStateDir, readVersionHash, resolveServerScript, and version mismatch detection
- Browser interaction guidance in CLAUDE.md — prevents Claude from using mcp__claude-in-chrome__* tools
- CONTRIBUTING.md with quick start, dev mode explanation, and instructions for testing branches in other repos
Changed
- State file location:
.gstack/browse.json(was/tmp/browse-server.json) - Log files location:
.gstack/browse-{console,network,dialog}.log(was/tmp/browse-*.log) - Atomic state file writes:
.json.tmp→ rename (prevents partial reads) - CLI passes
BROWSE_STATE_FILEto spawned server (server derives all paths from it) - SKILL.md setup checks parse META signals and handle
META:UPDATE_AVAILABLE /qaSKILL.md now describes four modes (diff-aware, full, quick, regression) with diff-aware as the default on feature branchesjsonResponse/errorResponseuse options objects to prevent positional parameter confusion- Build script compiles both
browseandfind-browsebinaries, cleans up.bun-buildtemp files - README updated with Greptile setup instructions, diff-aware QA examples, and revised demo transcript
Removed
CONDUCTOR_PORTmagic offset (browse_port = CONDUCTOR_PORT - 45600)- Port scan range 9400-9409
- Legacy fallback to
~/.claude/skills/gstack/browse/src/server.ts DEVELOPING_GSTACK.md(renamed to CONTRIBUTING.md)
0.3.1 — 2026-03-12
Phase 3.5: Browser cookie import
cookie-import-browsercommand — decrypt and import cookies from real Chromium browsers (Comet, Chrome, Arc, Brave, Edge)- Interactive cookie picker web UI served from the browse server (dark theme, two-panel layout, domain search, import/remove)
- Direct CLI import with
--domainflag for non-interactive use /setup-browser-cookiesskill for Claude Code integration- macOS Keychain access with async 10s timeout (no event loop blocking)
- Per-browser AES key caching (one Keychain prompt per browser per session)
- DB lock fallback: copies locked cookie DB to /tmp for safe reads
- 18 unit tests with encrypted cookie fixtures
0.3.0 — 2026-03-12
Phase 3: /qa skill — systematic QA testing
- New
/qaskill with 6-phase workflow (Initialize, Authenticate, Orient, Explore, Document, Wrap up) - Three modes: full (systematic, 5-10 issues), quick (30-second smoke test), regression (compare against baseline)
- Issue taxonomy: 7 categories, 4 severity levels, per-page exploration checklist
- Structured report template with health score (0-100, weighted across 7 categories)
- Framework detection guidance for Next.js, Rails, WordPress, and SPAs
browse/bin/find-browse— DRY binary discovery usinggit rev-parse --show-toplevel
Phase 2: Enhanced browser
- Dialog handling: auto-accept/dismiss, dialog buffer, prompt text support
- File upload:
upload <sel> <file1> [file2...] - Element state checks:
is visible|hidden|enabled|disabled|checked|editable|focused <sel> - Annotated screenshots with ref labels overlaid (
snapshot -a) - Snapshot diffing against previous snapshot (
snapshot -D) - Cursor-interactive element scan for non-ARIA clickables (
snapshot -C) wait --networkidle/--load/--domcontentloadedflagsconsole --errorsfilter (error + warning only)cookie-import <json-file>with auto-fill domain from page URL- CircularBuffer O(1) ring buffer for console/network/dialog buffers
- Async buffer flush with Bun.write()
- Health check with page.evaluate + 2s timeout
- Playwright error wrapping — actionable messages for AI agents
- Context recreation preserves cookies/storage/URLs (useragent fix)
- SKILL.md rewritten as QA-oriented playbook with 10 workflow patterns
- 166 integration tests (was ~63)
0.0.2 — 2026-03-12
- Fix project-local
/browseinstalls — compiled binary now resolvesserver.tsfrom its own directory instead of assuming a global install exists setuprebuilds stale binaries (not just missing ones) and exits non-zero if the build fails- Fix
chaincommand swallowing real errors from write commands (e.g. navigation timeout reported as "Unknown meta command") - Fix unbounded restart loop in CLI when server crashes repeatedly on the same command
- Cap console/network buffers at 50k entries (ring buffer) instead of growing without bound
- Fix disk flush stopping silently after buffer hits the 50k cap
- Fix
ln -snfin setup to avoid creating nested symlinks on upgrade - Use
git fetch && git reset --hardinstead ofgit pullfor upgrades (handles force-pushes) - Simplify install: global-first with optional project copy (replaces submodule approach)
- Restructured README: hero, before/after, demo transcript, troubleshooting section
- Six skills (added
/retro)
0.0.1 — 2026-03-11
Initial release.
- Five skills:
/plan-ceo-review,/plan-eng-review,/review,/ship,/browse - Headless browser CLI with 40+ commands, ref-based interaction, persistent Chromium daemon
- One-command install as Claude Code skills (submodule or global clone)
setupscript for binary compilation and skill symlinking