Commit Graph

7 Commits

Author SHA1 Message Date
6f340a6818 feat: add per-user avatar seed regeneration with irreversible random avatar replacement
Implement a new `avatar_seed` column on the users table that overrides the username-based seed for Multiavatar generation. Introduce a null-safe `avatar_seed(user)` choke point in `avatar.py` that resolves `user.get("avatar_seed") or user.get("username")`, registered as a Jinja global so every render site (`_avatar_link.html`, `avatar_url(...)` calls, SEO `og_image`, issues ad-hoc dicts, devRant payload/PNG) propagates a regenerated seed. Add `POST /profile/{username}/regenerate-avatar` endpoint (owner-or-admin only) that writes a fresh `generate_uid()` to `avatar_seed`, invalidates the target's user cache, and audits `profile.avatar.regenerate`. The previous seed is overwritten and never stored, making regeneration irreversible. Document the feature in `AGENTS.md` and `README.md`, add the API endpoint to `docs_api.py`, and include the `regenerate_avatar` Devii tool in `CONFIRM_REQUIRED`.
2026-06-27 22:31:34 +00:00
7fc9b0f715 chore: add retoor header to all devplacepy source files and update style agent header rule
The diff adds the mandatory `retoor <retoor@molodetz.nl>` header comment to every `.py` file under `devplacepy/` (including `__init__.py` and `routers/__init__.py`), and updates the `StyleAgent` in `agents/style.py` to instruct agents to only add the header on created or already-edited files rather than sweeping the entire repo. The `agents/base.py` operating protocol is also revised to reorder and clarify tool discipline rules.
2026-06-11 23:58:46 +00:00
c4f2937415 fix: normalize unicode escape sequences and reformat multi-line expressions across codebase 2026-06-09 16:48:08 +00:00
92c1bfca47 feat: update multiavatar import path and call signature in generate_avatar_svg
The change modifies the import statement from `multiavatar` to `multiavatar.multiavatar` and updates the function call to pass `None, None` as additional arguments, aligning with a newer version of the multiavatar library's API.
2026-05-19 21:36:17 +00:00
8bbd4db848 fix: log full exception trace before warning on avatar generation failure for seed 2026-05-19 21:27:44 +00:00
fda3a202dc feat: replace DiceBear avatar proxy with local Multiavatar SVG generation and remove avatar_style from signup 2026-05-11 01:14:43 +00:00
f4343c3d05 feat: add DiceBear avatar proxy with style picker on signup and profile pages
Implement avatar generation via local proxy at `/avatar/{style}/{seed}` that fetches from DiceBear 9.x API with in-memory caching and fallback to initial-based SVG. Add avatar style selection dropdown to signup form and profile edit page, storing `avatar_style` in user records. Update comment rendering to support nested threading with parent-child relationships in post view. Add `avatar_url` and `avatar_styles` template globals, register avatar router in main app, and include avatar CSS classes for rounded image display.
2026-05-10 19:33:53 +00:00