Add portal mode: DB-backed, login, topbar redesign and more - #4
Merged
Merged
Conversation
…(0.4.0) Portal mode (opt-in via FIREFLYER_PORTAL) stores many dashboards in a database and lists them in a gallery, reusing the existing stateless editor unchanged. Scoped to web/ as an owner-approved exception to the no-persistence anti-goal. - Store (web/portal.py): SqliteStore (dev/tests) + PostgresStore (runtime, lazy psycopg behind the .[portal] extra). Dashboards are opaque YAML blobs validated on save; name + author are columns. Gallery is a table (name, author, last updated) with Edit / Clone / Remove and a New-dashboard modal. - Entrypoint: python -m fireflyer.portal (reads portal.yaml, binds 0.0.0.0); docker compose --profile portal brings up Postgres + the app. - Auth (web/auth.py): login gate, default admin/admin, HMAC-signed session cookie, built on two swappable seams (Authenticator + session) so SSO/LDAP drop in without touching routes. Extension recipe documented in architecture.md. - Dashboard YAML gains a required top-level `name:` key (local and portal). - Editor topbar reworked: hamburger Dashboards link + logo + editable title (two-way with the name: key), Save (shown only when unsaved; Cmd/Ctrl+S), Preview, an icon theme switch (A / sun / moon) in the profile menu, profile dropdown. The Run button and status text are gone: editing greys the (still interactive) preview and shows a centered Refresh overlay. - Fixes: row-height drags now persist for block-style rows; column resize now works on tabbed dashboards (previously searched flat .items only and no-op'd). New tests: test_portal, test_auth, test_editor_page (no live DB or browser). Bumps version to 0.4.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…(0.4.0)
Portal mode (opt-in via FIREFLYER_PORTAL) stores many dashboards in a database and lists them in a gallery, reusing the existing stateless editor unchanged. Scoped to web/ as an owner-approved exception to the no-persistence anti-goal.
name:key (local and portal).New tests: test_portal, test_auth, test_editor_page (no live DB or browser). Bumps version to 0.4.0.