feature/public-launch #15

Merged
patillacode merged 15 commits from feature/public-launch into main 2026-04-27 18:43:58 +02:00
Owner

This PR moves Piruetas from a purely admin-gated app toward a proper SaaS product, and pays down some
maintenance debt along the way.


Open registration (/signup)

  • Users can now create an account without admin involvement.
  • The signup route reuses the existing CSRF and rate-limiting infrastructure from login.
  • Validation matches admin user creation (3–32 char alphanumeric username, 8-char minimum password, confirm password).
  • On success the user is logged in and redirected to their journal.
  • The landing page ACCESS dropdown now links to /signup, and the hero and hosted sections have CTA buttons.

CSS/JS extracted from templates

  • All <style> blocks, <script> blocks, and inline style="" attributes have been moved out of templates into static files.
  • Four new component CSS files, three new JS files.
  • Templates now contain only markup and small Jinja data-injection <script> tags. This was the main readability/maintainability complaint.

E2E tests: desktop + mobile viewports

  • The device fixture in tests/e2e/conftest.py is now parametrized over desktop (1280×800) and mobile (390×844).
  • All e2e tests run twice automatically, any responsive breakage will surface in CI.

Export button bug fix

  • Clicking the export icon in the journal toolbar was clearing the editor content until page reload.
  • Root cause: window.beforeunload fired when the browser started navigating to the download URL, calling editor.destroy()
    before the Content-Disposition: attachment response kept the page alive.
  • Fix is a one-line removal.

Test plan

  • just test
  • Visit /signup, create a new account, confirm redirect to journal and active session
  • Duplicate username and invalid inputs return 400 with error message
  • Click export icon on a journal entry, editor content stays intact after download
  • Inspect any admin or account page, no inline <style> or <script> blocks, no CSP violations in console
  • just test-e2e: all tests run twice (desktop + mobile)
This PR moves Piruetas from a purely admin-gated app toward a proper SaaS product, and pays down some maintenance debt along the way. --- **Open registration (`/signup`)** - Users can now create an account without admin involvement. - The signup route reuses the existing CSRF and rate-limiting infrastructure from login. - Validation matches admin user creation (3–32 char alphanumeric username, 8-char minimum password, confirm password). - On success the user is logged in and redirected to their journal. - The landing page `ACCESS` dropdown now links to `/signup`, and the hero and hosted sections have CTA buttons. **CSS/JS extracted from templates** - All `<style>` blocks, `<script>` blocks, and inline `style=""` attributes have been moved out of templates into static files. - Four new component CSS files, three new JS files. - Templates now contain only markup and small Jinja data-injection `<script>` tags. This was the main readability/maintainability complaint. **E2E tests: desktop + mobile viewports** - The device fixture in tests/e2e/conftest.py is now parametrized over desktop (1280×800) and mobile (390×844). - All e2e tests run twice automatically, any responsive breakage will surface in CI. **Export button bug fix** - Clicking the export icon in the journal toolbar was clearing the editor content until page reload. - Root cause: `window.beforeunload` fired when the browser started navigating to the download URL, calling `editor.destroy()` before the `Content-Disposition: attachment` response kept the page alive. - Fix is a one-line removal. --- **Test plan** - `just test` - Visit `/signup`, create a new account, confirm redirect to journal and active session - Duplicate `username` and invalid inputs return `400` with error message - Click export icon on a journal entry, editor content stays intact after download - Inspect any admin or account page, no inline `<style>` or `<script>` blocks, no CSP violations in console - just `test-e2e`: all tests run twice (desktop + mobile)
beforeunload fired when browser started navigating to the export URL,
calling editor.destroy() before the server's Content-Disposition:
attachment header kept the page in place.
Adds a device fixture parametrized over desktop (1280x800) and mobile
(390x844). All tests using authenticated_page or admin_page now run
twice, catching responsive regressions automatically.
Moves all <style> and <script> blocks out of templates:
- 4 new component CSS files (data, admin-users, admin-tasks, share)
- 3 new JS files (data.js, admin-users.js, landing.js)
- Converts 43 inline style= attributes to CSS classes
- Imports new component files via base.css

Templates now contain only markup and Jinja data-injection scripts.
Also fixes two pre-existing line-length lint violations in routers.
feat: add open registration with landing page CTAs
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 32s
Test and publish Docker image / e2e (pull_request) Failing after 1m15s
Test and publish Docker image / build (pull_request) Has been skipped
16d06bc692
Users can now sign up at /signup without admin intervention:
- GET/POST /signup with username/password validation, CSRF protection,
  and rate limiting reusing the login rate-limit mechanism
- Confirm password field; invalid inputs return 400 with error message
- Successful signup creates session and redirects to /
- Admin user creation remains unchanged

Landing page updates:
- ACCESS dropdown links to /signup (was "Register — Soon")
- Hero section and hosted section gain sign-up CTA buttons
- Extracts landing JS to landing.js (data injection stays inline)

Adds 8 tests covering all signup paths and CSRF enforcement.
wip
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 33s
Test and publish Docker image / e2e (pull_request) Failing after 1m5s
Test and publish Docker image / build (pull_request) Has been skipped
56e377db5c
fix: fix e2e tests
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 33s
Test and publish Docker image / e2e (pull_request) Failing after 5m27s
Test and publish Docker image / build (pull_request) Has been skipped
9f617b68b1
fix: fix e2e mobile issues
All checks were successful
Test and publish Docker image / test (pull_request) Successful in 32s
Test and publish Docker image / e2e (pull_request) Successful in 3m14s
Test and publish Docker image / build (pull_request) Has been skipped
c9f4806bd7
feat: landing page UX tweaks: pricing table, auth-aware CTAs, typography
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 33s
Test and publish Docker image / build (pull_request) Waiting to run
Test and publish Docker image / e2e (pull_request) Has been cancelled
1750089c24
wip
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 32s
Test and publish Docker image / e2e (pull_request) Failing after 5m49s
Test and publish Docker image / build (pull_request) Has been skipped
65ef726c41
wip
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 32s
Test and publish Docker image / e2e (pull_request) Failing after 5m52s
Test and publish Docker image / build (pull_request) Has been skipped
ce734addd3
fix: restructure routing so root redirects auth users to journal
Some checks failed
Test and publish Docker image / test (pull_request) Failing after 32s
Test and publish Docker image / e2e (pull_request) Has been skipped
Test and publish Docker image / build (pull_request) Has been skipped
835f6f0871
- Login and signup now redirect to today's journal URL instead of /
- Root / redirects authenticated users to /journal/YYYY/MM/DD
- Add /about route serving the landing page for all users
- Gate pricing CTA signup link behind {% if not user %}
- Update e2e landing tests to navigate to /about for auth scenarios
- Tighten unauthenticated hero CTA selector to avoid matching pricing CTA
wip
Some checks failed
Test and publish Docker image / test (pull_request) Failing after 33s
Test and publish Docker image / e2e (pull_request) Has been skipped
Test and publish Docker image / build (pull_request) Has been skipped
d7c6ace063
wip
Some checks failed
Test and publish Docker image / test (pull_request) Successful in 31s
Test and publish Docker image / build (pull_request) Waiting to run
Test and publish Docker image / e2e (pull_request) Has been cancelled
86aa1abb9f
wip
All checks were successful
Test and publish Docker image / test (pull_request) Successful in 32s
Test and publish Docker image / e2e (pull_request) Successful in 3m21s
Test and publish Docker image / build (pull_request) Has been skipped
18c4fc1898
wip
All checks were successful
Test and publish Docker image / test (pull_request) Successful in 34s
Test and publish Docker image / e2e (pull_request) Successful in 3m40s
Test and publish Docker image / build (pull_request) Has been skipped
0f3058b5fa
patillacode deleted branch feature/public-launch 2026-04-27 18:43:59 +02:00
patillacode referenced this pull request from a commit 2026-04-27 18:44:00 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
patillacode/piruetas!15
No description provided.