- FeedbackModal: the submit button had no label (empty blue bar); add
"Submit Feedback" / "إرسال التقييم" text with a submitting state.
- Admin panel: new "⭐ Tool Feedback" tab showing per-tool summary cards
(count, average rating, positive/negative) plus the full list of individual
ratings with reason, project, user and date. Backed by GET /api/admin/feedback.
- Ensure the qto_project_feedback / qto_customer_complaints tables exist on
MySQL at startup (idempotent CREATE TABLE IF NOT EXISTS). They were only in
the SQLite bootstrap, so on prod the insert had no table. Deliberately does
NOT run the full migration suite — migration 008 drops qto_active_projects
and would wipe in-progress project state on every boot.
- Add migrations/010_project_feedback.sql for the documented manual path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The security-hardening pass replaced the instant StaticFiles /cache mount
with an async route doing 2 blocking DB queries per image (token verify +
ownership), which froze the event loop and made previews slow. Keep the same
security but: run as sync def (threadpool, no event-loop blocking), cache the
token/ownership checks in-memory for a few seconds so a burst of page images
doesn't re-hit the DB, and send Cache-Control so the browser reuses images.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chore: enable qto.* logging + log the payment-sync best-effort blocks
Nothing configured the app loggers, so every diagnostic added across the code
was being dropped. Set the qto logger to INFO and replace the two silent
except:pass around billing reconciliation with logged exceptions. Behavior is
unchanged (still best-effort); failures are now visible.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Security:
- /cache is no longer public static files: served via an authenticated route
that verifies a valid session AND project ownership (was an IDOR exposing
confidential drawings). Frontend appends the token to <img> cache URLs.
- verify_session_token now reads role FROM THE DB (not the token), so a
demotion/suspension takes effect immediately instead of persisting 8h.
- Cancel the user's Dodo subscriptions on account deletion (was: keep billing
a deleted account).
- Rate limiter keys on the real client IP (cf-connecting-ip / x-forwarded-for)
instead of the proxy IP, which had made it collective/useless behind Render.
- Upload reads are capped at MAX_UPLOAD_BYTES to prevent memory-exhaustion DoS.
- .dockerignore/.gitignore now exclude the local venv and scratch/debug scripts
(several held hardcoded secrets and were being baked into the image).
Reliability:
- DB errors are logged (were silently printed / swallowed as "no rows").
- New transaction() context manager for a…
Update UI, add feedback system, extract name from email