Skip to content

[Feature]: Add search history sidebar with ability to revisit and re-run past queries within a session #232

Description

@divyanshim27

Summary

SuperBrowser tracks per-tab query history as part of its context engine — every search is captured in the context.queries array for AI grounding. However, this history is not surfaced anywhere in the UI as a navigable list. Users who want to revisit a previous search within their session must either remember and retype the query, or export the full JSON context to find it. Adding a visible, interactive search history panel would significantly improve the research workflow that SuperBrowser is designed for.

Problem
The useContextManager.js hook accumulates queries in the tab context, but the frontend has no UI component that renders this history list.
Users cannot click a past query to re-run it or see its results without re-typing it.
There is no visual indication of how deep a research thread has gone within a tab (beyond the 🧠 Context: X searches count badge).
The Community and AI modes have no way to reference which past SEO queries were run in the same tab.
Impact
Non-linear research — jumping back to a previous query thread — requires retyping, breaking research flow.
The context badge (🧠 Context: X searches, Y results) tells users that history exists but gives them no way to access it.
The unique "per-tab research thread" concept is undersold because users can't see or navigate their history.
Proposed Solution

  1. Add a collapsible history sidebar component:

jsx
// frontend/src/components/SearchHistorySidebar.jsx
const SearchHistorySidebar = ({ tabContext, onRerunQuery }) => {
const [isOpen, setIsOpen] = useState(false);

return (
<div className={history-sidebar ${isOpen ? 'open' : 'collapsed'}}>
<button onClick={() => setIsOpen(!isOpen)} className="history-toggle">
{isOpen ? '◀ Hide History' : '▶'}

{isOpen && (


Search History ({tabContext.queries.length})


{[...tabContext.queries].reverse().map((query, index) => (

{query}
<button
onClick={() => onRerunQuery(query)}
className="rerun-btn"
title="Re-run this search"
>
↩ Re-run


))}

)}

);
};

  1. Wire onRerunQuery in App.jsx to populate the search input and trigger a new search.

  2. Style the sidebar with the existing TailwindCSS classes and dark/light theme support, collapsible to a thin icon strip when closed.

  3. Add visited pages to the sidebar below queries, showing page titles and URLs from tabContext.visited_pages as clickable links.

  4. Add a "Clear History" button within the sidebar that calls DELETE /api/context/clear/{session_id}/{tab_id} and resets the local context state.

Acceptance Criteria
SearchHistorySidebar component created and integrated into App.jsx
Sidebar renders all queries from the current tab's context in reverse chronological order
"Re-run" button re-submits the query through the existing search dispatch path
Visited pages listed below queries with clickable URLs
"Clear History" button calls the backend clear endpoint and resets local state
Sidebar is fully responsive and works in both web and Electron modes
Dark/light theme support applied

I would be glad to implement this. Could you please assign this issue to me?

Labels: enhancement, feature-request, frontend, user-experience, help wanted, GSSoC 2026


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GSSoCUnder GirlScript Summer of Code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions