Skip to content

Issue #17 - [FEATURE] Add "Clear History" Button to Address Bar History Dropdown #24

@rogelio-cmj

Description

@rogelio-cmj

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:

  1. Open the Scalar API Client
  2. Enter and send requests to several different URLs
  3. Click on the address bar to view the history dropdown
  4. Observe: The history list shows all previous URLs
  5. 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

  1. Start the API Client with pnpm dev:client
  2. Send requests to multiple URLs to populate the history (at least 5 different URLs)
  3. Click the address bar and verify the history dropdown shows all previous URLs
  4. Locate and click the "Clear History" button and Confirm
  5. Verify the history dropdown is now empty or shows an empty state message
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions