Skip to content

feat(ui): save favourite SQL queries in localStorage #32

@gordonmurray

Description

@gordonmurray

Users re-run the same exploratory queries across sessions (same table, different filters) and lose them on browser refresh.

Scope

Pure frontend, no backend change.

  • "Star" button on each query in the Query History list and on the editor toolbar.
  • Starred queries persist to `localStorage` under `cloudfloe:savedQueries`.
  • New Saved Queries section in the right sidebar (next to Sample Queries / Query History).
  • Click a saved query to load it into the editor. Right-click or a trash icon to remove.
  • Persist an optional name per saved query (prompt on star, default = first 40 chars of the SQL).

Data shape (localStorage)

```json
[
{"id": "uuid", "name": "Last week's events", "sql": "SELECT ...", "savedAt": "2026-04-15T12:00:00Z"}
]
```

Why

Low-effort retention hook. Turns Cloudfloe from "one-off scratchpad" into "my daily Iceberg REPL."

Good first issue

Scoped to `frontend/js/app.js` + `frontend/css/style.css` + `frontend/index.html`. No backend, no DuckDB, no Iceberg knowledge needed. Ideal contributor on-ramp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions