feat: v0.3 persistence — collections, history, session restore#12
Merged
Conversation
added 2 commits
June 13, 2026 20:40
Implements milestone v0.2 from docs/SPEC.md. Backend - Introduce structured RequestSpec (method, url, headers, body, settings) and a new Send(spec) bound method. Builds a per-request http.Client from Settings: timeout, follow-redirects (CheckRedirect), TLS verify. - Extend RequestResult with Status, StatusText, DurationMs, SizeBytes. - Non-JSON response bodies are now returned verbatim instead of dropped on json.Indent failure. - Keep MakeRequest as a thin wrapper around Send for backward compat. - Add SaveTextFile binding (used by Save body) via runtime.SaveFileDialog. - New send_test.go covering: status/text round-trip, duration & size, timeout, TLS verify off, redirect-following off, JSON pretty + plain. Frontend - Response insight (A): status chip colored by HTTP class, duration, size formatter (B/KB/MB), Pretty/Raw body toggle, search-in-response with match count and <mark> highlighting, Copy & Save body buttons. - Request power (B): - Query params builder, two-way synced with the URL field. - Auth: None / Bearer / Basic / API key (header or query target). - Body types: None / JSON (with Format button) / Form / Raw. - Per-request Settings: timeout, follow redirects, verify TLS. - Copy as cURL. - Request editor reorganized into one tabbed panel (Headers / Params / Body / Auth / Settings). - New shared helpers: kv (key/value rows), formatters, auth, settings, url-sync, curl-builder. Reusable KVRow replaces the per-purpose RequestHeader component (deleted). - Wails bindings regenerated. Deferred to v0.3 per spec: multipart / file uploads, iframe HTML preview.
Introduces a JSON store at $OS_CONFIG_DIR/hypr/store.json: - Collections: create/rename/delete collections; save named requests to them via a dialog; load saved requests into the active tab with one click. - History: every send is recorded (method, URL, status, duration); capped at 200 entries; click to restore URL into the active tab; clear-all. - Session restore: open tabs (method, URL, headers, params, body, auth, settings) are persisted on each action and restored on launch. - Sidebar: collapsible left panel with Collections + History sections. - Fix: method and URL are now per-tab (were previously shared across tabs). - 5 new store tests (34 total); all existing tests still pass. - 10 new bound Go methods for the store; App.Store field non-fatally initialized so the app still runs if the config dir is unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backend changes
store.go:Storetype backed by a single JSON file at$OS_CONFIG_DIR/hypr/store.json; thread-safe viasync.Mutex.Collection,SavedRequest,HistoryEntry,Session,TabState,KVPair,StoredAuth.ListCollections,SaveCollection,DeleteCollection,SaveRequest,DeleteRequest,AppendHistory,ListHistory,ClearHistory,LoadSession,SaveSession.App.storeinitialized instartup; failure is non-fatal (app runs without persistence).Frontend changes
sidebar.tsx,save-request-dialog.tsx.store-types.ts(TypeScript interfaces for all store types).App.tsxrestructured toflex-row(sidebar + scrollable main).methods[]/urls[]arrays replace the previous sharedrequeststate.SaveSessionon tab changes, add/close, and after each send.App.d.ts,App.js) with all 10 new methods.Test plan
go test ./...— 34 tests pass including 5 new store tests.