Skip to content

server/tailsql: add history and saved queries#44

Merged
adrianosela merged 1 commit into
mainfrom
adrianosela/history-and-saved-queries
May 21, 2026
Merged

server/tailsql: add history and saved queries#44
adrianosela merged 1 commit into
mainfrom
adrianosela/history-and-saved-queries

Conversation

@adrianosela
Copy link
Copy Markdown
Contributor

Adds two collapsible panels; one for history
(last 20 queries - deduped), and one for saved
queries (saved manually via a save button).

Both are client-side (local storage).

Both lists are shared across all sources.

@adrianosela adrianosela requested a review from creachadair May 21, 2026 00:23
Adds two collapsible panels; one for history
(last 20 queries - deduped), and one for saved
queries.

Signed-off-by: Adriano Sela Aviles <adriano@tailscale.com>
@adrianosela adrianosela force-pushed the adrianosela/history-and-saved-queries branch from f0ab8ba to 7d869e3 Compare May 21, 2026 00:28
Copy link
Copy Markdown
Member

@creachadair creachadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

// Refresh when the input source changes.
sources.addEventListener('change', (evt) => { qform.submit() });

// Persist open/closed state of query panels across page reloads.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

}

function renderSavedQueries() {
savedList.innerHTML = '';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd almost be tempted to make this a <template> we could pull out and instantiate, but this isn't so hairy yet that it feels urgent 😅

@adrianosela adrianosela merged commit 377d992 into main May 21, 2026
1 check passed
@adrianosela adrianosela deleted the adrianosela/history-and-saved-queries branch May 21, 2026 14:41
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.

2 participants