Repository navigation
Make cheatsheet examples linkable and add Undo on load - #406
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Owen, this is ready for your review and merge decision at CI passed, Codex’s GitHub review completed with no findings, and there are zero unresolved review threads. The separate security review found no actionable issues. Local verification passed lint, all 134 tests, the production build, and all seven planned Chromium scenarios. The change is medium risk because restoring an HTTP workspace can affect requests with side effects. For your review, use a disposable POST endpoint with the Network panel open. Load a cheatsheet example, reopen the HTTP tab, then click Undo. The original method, fields and completed output should return with a single POST in Network. The automated check exercised this exact sequence. For a quick native macOS check, Cmd-click a cheatsheet example and confirm it opens in a new tab while the original dialog and work stay in place. |
Closes #120
What changed
Each of the 13 cheatsheet rows now has native links in both cells and one keyboard Tab stop. A modified click can open the example in a new tab. A plain click loads it in place and clears jq flags so the example runs as shown.
When loading an example replaces work, a 10-second Undo restores the JSON or HTTP draft, query, options and output. This includes pre-URL HTTP drafts and cleared editors. Undo restores completed output verbatim, including time-dependent filters. An interrupted local jq run can finish. An interrupted HTTP request shows that its response is unavailable. Undoing a completed POST restores its response without issuing another request, including when the HTTP form is already open. Close, timeout and Undo release the snapshot.
Verification
npm run lint,npm test(134 passing), andnpm run buildpassed locally with Node 26.14.0. Vite configuration and OpenAPI warnings were also present on the baseline.-rproduced unquoted output and offered no Undo. The feature passed all seven planned browser scenarios in production Chromium at 1440 × 900.now. Chromium checks now compare method, fields, request counts and exact output before and after Undo, then edit the restored query to verify that execution resumes.Security review
The separate branch security review found no actionable issues. Example URLs contain only the built-in examples. Release of the in-memory Undo action was checked on dismissal, and stale completions were checked against restored output. A server can still finish processing a request that it has already received.
Risk and rollback
Medium risk. Undo interacts with debounced jq execution and HTTP requests that can have side effects. The main check for reviewers is that Undo restores a completed POST and its output while the browser's Network panel still shows a single POST.
Revert this PR to roll back the feature. There is no database or storage migration.
Codex implemented the change and supplies the automated reviews, so implementation and review are from the same vendor.
Rulings I made
Use disposable Linux Chromium for the browser checks. It supports a real Ctrl-click and the mocked worker POST. Vitest covers the macOS Meta-key predicate.
Dismiss an existing Undo when the same example is selected again. Otherwise a no-op selection would leave an older restore action visible.
Rebase onto the merged Place Output above JSON on narrow viewports #405 layout change before final review because both changes touch Playground. Repeat the browser and CI checks on the rebased head.
Restore settled local jq output verbatim. A pending local query can run again. For an interrupted HTTP request, show that its response is unavailable and keep the request count unchanged.