Skip to content

Conversation

@jordalgo
Copy link
Collaborator

Instead of showing example logs in the top
dropdown, show a list of recently pasted logs
or logs from loaded files if they are available.

This utilizes the localData npm package
that uses indexedDb.

Instead of showing example logs in the top
dropdown, show a list of recently pasted logs
or logs from loaded files if they are available.

This utilizes the localData npm package
that uses indexedDb.
(text: string) => {
const rawLines = text.split("\n");
loadLog(rawLines);
updateStoredLogs(rawLines);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have a couple of ways to load the input: paste, query link, server-injected link and file dialog.
I wonder if we can find a single point of "load" to updateStoredLogs? processRawLines maybe?...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We want to be selective about what goes into storedLogs - for example we don't want anything already in stored logs to be re-added. We probably also don't want url param content to be added to storedLogs as that already has a save-able URL.

Copy link
Collaborator

@theihor theihor left a comment

Choose a reason for hiding this comment

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

Great feature, thanks! I left a couple of non-blocking suggestions.


const handleLoadExample = useCallback(
async (exampleLink: string) => {
async (example: string, isLink: boolean) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I noticed that we hide the example dropdown if there is anthing in stored logs. Maybe we can show both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought about that but then the text next to it doesn't make sense "Example Logs" and "Previous Logs" - seems a little verbose to say "Example and Previous Logs"

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was thinking making those separate drop downs. But never mind, not important.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kk, we can always update it later if people want the examples back.

@jordalgo jordalgo merged commit 095865b into libbpf:master Nov 5, 2025
1 check passed
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