Skip to content

feat: add request history - #22

Merged
slverma merged 29 commits into
mainfrom
feat/request-history
Jul 17, 2026
Merged

feat: add request history#22
slverma merged 29 commits into
mainfrom
feat/request-history

Conversation

@slverma

@slverma slverma commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Description:

Summary

  • Adds request history: every send (success or network failure) is recorded, viewable per-request in a new History tab on the request editor, and across the whole workspace in a new full-width History panel (opened from a button in the sidebar).
  • History entries can be expanded to inspect the full request/response, restored back into the live request (writes the raw, pre-interpolation config so {{variables}} and folder baseUrl aren't frozen in), or deleted individually / cleared in bulk.
  • Storage is capped (20 entries per request, 200 globally, 200KB per body) and pruned automatically via a new HistoryManager.
  • A "Enable History" toggle in the History panel lets users pause recording without losing anything already saved.

Notable design decisions

  • The global History view was originally an in-sidebar section but was relocated to its own singleton editor-panel tab (matching how request/folder editors already open) after the sidebar proved too narrow for a good reading experience — this required a new 4th Vite-built webview bundle (src/webview/history/).
  • Restore intentionally writes the raw (pre-interpolation, pre-baseUrl) request snapshot, not the fully-resolved URL that was actually sent — restoring resolved values would double-prepend the folder's base URL and bake {{variables}} into literal strings.
  • The enable/disable flag lives entirely inside HistoryManager, so no caller needs to know it exists — addEntry just silently no-ops while paused; delete/clear remain fully functional regardless of the flag.

Test plan

  • npx tsc --noEmit passes (verified throughout; no test suite exists in this repo)
  • Send a few requests (mix successes and at least one network failure) and confirm entries appear in both the per-request History tab and the global History panel
  • Expand an entry, confirm request/response detail renders correctly
  • Restore an older entry and confirm the form updates and shows unsaved (per-request tab) or persists immediately (global panel)
  • Delete an entry and Clear All from both surfaces; confirm the other surface stays in sync
  • Delete the underlying request, then confirm restoring its orphaned global-history entry shows a warning instead of restoring
  • Toggle "Enable History" off, send a request, confirm nothing new is recorded; toggle back on and confirm recording resumes
  • Confirm the toggle's state persists across reopening the History panel

slverma and others added 29 commits July 16, 2026 19:01
…x formData value on restore

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019E9G7hm75W6yFbCm4LNafy
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019E9G7hm75W6yFbCm4LNafy
@slverma
slverma merged commit ea1767a into main Jul 17, 2026
1 check passed
slverma pushed a commit that referenced this pull request Jul 17, 2026
## 1.7.0 (2026-07-17)

* feat: add request history (#22) ([ea1767a](ea1767a)), closes [#22](#22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant