-
Notifications
You must be signed in to change notification settings - Fork 155
Description
Motivation
The API Client's address bar maintains a history of previously visited URLs, which is helpful for quickly re-accessing frequently used endpoints. However, over time this history can become cluttered with old or test URLs that are no longer relevant. Users have no way to clear this history, leading to a degraded experience as the list grows longer and harder to navigate.
Current Behavior
The address bar dropdown shows a list of previously used URLs when clicked. This history persists across sessions and continues to grow, but there is no mechanism to clear it. Users cannot remove individual entries or clear the entire history.
Reproduction Steps:
- Open the Scalar API Client
- Enter and send requests to several different URLs
- Click on the address bar to view the history dropdown
- Observe: The history list shows all previous URLs
- Observe: No option exists to manage or clear the history
Expected Behavior
The address bar history dropdown should include a "Clear History" button or option that removes all stored URL history. After clearing, the dropdown should show an empty state or helpful message indicating the history is empty.
Acceptance Criteria:
- A "Clear History" button/link is visible at the bottom or top of the address bar history dropdown
- Clicking the button removes all entries from the history
- A confirmation dialog appears before clearing
- After clearing, the dropdown shows an appropriate empty state
- The cleared history persists across page refreshes (history should remain empty until new requests are made)
Steps To Test
- Start the API Client with
pnpm dev:client - Send requests to multiple URLs to populate the history (at least 5 different URLs)
- Click the address bar and verify the history dropdown shows all previous URLs
- Locate and click the "Clear History" button and Confirm
- Verify the history dropdown is now empty or shows an empty state message
- Refresh the page and verify the history remains cleared
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx