Skip to content

feat: persistent dashboard settings (branding, links, integrations)#99

Merged
pratyush618 merged 2 commits intomasterfrom
feat/dashboard-settings
May 1, 2026
Merged

feat: persistent dashboard settings (branding, links, integrations)#99
pratyush618 merged 2 commits intomasterfrom
feat/dashboard-settings

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

Add a deployment-wide key/value settings store with a Settings page in the dashboard.

Backend:

  • New Storage trait methods: get_setting, set_setting, delete_setting, list_settings — implemented for SQLite, Postgres, and Redis (Redis uses a single hash at taskito:settings).
  • dashboard_settings table added via inline migration on SQLite + Postgres.
  • Exposed through PyQueue and a new QueueSettingsMixin so queue.set_setting(...)/get_setting(...) work from Python.
  • REST API under /api/settings:
    • GET /api/settings — full snapshot
    • GET /api/settings/{key} — single value (404 if unset)
    • PUT /api/settings/{key} body {"value": ...} — JSON-encodes non-string values
    • DELETE /api/settings/{key} — returns {deleted: bool}
  • HTTP server now supports do_PUT / do_DELETE with bounded JSON body parsing (1 MiB cap, 413 on overflow, 400 on malformed JSON).
  • Per-key length validation (256-char keys, 64 KiB values, control characters rejected).

Frontend:

  • New /settings route with three sections — Branding, External Links, Integrations.
  • Optimistic TanStack Query mutations with rollback + sonner toasts.
  • API client extended with put / delete helpers.
  • Sidebar + mobile menu gain a "Configuration" group.

Test plan

  • cargo check --workspace (default, postgres, redis, native-async)
  • cargo clippy --workspace --features redis
  • cargo test --workspace — 49 SQLite tests (6 new for settings) + cross-backend contract test
  • uv run python -m pytest tests/python/ -v — 485 passed (16 new for settings)
  • uv run ruff check py_src/ tests/ — clean
  • uv run mypy py_src/taskito/ --no-incremental — clean
  • pnpm exec biome check src — clean
  • pnpm exec tsc --noEmit — clean
  • pnpm exec vitest run — 34 passed
  • pnpm build — wheel bundle rebuilt successfully

Add Storage::get_setting / set_setting / delete_setting / list_settings
across SQLite, Postgres, and Redis backends, exposed via PyQueue,
QueueSettingsMixin, and REST endpoints under /api/settings (list, get,
put, delete). Storage values are opaque strings; the dashboard handler
JSON-encodes non-string PUT bodies for ergonomic structured config.

Includes per-backend SQLite tests, cross-backend contract test, and
HTTP-level tests covering CRUD, validation, and persistence across
Queue instances.
Add a /settings route that surfaces three sections backed by the new
/api/settings endpoints:

- Branding: dashboard title and accent color overrides
- External links: deployment-wide list of {label, url} sidebar shortcuts
- Integrations: Grafana / Sentry / OTel base URLs

Each section persists optimistically via TanStack Query mutations with
rollback on error. Sidebar (and mobile menu) gain a Configuration group
linking to the new page. API client extended with put/delete helpers.
@pratyush618 pratyush618 merged commit d099289 into master May 1, 2026
20 checks passed
@pratyush618 pratyush618 deleted the feat/dashboard-settings branch May 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant